/* ═══════════════════════════════════════════════════════════════
   XFactorAI Dashboard - Styles
   Theme system synced across all apps
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   CSS VARIABLES - THEME SYSTEM
   ═══════════════════════════════════════════════════════════════ */

/* Midnight Theme (Dark - Default) */
:root,
[data-theme="midnight"] {
  --bg: #0b1221;
  --bg-alt: #101827;
  --surface: #1a2436;
  --panel: #1a2332;
  --panel-light: #293548;
  --toolbar-bg: rgba(11, 18, 33, 0.85);
  --ink: #f8fafc;
  --ink-secondary: #94a3b8;
  --ink-muted: #64748b;
  --muted: #64748b;
  --line: #334155;
  --line-soft: #1e293b;
  --border: rgba(255, 255, 255, 0.06);
  --accent: #10b981;
  --accent-secondary: #059669;
  --accent-glow: rgba(16, 185, 129, 0.15);
  --cyan: #06b6d4;
  --teal: #10b981;
  --orange: #f97316;
  --gold: #E9C46A;
  --glow: 0 18px 44px rgba(0,0,0,0.4);
  --blue-500: #10b981;
  --blue-600: #059669;
  --hero-gradient: radial-gradient(ellipse at 20% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(249, 115, 22, 0.15) 0%, transparent 50%);
}

/* Cream Theme (Light) */
[data-theme="cream"] {
  --bg: #fdfbf7;
  --bg-alt: #f8f5f0;
  --surface: #ffffff;
  --panel: #ffffff;
  --panel-light: #f0ebe3;
  --toolbar-bg: rgba(255, 255, 255, 0.9);
  --ink: #1a1a1a;
  --ink-secondary: #4a4a4a;
  --ink-muted: #7a7a7a;
  --muted: #7a7a7a;
  --line: #e5e0d8;
  --line-soft: #f0ebe3;
  --border: #d4cfc4;
  --accent: #d97706;
  --accent-secondary: #b45309;
  --accent-glow: rgba(217, 119, 6, 0.1);
  --cyan: #0891b2;
  --teal: #0d9488;
  --glow: 0 18px 44px rgba(0,0,0,0.08);
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --hero-gradient: radial-gradient(ellipse at 20% 30%, rgba(217, 119, 6, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(180, 83, 9, 0.08) 0%, transparent 50%);
}

/* Ocean Breeze Theme (Light) */
[data-theme="ocean"] {
  --bg: #f0f9ff;
  --bg-alt: #e0f2fe;
  --surface: #ffffff;
  --panel: #ffffff;
  --panel-light: #e0f2fe;
  --toolbar-bg: rgba(255, 255, 255, 0.9);
  --ink: #0c4a6e;
  --ink-secondary: #075985;
  --ink-muted: #0369a1;
  --muted: #0369a1;
  --line: #bae6fd;
  --line-soft: #e0f2fe;
  --border: #bae6fd;
  --accent: #0284c7;
  --accent-secondary: #0369a1;
  --accent-glow: rgba(2, 132, 199, 0.1);
  --cyan: #0284c7;
  --teal: #0d9488;
  --glow: 0 18px 44px rgba(0,0,0,0.08);
  --blue-500: #0ea5e9;
  --blue-600: #0284c7;
  --hero-gradient: radial-gradient(ellipse at 30% 20%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%);
}

/* Tanzanite Theme (Dark) */
[data-theme="tanzanite"] {
  --bg: #0f0d1a;
  --bg-alt: #1a1625;
  --surface: #252136;
  --panel: #1e1a2e;
  --panel-light: #352f4a;
  --toolbar-bg: rgba(15, 13, 26, 0.85);
  --ink: #e8e4f0;
  --ink-secondary: #c4bdd4;
  --ink-muted: #8b82a8;
  --muted: #8b82a8;
  --line: #3d3654;
  --line-soft: #2a2440;
  --border: #3d3654;
  --accent: #a78bfa;
  --accent-secondary: #8b5cf6;
  --accent-glow: rgba(167, 139, 250, 0.15);
  --cyan: #a78bfa;
  --teal: #8b5cf6;
  --glow: 0 18px 44px rgba(0,0,0,0.4);
  --blue-500: #a78bfa;
  --blue-600: #8b5cf6;
  --hero-gradient: radial-gradient(ellipse at 25% 25%, rgba(167, 139, 250, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 75%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
}

/* Obsidian Theme (Dark) */
[data-theme="obsidian"] {
  --bg: #09090b;
  --bg-alt: #18181b;
  --surface: #27272a;
  --panel: #1c1c1f;
  --panel-light: #3f3f46;
  --toolbar-bg: rgba(9, 9, 11, 0.85);
  --ink: #fafafa;
  --ink-secondary: #d4d4d8;
  --ink-muted: #71717a;
  --muted: #71717a;
  --line: #3f3f46;
  --line-soft: #27272a;
  --border: #3f3f46;
  --accent: #f59e0b;
  --accent-secondary: #d97706;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --cyan: #f59e0b;
  --teal: #d97706;
  --glow: 0 18px 44px rgba(0,0,0,0.4);
  --blue-500: #f59e0b;
  --blue-600: #d97706;
  --hero-gradient: radial-gradient(ellipse at 20% 30%, rgba(245, 158, 11, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(217, 119, 6, 0.12) 0%, transparent 50%);
}
}

/* ═══════════════════════════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════════════════════════ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════
   UNIFIED TOOLBAR STYLES
   ═══════════════════════════════════════════════════════════════ */

.app-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.app-toolbar.active {
  display: flex;
}

body.toolbar-active {
  padding-top: 56px;
}

/* Toolbar Sections */
.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Toolbar Buttons */
.toolbar-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.toolbar-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.toolbar-btn:hover {
  border-color: var(--cyan);
}

.toolbar-btn:active {
  transform: scale(0.95);
}

/* Toolbar Logo */
.toolbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-logo .logo-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.toolbar-logo .logo-text {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--ink);
}

@media (max-width: 600px) {
  .toolbar-logo .logo-text {
    display: none;
  }
}

/* Theme Selector */
.theme-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-label {
  display: flex;
  align-items: center;
  color: var(--muted);
}

.theme-label svg {
  width: 18px;
  height: 18px;
}

.theme-selector select {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 32px 8px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.theme-selector select:hover {
  border-color: var(--cyan);
}

.theme-selector select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

@media (max-width: 768px) {
  .theme-selector select {
    padding: 6px 28px 6px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .theme-selector {
    display: none;
  }
}

/* Profile Button & Dropdown */
.toolbar-profile {
  position: relative;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-btn:hover {
  background: var(--surface);
  border-color: var(--muted);
}

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: #050811;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-chevron {
  color: var(--muted);
  transition: transform 0.2s ease;
}

.toolbar-profile.open .profile-chevron {
  transform: rotate(180deg);
}

@media (max-width: 600px) {
  .profile-name {
    display: none;
  }
  .profile-btn {
    padding: 6px;
    border-radius: 50%;
  }
  .profile-chevron {
    display: none;
  }
}

/* Profile Dropdown */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transform-origin: top right;
  transition: all 0.2s ease;
  z-index: 1001;
}

.toolbar-profile.open .profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: #050811;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-user-details {
  flex: 1;
  min-width: 0;
}

.dropdown-user-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-email {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-plan {
  font-size: 0.7rem;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--surface);
}

.dropdown-item:last-child {
  border-radius: 0 0 12px 12px;
}

.dropdown-item svg {
  color: var(--muted);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   APP LAUNCHER STYLES
   ═══════════════════════════════════════════════════════════════ */

.app-launcher-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 998;
}

.app-launcher-overlay.active {
  opacity: 1;
  visibility: visible;
}

.app-launcher {
  position: fixed;
  top: 64px;
  left: 16px;
  width: 320px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9) translateY(-10px);
  transform-origin: top left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  overflow: hidden;
}

.app-launcher.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.app-launcher-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.app-launcher-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px;
}

.app-launcher-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: var(--ink);
}

.app-launcher-item:hover {
  background: var(--surface);
  border-color: var(--border);
}

.app-launcher-item.current {
  background: var(--surface);
  border-color: var(--cyan);
}

.app-launcher-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--panel-light), var(--panel));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  transition: all 0.2s ease;
}

.app-emoji {
  font-size: 1.5rem;
  line-height: 1;
}

.app-launcher-item:hover .app-launcher-icon {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.app-launcher-label {
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  color: var(--ink);
  line-height: 1.3;
}

@media (max-width: 400px) {
  .app-launcher {
    left: 8px;
    right: 8px;
    width: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */

.main {
  flex: 1;
  padding: 48px 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */

.hero {
  text-align: center;
  padding: 7rem 2rem 6rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--hero-gradient);
  pointer-events: none;
  opacity: 0.5;
}

.hero-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-logo {
  margin-bottom: 48px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
  height: 60px;
}

.hero-logo img {
  height: 60px;
  width: auto;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Default: show light logo (for dark themes) */
.hero-logo .logo-dark {
  opacity: 0;
  visibility: hidden;
}

.hero-logo .logo-light {
  opacity: 1;
  visibility: visible;
}

/* Light themes show dark logo */
[data-theme="cream"] .hero-logo .logo-dark,
[data-theme="ocean"] .hero-logo .logo-dark {
  opacity: 1;
  visibility: visible;
}

[data-theme="cream"] .hero-logo .logo-light,
[data-theme="ocean"] .hero-logo .logo-light {
  opacity: 0;
  visibility: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(20,184,166,0.1));
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 12px;
  animation: pulse-glow 2s ease-in-out infinite !important;
  position: relative;
  z-index: 1;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(6,182,212,0.3); }
  50% { box-shadow: 0 0 20px 4px rgba(6,182,212,0.15); }
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-shadow: 0 0 80px rgba(233, 196, 106, 0.4), 0 0 150px rgba(233, 196, 106, 0.2);
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--ink-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════
   APP CARDS GRID
   ═══════════════════════════════════════════════════════════════ */

.apps-section {
  max-width: 1200px;
  margin: 4rem auto 0;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.app-card {
  background: var(--surface);
  border-radius: 10px;
  padding: 1.75rem;
  border: 1px solid var(--line);
  display: flex;
  gap: 1.25rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.app-card:hover::before {
  opacity: 1;
}

.app-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.app-card:hover .app-cta {
  color: var(--accent);
}

.app-icon {
  width: 48px;
  height: 48px;
  background: var(--panel);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform 0.3s;
}

.app-emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.app-card:hover .app-icon {
  transform: scale(1.1) rotate(5deg);
}

.app-content {
  flex: 1;
  position: relative;
  z-index: 1;
  text-align: left;
}

.app-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.app-badge {
  display: inline-block;
  font-size: 0.6rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.app-badge.popular {
  background: var(--accent);
  color: var(--surface);
}

.app-badge.coming {
  background: var(--line);
  color: var(--ink-muted);
}

.app-tagline {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.app-description {
  font-size: 0.85rem;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.app-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.app-card:hover .app-cta {
  color: var(--accent);
}

.app-cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.app-card:hover .app-cta svg {
  transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════════════
   ABOUT SECTION
   ═══════════════════════════════════════════════════════════════ */

.about {
  text-align: center;
  padding: 48px;
  background: var(--panel);
  border-radius: 20px;
  border: 1px solid var(--line);
  margin-bottom: 64px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--ink);
}

.about-text {
  font-size: 1rem;
  color: var(--ink-secondary);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ═══════════════════════════════════════════════════════════════
   FEATURES SECTION
   ═══════════════════════════════════════════════════════════════ */

.features {
  margin-bottom: 48px;
}

.features .section-title {
  text-align: center;
  margin-bottom: 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.feature {
  text-align: center;
  padding: 24px;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  transition: all 0.25s ease;
}

.feature:hover {
  border-color: var(--line);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  background: var(--accent-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

.feature-text {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

.footer {
  padding: 24px 16px 40px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.ai-disclaimer {
  background: linear-gradient(145deg, rgba(255, 184, 0, 0.08) 0%, rgba(255, 184, 0, 0.03) 100%);
  border: 1px solid rgba(255, 184, 0, 0.15);
  border-radius: 16px;
  padding: 18px;
  margin: 0 auto 24px;
  max-width: 800px;
}

.ai-disclaimer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #FFB800;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ai-disclaimer-text {
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-link:hover {
  color: var(--cyan);
}

.footer-copyright {
  text-align: center;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .header {
    padding: 12px 16px;
  }
  
  .header-content {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .logo-text {
    font-size: 1.125rem;
  }
  
  .theme-selector select {
    font-size: 0.813rem;
    padding: 6px 28px 6px 10px;
  }
  
  .main {
    padding: 32px 16px;
  }
  
  .hero {
    margin-bottom: 48px;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .apps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .app-card {
    padding: 24px;
  }
  
  .about {
    padding: 32px 24px;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .feature {
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .header-content {
    justify-content: center;
  }
  
  .header-left {
    width: 100%;
    justify-content: center;
  }
  
  .header-right {
    width: 100%;
    justify-content: center;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  animation: fadeInUp 0.6s ease-out;
}

.app-card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.app-card:nth-child(1) { animation-delay: 0.1s; }
.app-card:nth-child(2) { animation-delay: 0.2s; }
.app-card:nth-child(3) { animation-delay: 0.3s; }
.app-card:nth-child(4) { animation-delay: 0.4s; }

.about {
  animation: fadeInUp 0.6s ease-out 0.5s backwards;
}

.features {
  animation: fadeInUp 0.6s ease-out 0.6s backwards;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   FOCUS STATES (Accessibility)
   ═══════════════════════════════════════════════════════════════ */

.app-card:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-card:focus:not(:focus-visible) {
  outline: none;
}

.app-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   AUTHENTICATION CONTAINER
   ═══════════════════════════════════════════════════════════════ */

.auth-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
  z-index: 9999;
}

.auth-container.hidden {
  display: none;
}

.auth-box {
  background: var(--panel);
  border-radius: 20px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--glow);
}

.auth-box .logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 16px;
}

.auth-logo {
  height: 48px;
  width: auto;
  max-width: 100%;
  margin-bottom: 16px;
}

.auth-box .logo-fallback {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: #050811;
}

.logo-img {
  height: 48px;
  width: auto;
}

.footer-logo-img {
  height: 24px;
  width: auto;
}

.auth-box h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-box .subtitle {
  color: var(--muted);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

.auth-box h2,
.auth-panel h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--ink);
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  text-align: center;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin-bottom: 24px;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-secondary);
}

.form-group input {
  padding: 10px 14px;
  background: var(--panel-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-group input::placeholder {
  color: var(--muted);
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input,
.password-wrapper .form-input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--cyan);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--panel-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-input::placeholder {
  color: var(--muted);
}

.auth-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-btn.primary {
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: #050811;
}

.auth-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.4);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.google-btn,
.google-signin-btn {
  width: 100%;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.google-btn:hover,
.google-signin-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--cyan);
}

.google-icon {
  width: 20px;
  height: 20px;
}

.auth-footer {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-footer button {
  background: none;
  border: none;
  color: var(--cyan);
  cursor: pointer;
  font-size: inherit;
  font-weight: 600;
  text-decoration: none;
}

.auth-footer button:hover {
  text-decoration: underline;
}

.auth-toggle {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-toggle a,
.auth-toggle button {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
}

.auth-toggle a:hover,
.auth-toggle button:hover {
  text-decoration: underline;
}

.auth-panel#loginPanel {
  display: block;
}

.auth-panel#signupPanel {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   USER PROFILE IN HEADER
   ═══════════════════════════════════════════════════════════════ */

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

.logout-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: var(--surface);
  border-color: var(--ink-muted);
  color: var(--ink);
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD CONTAINER
   ═══════════════════════════════════════════════════════════════ */

.dashboard-container {
  display: none;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════
   AUTH RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .auth-box {
    padding: 24px;
    border-radius: 12px;
  }
  
  .auth-logo .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  
  .auth-logo .logo-text {
    font-size: 1.25rem;
  }
  
  .auth-title {
    font-size: 1.25rem;
  }
  
  .user-profile {
    gap: 8px;
  }
  
  .user-name {
    display: none;
  }
}
