/* Modern Tech Design System - Light Mode */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafe;
  --bg-accent-flight: #e0e7ff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent-primary: #2563eb;
  /* Electric Blue */
  --accent-secondary: #06b6d4;
  /* Cyan */
  --border-subtle: #e2e8f0;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Background Pattern - Modern Grid */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  background-image:
    linear-gradient(to right, #f1f5f9 1px, transparent 1px),
    linear-gradient(to bottom, #f1f5f9 1px, transparent 1px);
  background-size: 40px 40px;
  /* MASK IMAGE will be handled by JS for the cursor tracking effect */
  mask-image: linear-gradient(to bottom, black 100%, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 100%, black 100%);
  pointer-events: none;
  opacity: 0;
  /* Hidden by default until JS kicks in */
  transition: opacity 0.5s ease;
}

.bg-grid.active {
  opacity: 1;
}

/* Particles Background */
#particles-js {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

/* Typography & Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  z-index: 100;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1.5rem;
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  text-decoration: none;
}

.logo span {
  color: var(--accent-primary);
}

/* Hero Section */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  position: relative;
}

.hero-content h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.btn-primary {
  display: inline-block;
  background: var(--accent-primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
  background: #1d4ed8;
}

/* Green Button */
.btn-green {
  display: inline-block;
  background: #22c55e;
  color: white;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.3);
}

.btn-green:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(34, 197, 94, 0.4);
  background: #16a34a;
}

.btn-green:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-green.btn-full {
  width: 100%;
  text-align: center;
}

/* Portal Layout */
.portal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

.portal-sidebar {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  position: sticky;
  top: 100px;
}

.sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-games {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar-game {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-game:hover:not(.disabled) {
  background: var(--bg-secondary);
}

.sidebar-game.active {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.sidebar-game.active .sidebar-game-name {
  color: #16a34a;
  font-weight: 600;
}

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

.sidebar-game-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.sidebar-game-name {
  font-size: 0.9rem;
  font-weight: 500;
  flex: 1;
}

.sidebar-game-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
}

.portal-main {
  min-width: 0;
}

/* Responsive Portal Layout */
@media (max-width: 900px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
    display: flex;
    flex-direction: column;
  }

  .sidebar-games {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-game {
    flex: 0 0 auto;
  }

  .sidebar-game-badge {
    display: none;
  }
}

/* Feature Marquee / Side Scroller */
.games-scroller-section {
  padding: 2.5rem 0 6rem;
  overflow: hidden;
  background: linear-gradient(to bottom, transparent, var(--bg-secondary));
}

.section-title {
  text-align: center;
  margin-bottom: 1.75rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  font-weight: 600;
}

.section-title .subtitle {
  display: block;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  opacity: 0.8;
  letter-spacing: 0.05em;
  text-transform: none;
  /* Keep natural case for subtitle */
}

.scroller-wrapper {
  display: flex;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.scroller-track {
  display: flex;
  gap: 2rem;
  padding: 1rem 0;
  /* 
     With 3 sets of items, we want to scroll 1/3 of the total width 
     to create a perfect loop.
     (Assuming 3 sets: Set 1 moves out, Set 2 takes its place)
  */
  animation: scroll 40s linear infinite;
  width: max-content;
}

.scroller-track:hover {
  animation-play-state: paused;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  /* Move left by 1/3 of the total width (since we will have 3 sets) */
  100% {
    transform: translateX(-33.333%);
  }
}

/* Game Cards */
.game-card {
  width: 250px;
  height: 180px;
  background: white;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  gap: 1rem;

  /* Gray out by default */
  filter: grayscale(100%);
  opacity: 0.6;
}

/* Exception: Minecraft Java is always colored */
.game-card.highlight {
  filter: grayscale(0%);
  opacity: 1;
  border-color: #4ade80;
  background: #f0fdf4;
}

.game-card:hover {
  transform: translateY(-5px);
  /* On hover, bring color back */
  filter: grayscale(0%);
  opacity: 1;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
}

.game-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: grayscale(10%);
  transition: all 0.3s ease;
}

.game-card:hover .game-logo {
  filter: grayscale(0%);
  transform: scale(1.1);
}

.game-card span {
  font-weight: 700;
  color: var(--text-primary);
  z-index: 2;
  font-size: 1rem;
}

/* Tech Decor element on cards */
.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-card:hover::before {
  opacity: 1;
}

/* ============================================================================
   Auth Modal Styles
   ============================================================================ */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
}

/* Auth Forms */
.auth-form h2 {
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.auth-form .form-group {
  margin-bottom: 1rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.auth-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-form button[type="submit"] {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-switch {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-error {
  color: #dc2626;
  background: #fef2f2;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
  border: 1px solid #fecaca;
}

.auth-success {
  color: #166534;
  background: #f0fdf4;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
  border: 1px solid #bbf7d0;
}

/* ============================================================================
   Navigation Auth Area
   ============================================================================ */

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 40px;
}

/* Hide auth section until JS determines state - prevents flash */
.nav-links.auth-loading {
  opacity: 0;
}

.nav-links.auth-ready {
  opacity: 1;
  transition: opacity 0.15s ease;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

/* User Dropdown Menu */
.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-menu-trigger:hover {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.user-menu-trigger.open {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
}

.user-email {
  color: #22c55e;
  font-size: 0.9rem;
  font-weight: 600;
}

.user-menu-arrow {
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.user-menu-trigger.open .user-menu-arrow {
  transform: rotate(180deg);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.user-menu-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  text-decoration: none;
}

.user-menu-item:hover {
  background: var(--bg-accent-flight);
  color: var(--accent-primary);
}

.user-menu-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.user-menu-item:hover svg {
  opacity: 1;
}

/* Divider for menu sections (for future use) */
.user-menu-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.5rem 0;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--accent-primary);
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--accent-primary);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--accent-primary);
  color: white;
}

/* Nav Login Button - Dark Gray */
.btn-login {
  display: inline-block;
  background: #374151;
  color: white;
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-login:hover {
  background: #1f2937;
}

/* Nav Sign Up Button - Green */
.btn-signup {
  display: inline-block;
  background: #22c55e;
  color: white;
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-signup:hover {
  background: #16a34a;
}

/* ============================================================================
   Generation Section
   ============================================================================ */

#generation-section {
  padding: 4rem 0 6rem;
  background: var(--bg-secondary);
}

#generation-section .section-title {
  font-size: 1.75rem;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.generation-form {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 1rem;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

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

@media (max-width: 500px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.btn-large {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  border: none;
  cursor: pointer;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============================================================================
   Generation Status
   ============================================================================ */

.generation-status {
  max-width: 600px;
  margin: 2rem auto 0;
  padding: 1.5rem;
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
}

.status-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#status-message {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Progress Steps */
.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.progress-step.pending {
  opacity: 0.5;
}

.progress-step.active {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.progress-step.completed {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.step-indicator {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-spinner {
  animation: spin 1s linear infinite;
  color: var(--accent-primary);
}

.progress-step.pending .step-spinner {
  color: var(--text-secondary);
  opacity: 0.5;
}

.step-check {
  color: #22c55e;
}

.step-text {
  font-weight: 500;
  color: var(--text-secondary);
}

.progress-step.active .step-text {
  color: var(--accent-primary);
  font-weight: 600;
}

.progress-step.completed .step-text {
  color: #22c55e;
}

/* Generation Result */
.generation-result {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.generation-result h3 {
  color: #166534;
  margin-bottom: 0.5rem;
}

#result-pack-name {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.result-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  letter-spacing: 0.05em;
}

.report-details {
  margin-top: 1.5rem;
}

.report-details summary {
  cursor: pointer;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.report-details pre {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
}

/* Generation Error */
.generation-error {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
}

/* ============================================================================
   Utility Classes
   ============================================================================ */

.hidden {
  display: none !important;
}

/* Config Warning (shown when Supabase not configured) */
.config-warning {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  max-width: 90%;
  text-align: center;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.config-warning code {
  background: rgba(0,0,0,0.1);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
}

/* ============================================================================
   Auth Pages (Login / Signup)
   ============================================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.auth-page .auth-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 100%;
  margin: 0 auto;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: block;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: 2rem;
  letter-spacing: -0.03em;
}

.auth-card {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.auth-card .form-group {
  margin-bottom: 1.25rem;
}

.auth-card label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.auth-card input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: white;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-card .btn-primary {
  margin-top: 0.5rem;
}

.auth-card .btn-loading {
  display: inline-block;
}

/* Responsive */
@media (max-width: 480px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-card {
    padding: 1.5rem;
  }
}

/* ============================================================================
   Install Page
   ============================================================================ */

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step-image {
  margin-top: 0.75rem;
  border: 1px dashed var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  font-size: 0.85rem;
}

/* ============================================================================
   Footer
   ============================================================================ */

.site-footer {
  margin-top: auto;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-subtle);
  background: linear-gradient(to bottom, rgba(248, 250, 254, 0.7), var(--bg-secondary));
}

.footer-content {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem;
  align-items: center;
}

.footer-brand p {
  margin-top: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 420px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.footer-links-primary,
.footer-links-auth {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
}

.footer-links-auth {
  margin-top: 0.35rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

@media (max-width: 720px) {
  .footer-content {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
