* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e0e0e0;
}

.container {
  max-width: 900px;
  padding: 2rem;
  text-align: center;
  width: 100%;
}

header {
  margin-bottom: 3rem;
}

.logo {
  width: 80px;
  height: 80px;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f7971e, #ffd200);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

header p {
  font-size: 1.1rem;
  color: #888;
}

.user-corner {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 100;
}

.user-greeting {
  font-size: 0.9rem;
  color: #ccc;
}

.btn-auth {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  border: 1px solid #f7971e;
  background: linear-gradient(135deg, #f7971e, #ffd200);
  color: #0a0a0f;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-auth:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: #f7971e;
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
}

.btn-outline:hover {
  background: rgba(247, 151, 30, 0.1);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: #e0e0e0;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.card:hover:not(.disabled) {
  transform: translateY(-4px);
  border-color: #f7971e;
  box-shadow: 0 8px 32px rgba(247, 151, 30, 0.15);
  background: rgba(255, 255, 255, 0.08);
}

.card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.card-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.card h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.card p {
  font-size: 0.85rem;
  color: #888;
}

.card .wip {
  color: #f7971e;
  font-style: italic;
}

#authView {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
  z-index: -2;
}

.auth-bg::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url('assets/dbapp_small.png') no-repeat center center;
  background-size: min(60vw, 60vh, 400px);
  opacity: 0.06;
  z-index: -1;
}

.auth-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.auth-logo {
  width: 60px;
  height: 60px;
  margin-bottom: 0.5rem;
}

.auth-card h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #ffd200;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.auth-input::placeholder {
  color: #666;
}

.auth-input:focus {
  border-color: #f7971e;
}

.auth-error {
  color: #ff6b6b;
  font-size: 0.85rem;
  min-height: 1.2rem;
  margin-bottom: 0.5rem;
}

.auth-submit {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #f7971e, #ffd200);
  color: #0a0a0f;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.auth-submit:hover {
  opacity: 0.9;
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-toggle {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #888;
}

.btn-link {
  background: none;
  border: none;
  color: #f7971e;
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
}

.btn-link:hover {
  color: #ffd200;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .user-corner {
    top: 0.75rem;
    right: 0.75rem;
  }

  .user-greeting {
    display: none;
  }
}
