/* ═══════════════════════════════════════════════════════════════
   AETHERIS — AI Content Studio
   Premium Dark Theme Design System
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Brand Palette */
  --brand-50: hsl(245, 90%, 96%);
  --brand-100: hsl(245, 85%, 90%);
  --brand-200: hsl(245, 80%, 80%);
  --brand-300: hsl(245, 75%, 70%);
  --brand-400: hsl(245, 70%, 62%);
  --brand-500: hsl(245, 65%, 55%);
  --brand-600: hsl(245, 60%, 48%);

  /* Surface Palette (Dark) */
  --surface-base: hsl(230, 22%, 7%);
  --surface-0: hsl(230, 20%, 9%);
  --surface-1: hsl(230, 18%, 12%);
  --surface-2: hsl(230, 16%, 15%);
  --surface-3: hsl(230, 14%, 19%);
  --surface-4: hsl(230, 12%, 23%);

  /* Text */
  --text-primary: hsl(220, 20%, 96%);
  --text-secondary: hsl(220, 14%, 65%);
  --text-tertiary: hsl(220, 10%, 45%);
  --text-inverse: hsl(230, 20%, 8%);

  /* Accent */
  --accent-gradient: linear-gradient(135deg, hsl(245, 70%, 62%), hsl(280, 65%, 60%), hsl(320, 60%, 55%));
  --accent-glow: 0 0 30px hsla(245, 70%, 62%, 0.3), 0 0 60px hsla(280, 65%, 60%, 0.15);

  /* Status */
  --success: hsl(155, 65%, 48%);
  --warning: hsl(40, 90%, 55%);
  --error: hsl(0, 75%, 55%);

  /* Glass v2 */
  --glass-bg: hsla(230, 20%, 13%, 0.55);
  --glass-bg-hover: hsla(230, 20%, 16%, 0.7);
  --glass-border: hsla(230, 25%, 32%, 0.35);
  --glass-border-hover: hsla(245, 50%, 55%, 0.3);
  --glass-blur: 24px;
  --noise-opacity: 0.03;

  /* Aurora */
  --aurora-1: hsla(245, 80%, 55%, 0.12);
  --aurora-2: hsla(280, 70%, 50%, 0.08);
  --aurora-3: hsla(320, 65%, 50%, 0.06);

  /* Shadows */
  --shadow-sm: 0 1px 3px hsla(0, 0%, 0%, 0.3), 0 1px 2px hsla(0, 0%, 0%, 0.2);
  --shadow-md: 0 4px 16px hsla(0, 0%, 0%, 0.35), 0 2px 4px hsla(0, 0%, 0%, 0.25);
  --shadow-lg: 0 12px 40px hsla(0, 0%, 0%, 0.4), 0 4px 12px hsla(0, 0%, 0%, 0.3);
  --shadow-xl: 0 24px 60px hsla(0, 0%, 0%, 0.5), 0 8px 20px hsla(0, 0%, 0%, 0.35);
  --shadow-glow: 0 0 40px hsla(245, 70%, 50%, 0.08);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --duration-page: 350ms;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--surface-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--surface-4);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Selection */
::selection {
  background: hsla(245, 70%, 62%, 0.3);
  color: var(--text-primary);
}

/* ── App Shell ────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ── Ambient Aurora Background (App) ─────────────────────────── */
.app-shell::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -30%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--aurora-1), transparent 70%);
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  animation: auroraFloat1 20s ease-in-out infinite alternate;
}

.app-shell::after {
  content: '';
  position: fixed;
  bottom: -40%;
  right: -20%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--aurora-2), transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  animation: auroraFloat2 25s ease-in-out infinite alternate;
}

@keyframes auroraFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 60px) scale(1.15); }
  100% { transform: translate(-40px, 30px) scale(1.05); }
}

@keyframes auroraFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, -40px) scale(1.2); }
  100% { transform: translate(30px, -20px) scale(1.08); }
}

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
  width: 260px;
  background: hsla(230, 20%, 9%, 0.85);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
  transition: transform var(--duration-slow) var(--ease-out);
}

/* Noise texture overlay on sidebar */
.sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: var(--noise-opacity);
}

.sidebar-header {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.sidebar-nav {
  padding: 0 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-align: left;
}

.nav-btn:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

.nav-btn.active {
  background: linear-gradient(135deg, hsla(245, 70%, 55%, 0.12), hsla(280, 60%, 50%, 0.06));
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 0 20px hsla(245, 70%, 55%, 0.06);
}

.nav-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--accent-gradient);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 12px hsla(245, 70%, 62%, 0.5), 0 0 24px hsla(245, 70%, 62%, 0.2);
  animation: navGlow 2s ease-in-out infinite;
}

@keyframes navGlow {
  0%, 100% { box-shadow: 0 0 12px hsla(245, 70%, 62%, 0.5), 0 0 24px hsla(245, 70%, 62%, 0.2); }
  50% { box-shadow: 0 0 18px hsla(245, 70%, 62%, 0.7), 0 0 36px hsla(280, 65%, 60%, 0.3); }
}

.nav-btn.active .nav-btn-icon,
.nav-btn.active svg {
  filter: drop-shadow(0 0 6px hsla(245, 70%, 62%, 0.4));
}

.nav-btn {
  position: relative;
}

.nav-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--glass-border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface-1);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-plan {
  font-size: 0.688rem;
  color: var(--text-tertiary);
}

/* ── Main Content Area ────────────────────────────────────────── */
.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.top-bar {
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  background: hsla(230, 20%, 9%, 0.75);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  position: sticky;
  top: 0;
  z-index: 20;
}

/* Animated gradient bottom border */
.top-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsla(245, 70%, 62%, 0.3), hsla(280, 65%, 60%, 0.2), hsla(320, 60%, 55%, 0.15), transparent);
  background-size: 200% 100%;
  animation: shimmerBorder 4s linear infinite;
}

@keyframes shimmerBorder {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-logo {
  display: none;
}

.view-title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--text-tertiary);
}

.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 6px hsla(155, 65%, 48%, 0.5);
}

.view-container {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ── Glass Card v2 — Layered Depth + Noise + Shimmer ─────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transition: box-shadow var(--duration-base) var(--ease-out),
    transform var(--duration-base) var(--ease-out),
    border-color var(--duration-base) ease,
    background var(--duration-base) ease;
  position: relative;
  overflow: hidden;
}

/* Noise texture on glass */
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: var(--noise-opacity);
  border-radius: inherit;
}

.glass-card:hover {
  box-shadow: var(--shadow-lg), 0 0 50px hsla(245, 70%, 50%, 0.06);
  border-color: var(--glass-border-hover);
  background: var(--glass-bg-hover);
}

/* ── Form Elements ────────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-textarea {
  width: 100%;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.6;
  resize: vertical;
  min-height: 100px;
  transition: border-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
  outline: none;
}

.form-textarea:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px hsla(245, 70%, 62%, 0.15);
}

.form-textarea::placeholder {
  color: var(--text-tertiary);
}

.char-counter {
  text-align: right;
  font-size: 0.688rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.form-select {
  width: 100%;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  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='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--duration-fast) ease;
}

.form-select:focus {
  border-color: var(--brand-400);
}

.form-select option {
  background: var(--surface-1);
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
}

.form-input:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px hsla(245, 70%, 62%, 0.15);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

/* ── Toggle Switch ────────────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.toggle-label {
  font-size: 0.813rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--duration-fast) ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: white;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--brand-500);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(18px);
}

/* ── Dimension Pills ──────────────────────────────────────────── */
.dimension-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dimension-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.dimension-pill:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
}

.dimension-pill.active {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: white;
}

/* ── Style Preset Pills ──────────────────────────────────────── */
.style-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.style-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.style-pill:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
}

.style-pill.active {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: white;
}

/* ── Num Images Selector ──────────────────────────────────────── */
.num-group {
  display: flex;
  gap: 8px;
}

.num-pill {
  width: 40px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.813rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
}

.num-pill:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
}

.num-pill.active {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: white;
}

/* ── Collapsible Advanced ─────────────────────────────────────── */
.advanced-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border: none;
  background: none;
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color var(--duration-fast) ease;
  width: 100%;
}

.advanced-toggle:hover {
  color: var(--text-secondary);
}

.advanced-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform var(--duration-fast) var(--ease-out);
}

.advanced-toggle.open svg {
  transform: rotate(180deg);
}

.advanced-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-slow) var(--ease-out);
}

.advanced-panel.open {
  max-height: 500px;
}

/* ── Generate Button ──────────────────────────────────────────── */
.btn-generate {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, hsl(245, 70%, 62%), hsl(280, 65%, 60%), hsl(320, 60%, 55%), hsl(245, 70%, 62%));
  background-size: 300% 300%;
  animation: gradientShift 4s ease infinite;
  color: white;
  font-family: inherit;
  font-size: 0.938rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-base) ease,
    opacity var(--duration-fast) ease;
  box-shadow: var(--accent-glow);
  position: relative;
  overflow: hidden;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.btn-generate::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, hsla(0, 0%, 100%, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-generate:hover::after {
  transform: translateX(100%);
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px hsla(245, 70%, 62%, 0.4), 0 0 80px hsla(280, 65%, 60%, 0.2);
}

.btn-generate:active {
  transform: scale(0.97);
}

.btn-generate:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  animation: none;
}

.btn-generate:disabled::after {
  display: none;
}

.btn-generate svg {
  width: 20px;
  height: 20px;
}

/* ── Create Layout ────────────────────────────────────────────── */
.create-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

.create-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-section {
  padding: 20px;
}

.control-section .form-group {
  margin-bottom: 16px;
}

.control-section .form-group:last-child {
  margin-bottom: 0;
}

.section-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 4px 0;
}

/* ── Result Area ──────────────────────────────────────────────── */
.result-area {
  position: sticky;
  top: 88px;
}

.result-placeholder {
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  border: 2px dashed var(--surface-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  color: var(--text-tertiary);
  transition: border-color var(--duration-base) ease;
  position: relative;
  overflow: hidden;
}

/* Subtle ambient glow */
.result-placeholder::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(245, 70%, 50%, 0.06), transparent 70%);
  animation: floatGlow 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatGlow {

  0%,
  100% {
    transform: translate(-30px, -20px) scale(1);
  }

  33% {
    transform: translate(40px, 20px) scale(1.2);
  }

  66% {
    transform: translate(-10px, 40px) scale(0.9);
  }
}

.result-placeholder svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.result-placeholder p {
  font-size: 0.875rem;
  font-weight: 500;
}

.result-placeholder .sub {
  font-size: 0.75rem;
  margin-top: 4px;
  color: var(--text-tertiary);
}

/* ── Loading State ────────────────────────────────────────────── */
.result-loading {
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      var(--surface-2) 0%,
      hsla(245, 30%, 18%, 0.8) 25%,
      var(--surface-2) 50%,
      hsla(280, 30%, 18%, 0.8) 75%,
      var(--surface-2) 100%);
  background-size: 400% 400%;
  animation: auroraShimmer 3s ease infinite;
}

/* Orbiting gradient ring */
.result-loading::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-xl);
  background: conic-gradient(from var(--loading-angle, 0deg),
      transparent 0%,
      hsla(245, 80%, 65%, 0.6) 10%,
      hsla(280, 70%, 60%, 0.4) 20%,
      transparent 30%,
      transparent 70%,
      hsla(320, 65%, 55%, 0.4) 80%,
      hsla(245, 80%, 65%, 0.6) 90%,
      transparent 100%);
  animation: rotateGlow 3s linear infinite;
  z-index: -1;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  padding: 2px;
}

@keyframes auroraShimmer {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes rotateGlow {
  from {
    --loading-angle: 0deg;
  }

  to {
    --loading-angle: 360deg;
  }
}

@property --loading-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.loading-pill {
  position: relative;
  z-index: 1;
  background: var(--surface-0);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg), 0 0 40px hsla(245, 70%, 50%, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.813rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid hsla(245, 50%, 60%, 0.2);
  animation: pillPulse 2s ease-in-out infinite;
}

@keyframes pillPulse {

  0%,
  100% {
    box-shadow: var(--shadow-lg), 0 0 40px hsla(245, 70%, 50%, 0.15);
  }

  50% {
    box-shadow: var(--shadow-lg), 0 0 60px hsla(245, 70%, 50%, 0.25), 0 0 100px hsla(280, 65%, 60%, 0.1);
  }
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid hsla(245, 50%, 50%, 0.2);
  border-top-color: var(--brand-400);
  border-right-color: hsla(280, 65%, 60%, 0.6);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Result Display (Generated Image) ─────────────────────────── */
.result-display {
  position: relative;
  animation: resultReveal 0.6s var(--ease-out) both;
}

@keyframes resultReveal {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.result-images-grid {
  display: grid;
  gap: 12px;
}

.result-images-grid.cols-1 {
  grid-template-columns: 1fr;
}

.result-images-grid.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.result-image-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-xl);
  animation: imageEntrance 0.5s var(--ease-spring) both;
}

.result-image-wrap:nth-child(1) {
  animation-delay: 0ms;
}

.result-image-wrap:nth-child(2) {
  animation-delay: 100ms;
}

.result-image-wrap:nth-child(3) {
  animation-delay: 200ms;
}

.result-image-wrap:nth-child(4) {
  animation-delay: 300ms;
}

@keyframes imageEntrance {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(16px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Glow border on hover */
.result-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  border: 2px solid transparent;
  transition: border-color var(--duration-base) ease, box-shadow var(--duration-base) ease;
  pointer-events: none;
  z-index: 2;
}

.result-image-wrap:hover::after {
  border-color: hsla(245, 70%, 62%, 0.3);
  box-shadow: inset 0 0 30px hsla(245, 70%, 62%, 0.08);
}

.result-image-wrap img {
  width: 100%;
  display: block;
  border-radius: var(--radius-xl);
  transition: transform var(--duration-slow) var(--ease-out),
    filter var(--duration-base) ease;
}

.result-image-wrap:hover img {
  transform: scale(1.02);
}

.result-image-actions {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out);
}

.result-image-wrap:hover .result-image-actions {
  opacity: 1;
  transform: translateY(0);
}

.img-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: hsla(0, 0%, 0%, 0.6);
  backdrop-filter: blur(8px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-spring);
}

.img-action-btn:hover {
  background: hsla(0, 0%, 0%, 0.8);
  transform: scale(1.1);
}

.img-action-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Gallery ──────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) ease;
}

.gallery-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg), 0 0 40px hsla(245, 70%, 50%, 0.06);
  border-color: hsla(245, 50%, 60%, 0.2);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, hsla(0, 0%, 0%, 0.8) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-base) ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.gallery-card-prompt {
  font-size: 0.75rem;
  color: hsla(0, 0%, 100%, 0.9);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.gallery-card-meta {
  font-size: 0.625rem;
  color: hsla(0, 0%, 100%, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gallery-card-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
}

.gallery-card:hover .gallery-card-actions {
  opacity: 1;
}

.gallery-action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: none;
  background: hsla(0, 0%, 0%, 0.5);
  backdrop-filter: blur(8px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-spring);
}

.gallery-action-btn:hover {
  background: hsla(0, 0%, 0%, 0.7);
  transform: scale(1.1);
}

.gallery-action-btn svg {
  width: 14px;
  height: 14px;
}

.gallery-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-tertiary);
}

.gallery-empty svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  opacity: 0.3;
}

.gallery-empty h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.gallery-empty p {
  font-size: 0.875rem;
  max-width: 300px;
  margin: 0 auto 24px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.813rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--brand-400);
}

/* ── Lightbox ─────────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: hsla(230, 20%, 4%, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) ease;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
  transform: scale(0.95);
  transition: transform var(--duration-slow) var(--ease-spring);
}

.lightbox-overlay.open .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  display: block;
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: none;
  background: hsla(0, 0%, 100%, 0.1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast) ease;
}

.lightbox-close:hover {
  background: hsla(0, 0%, 100%, 0.2);
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
}

.lightbox-prompt {
  margin-top: 16px;
  font-size: 0.813rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.lightbox-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

/* ── Settings ─────────────────────────────────────────────────── */
.settings-grid {
  display: grid;
  gap: 20px;
  max-width: 600px;
}

.settings-card {
  padding: 24px;
}

.settings-card h3 {
  font-size: 0.938rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.settings-card p {
  font-size: 0.813rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--glass-border);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row-label {
  font-size: 0.813rem;
  color: var(--text-secondary);
}

.settings-row-value {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Toast v2 — Glass + Glow ──────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  transform: translateY(100px) scale(0.95);
  opacity: 0;
  transition: transform var(--duration-slow) var(--ease-spring),
    opacity var(--duration-base) ease;
  pointer-events: none;
}

.toast-container.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.toast {
  background: hsla(230, 20%, 12%, 0.85);
  border: 1px solid hsla(245, 50%, 55%, 0.2);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 30px hsla(245, 70%, 50%, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.813rem;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 200px;
}

.toast svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--brand-400);
  filter: drop-shadow(0 0 4px hsla(245, 70%, 62%, 0.5));
}

/* ── Mobile Bottom Nav — Floating Island ──────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 50;
  background: hsla(230, 22%, 10%, 0.88);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  border: 1px solid hsla(230, 25%, 30%, 0.3);
  border-radius: var(--radius-2xl);
  padding: 6px 0;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  box-shadow: 0 8px 40px hsla(0, 0%, 0%, 0.5), 0 0 30px hsla(245, 70%, 50%, 0.06);
}

.mobile-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  border-radius: var(--radius-md);
  position: relative;
}

.mobile-nav-btn:hover,
.mobile-nav-btn.active {
  color: var(--brand-400);
}

.mobile-nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand-400);
  box-shadow: 0 0 8px hsla(245, 70%, 62%, 0.6);
}

.mobile-nav-btn svg {
  width: 20px;
  height: 20px;
}

/* ── Logo Pulse Animation ─────────────────────────────────────── */
.logo-accent {
  animation: pulse-accent 3s infinite ease-in-out;
}

@keyframes pulse-accent {

  0%,
  100% {
    fill: hsl(245, 70%, 62%);
    opacity: 1;
  }

  50% {
    fill: hsl(280, 65%, 60%);
    opacity: 0.7;
  }
}

/* ── Fade-in animation ────────────────────────────────────────── */
.fade-in {
  animation: fadeIn 0.5s var(--ease-out) both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ── Page Transition System ──────────────────────────────────── */
.view-transition-out {
  animation: viewOut var(--duration-page) var(--ease-out) forwards;
}

.view-transition-in {
  animation: viewIn var(--duration-page) var(--ease-out) both;
}

@keyframes viewOut {
  from { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  to { opacity: 0; transform: translateY(-12px) scale(0.99); filter: blur(6px); }
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(12px) scale(0.99); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ── Stagger Reveal (for card groups) ────────────────────────── */
.stagger-reveal > * {
  opacity: 0;
  transform: translateY(20px);
  animation: staggerIn 0.5s var(--ease-out) both;
}
.stagger-reveal > *:nth-child(1) { animation-delay: 0ms; }
.stagger-reveal > *:nth-child(2) { animation-delay: 60ms; }
.stagger-reveal > *:nth-child(3) { animation-delay: 120ms; }
.stagger-reveal > *:nth-child(4) { animation-delay: 180ms; }
.stagger-reveal > *:nth-child(5) { animation-delay: 240ms; }
.stagger-reveal > *:nth-child(6) { animation-delay: 300ms; }
.stagger-reveal > *:nth-child(7) { animation-delay: 360ms; }
.stagger-reveal > *:nth-child(8) { animation-delay: 420ms; }

@keyframes staggerIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Breathe animation ───────────────────────────────────────── */
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* ── Typewriter cursor ───────────────────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typewriter-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--brand-400);
  font-weight: 300;
  margin-left: 2px;
}

/* ── Command Palette Overlay ─────────────────────────────────── */
.cmd-palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: hsla(230, 25%, 6%, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) ease;
}

.cmd-palette-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cmd-palette {
  width: 100%;
  max-width: 520px;
  background: hsla(230, 20%, 11%, 0.95);
  border: 1px solid hsla(245, 50%, 55%, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px hsla(0, 0%, 0%, 0.6), 0 0 60px hsla(245, 70%, 50%, 0.1);
  overflow: hidden;
  transform: scale(0.95) translateY(-10px);
  transition: transform var(--duration-slow) var(--ease-spring);
}

.cmd-palette-overlay.open .cmd-palette {
  transform: scale(1) translateY(0);
}

.cmd-palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
}

.cmd-palette-input-wrap svg {
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.cmd-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
}

.cmd-palette-input::placeholder {
  color: var(--text-tertiary);
}

.cmd-palette-kbd {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  border: 1px solid var(--glass-border);
  color: var(--text-tertiary);
  font-weight: 600;
}

.cmd-palette-results {
  padding: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.cmd-palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast) ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}

.cmd-palette-item:hover,
.cmd-palette-item.selected {
  background: hsla(245, 70%, 55%, 0.1);
  color: var(--text-primary);
}

.cmd-palette-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.cmd-palette-item:hover svg,
.cmd-palette-item.selected svg {
  color: var(--brand-400);
}

.cmd-palette-item-label {
  flex: 1;
}

.cmd-palette-item-shortcut {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

.cmd-palette-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-tertiary);
}

/* ── Utility: hidden ──────────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .create-layout {
    grid-template-columns: 1fr;
  }

  .result-area {
    position: static;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-logo span {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
  }

  .mobile-nav {
    display: block;
  }

  .view-container {
    padding: 16px;
    padding-bottom: 100px;
  }

  .top-bar {
    padding: 0 16px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .lightbox-overlay {
    padding: 16px;
  }

  .toast-container {
    bottom: 80px;
    right: 16px;
    left: 16px;
  }

  .toast {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .dimension-group,
  .style-group {
    gap: 6px;
  }

  .dimension-pill,
  .style-pill {
    padding: 5px 10px;
    font-size: 0.688rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   HOME DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

.home-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 900px;
}

/* ── Welcome Card ────────────────────────────────────────────── */
.home-welcome {
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.home-welcome::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(245, 70%, 62%, 0.08), transparent 65%);
  pointer-events: none;
}

.home-welcome-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-greeting {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 2px;
}

.home-username {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
  background: linear-gradient(135deg, var(--text-primary), var(--brand-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-subtitle {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.home-welcome-art {
  opacity: 0.15;
  animation: floatIcon 3s ease-in-out infinite;
}

/* ── Stats Row ───────────────────────────────────────────────── */
.home-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.home-stat {
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) ease;
}

.home-stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.home-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-stat-icon svg {
  width: 20px;
  height: 20px;
}

.stat-icon-total {
  background: linear-gradient(135deg, hsla(245, 70%, 62%, 0.15), hsla(280, 65%, 60%, 0.1));
  color: var(--brand-300);
}

.stat-icon-image {
  background: linear-gradient(135deg, hsla(245, 70%, 62%, 0.15), hsla(200, 70%, 55%, 0.1));
  color: hsl(200, 70%, 65%);
}

.stat-icon-video {
  background: linear-gradient(135deg, hsla(320, 60%, 55%, 0.15), hsla(280, 65%, 60%, 0.1));
  color: hsl(320, 60%, 65%);
}

.stat-icon-audio {
  background: linear-gradient(135deg, hsla(155, 65%, 48%, 0.15), hsla(180, 50%, 45%, 0.1));
  color: var(--success);
}

.home-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.home-stat-label {
  font-size: 0.688rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

/* ── Section ─────────────────────────────────────────────────── */
.home-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-see-all {
  background: none;
  border: none;
  color: var(--brand-400);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--duration-fast) ease;
}

.home-see-all:hover {
  color: var(--brand-300);
}

/* ── Quick Actions ───────────────────────────────────────────── */
.home-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.home-action {
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  transition: all var(--duration-base) var(--ease-out);
}

.home-action:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 0 40px hsla(245, 70%, 50%, 0.06);
  border-color: hsla(245, 50%, 60%, 0.2);
}

.home-action-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-base) var(--ease-spring);
}

.home-action:hover .home-action-icon {
  transform: scale(1.1);
}

.home-action-icon svg {
  width: 24px;
  height: 24px;
}

.action-icon-image {
  background: linear-gradient(135deg, hsla(245, 70%, 62%, 0.15), hsla(200, 70%, 55%, 0.1));
  color: hsl(200, 70%, 65%);
}

.action-icon-video {
  background: linear-gradient(135deg, hsla(320, 60%, 55%, 0.15), hsla(280, 65%, 60%, 0.1));
  color: hsl(320, 60%, 65%);
}

.action-icon-audio {
  background: linear-gradient(135deg, hsla(155, 65%, 48%, 0.15), hsla(180, 50%, 45%, 0.1));
  color: var(--success);
}

.action-icon-gallery {
  background: linear-gradient(135deg, hsla(40, 90%, 55%, 0.15), hsla(30, 80%, 50%, 0.1));
  color: var(--warning);
}

.home-action-label {
  font-size: 0.813rem;
  font-weight: 700;
  color: var(--text-primary);
}

.home-action-desc {
  font-size: 0.688rem;
  color: var(--text-tertiary);
  line-height: 1.3;
}

/* ── Prompt of the Day ───────────────────────────────────────── */
.home-prompt-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.home-prompt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.home-prompt-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: hsla(245, 70%, 62%, 0.1);
  color: var(--brand-300);
  font-size: 0.688rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.home-prompt-badge svg {
  width: 12px;
  height: 12px;
}

.home-prompt-text {
  font-size: 0.938rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-style: italic;
}

.home-prompt-use {
  padding: 10px 20px;
}

/* ── Recent Creations ────────────────────────────────────────── */
.home-recent-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.home-recent-scroll::-webkit-scrollbar {
  height: 4px;
}

.home-recent-scroll::-webkit-scrollbar-thumb {
  background: var(--surface-4);
  border-radius: 2px;
}

.home-recent-card {
  flex-shrink: 0;
  width: 160px;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) ease;
}

.home-recent-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.home-recent-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-recent-audio {
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}

.home-recent-audio-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-recent-audio-inner svg {
  width: 36px;
  height: 36px;
  color: var(--success);
  opacity: 0.6;
}

.home-recent-type {
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 0.625rem;
  background: hsla(0, 0%, 0%, 0.6);
  backdrop-filter: blur(8px);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ── Toggle Switch (iOS style) ───────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
}

.toggle-row:last-child {
  border-bottom: none;
}

.toggle-label {
  font-size: 0.813rem;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--brand-500);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(18px);
}

/* ═══════════════════════════════════════════════════════════════
   ENHANCED SETTINGS
   ═══════════════════════════════════════════════════════════════ */

.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.settings-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-card-icon svg {
  width: 20px;
  height: 20px;
}

.settings-icon-account {
  background: linear-gradient(135deg, hsla(245, 70%, 62%, 0.15), hsla(280, 65%, 60%, 0.1));
  color: var(--brand-300);
}

.settings-icon-prefs {
  background: linear-gradient(135deg, hsla(200, 70%, 55%, 0.15), hsla(220, 60%, 50%, 0.1));
  color: hsl(200, 70%, 65%);
}

.settings-icon-appearance {
  background: linear-gradient(135deg, hsla(40, 90%, 55%, 0.15), hsla(30, 80%, 50%, 0.1));
  color: var(--warning);
}

.settings-icon-data {
  background: linear-gradient(135deg, hsla(155, 65%, 48%, 0.15), hsla(180, 50%, 45%, 0.1));
  color: var(--success);
}

.settings-icon-shortcuts {
  background: linear-gradient(135deg, hsla(320, 60%, 55%, 0.15), hsla(280, 65%, 60%, 0.1));
  color: hsl(320, 60%, 65%);
}

.settings-icon-about {
  background: linear-gradient(135deg, hsla(220, 12%, 65%, 0.15), hsla(220, 10%, 50%, 0.1));
  color: var(--text-secondary);
}

.settings-rows {
  margin-top: 4px;
}

.settings-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.settings-select {
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 6px 28px 6px 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color var(--duration-fast) ease;
}

.settings-select:focus {
  border-color: var(--brand-400);
}

.settings-lang-toggle {
  display: flex;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.lang-pill {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.lang-pill.active {
  background: var(--brand-500);
  color: white;
}

.lang-pill:hover:not(.active) {
  color: var(--text-primary);
  background: var(--surface-2);
}

.settings-plan-badge {
  color: var(--brand-300) !important;
}

.settings-coming-soon {
  color: var(--text-tertiary) !important;
  font-style: italic;
}

.settings-about-text {
  font-size: 0.813rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 4px;
}

.settings-version {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.settings-powered {
  margin-top: 8px;
  font-size: 0.625rem;
  color: var(--text-tertiary);
  opacity: 0.6;
}

/* ── Keyboard Shortcuts ──────────────────────────────────────── */
.shortcuts-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.shortcut-item span {
  margin-left: auto;
  color: var(--text-tertiary);
  font-size: 0.688rem;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--glass-border);
  border-bottom-width: 2px;
  font-family: inherit;
  font-size: 0.688rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   GALLERY SEARCH & FILTERS
   ═══════════════════════════════════════════════════════════════ */

.gallery-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.gallery-search {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.gallery-search-input {
  width: 100%;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 10px 16px 10px 40px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.813rem;
  outline: none;
  transition: border-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease;
}

.gallery-search-input:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px hsla(245, 70%, 62%, 0.1);
}

.gallery-search-input::placeholder {
  color: var(--text-tertiary);
}

.gallery-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.gallery-search-icon svg {
  width: 16px;
  height: 16px;
}

.gallery-filters {
  display: flex;
  gap: 6px;
}

.gallery-filter-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.gallery-filter-btn:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
}

.gallery-filter-btn.active {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: white;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — HOME & SETTINGS ADDITIONS
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .home-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .home-quick-actions {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .home-welcome-art {
    display: none;
  }

  .home-welcome {
    padding: 24px;
  }

  .gallery-toolbar {
    flex-direction: column;
    gap: 8px;
  }

  .gallery-search {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .home-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-stat-value {
    font-size: 1.25rem;
  }

  .home-recent-card {
    width: 130px;
  }
}


/* ═══════════════════════════════════════════════════════════════
   AUTH SCREEN — Premium Glassmorphism
   ═══════════════════════════════════════════════════════════════ */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
}

.auth-bg {
  position: absolute;
  inset: 0;
  background: var(--surface-base);
  z-index: 0;
}

.auth-bg::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -15%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(245, 80%, 55%, 0.2), transparent 65%);
  filter: blur(100px);
  animation: authGlow1 10s ease-in-out infinite alternate;
}

.auth-bg::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -15%;
  width: 65%;
  height: 65%;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(320, 70%, 50%, 0.15), transparent 65%);
  filter: blur(100px);
  animation: authGlow2 12s ease-in-out infinite alternate;
}

@keyframes authGlow1 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(60px, 40px) scale(1.15);
  }

  100% {
    transform: translate(20px, -20px) scale(1.05);
  }
}

@keyframes authGlow2 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-40px, -30px) scale(1.2);
  }

  100% {
    transform: translate(-20px, 10px) scale(1.08);
  }
}

.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  margin: auto;
  animation: authEntrance 0.8s var(--ease-out) both;
}

@keyframes authEntrance {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card {
  padding: 36px 32px;
  border: 1px solid hsla(245, 50%, 60%, 0.12);
  box-shadow: var(--shadow-xl), 0 0 80px hsla(245, 70%, 50%, 0.06);
  border-radius: var(--radius-2xl);
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-header svg {
  filter: drop-shadow(0 0 12px hsla(245, 70%, 62%, 0.4));
}

.auth-brand {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--text-primary), var(--brand-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-title {
  text-align: center;
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  text-align: center;
  font-size: 0.813rem;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.auth-form .form-input {
  padding: 12px 16px;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  background: hsla(230, 18%, 12%, 0.8);
}

.auth-form .btn-generate {
  margin-top: 4px;
  padding: 14px;
  font-size: 0.95rem;
  border-radius: var(--radius-lg);
  letter-spacing: -0.01em;
}

/* Password visibility toggle */
.password-wrap {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) ease;
}

.password-toggle:hover {
  color: var(--text-secondary);
}

.password-toggle svg {
  width: 16px;
  height: 16px;
}

.auth-error {
  font-size: 0.75rem;
  color: var(--error);
  min-height: 18px;
  text-align: center;
  animation: shakeError 0.4s ease;
}

@keyframes shakeError {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.auth-divider span {
  font-size: 0.688rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.auth-google-btn {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--duration-base) var(--ease-out);
}

.auth-google-btn:hover {
  background: var(--surface-2);
  border-color: hsla(230, 20%, 40%, 0.6);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.auth-google-btn:active {
  transform: scale(0.98);
}

.auth-toggle {
  text-align: center;
  font-size: 0.813rem;
  color: var(--text-tertiary);
  margin-top: 16px;
}

.auth-link {
  background: none;
  border: none;
  color: var(--brand-400);
  font-family: inherit;
  font-size: 0.813rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-fast) ease;
}

.auth-link:hover {
  color: var(--brand-300);
  text-shadow: 0 0 16px hsla(245, 70%, 62%, 0.3);
}

/* ── Sign Out Button (Settings) ───────────────────────────────── */
.btn-signout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid hsla(0, 75%, 55%, 0.3);
  background: hsla(0, 75%, 55%, 0.08);
  color: var(--error);
  font-family: inherit;
  font-size: 0.813rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.btn-signout:hover {
  background: hsla(0, 75%, 55%, 0.15);
  border-color: hsla(0, 75%, 55%, 0.5);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   NEW FEATURES
   ═══════════════════════════════════════════════════════════════ */

/* ── Mode Toggle (Image / Video) ─────────────────────────────── */
.mode-toggle-wrap {
  display: flex;
  justify-content: center;
}

.mode-toggle {
  display: inline-flex;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.813rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.mode-btn svg {
  width: 16px;
  height: 16px;
}

.mode-btn:hover {
  color: var(--text-primary);
}

.mode-btn.active {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* ── Prompt Actions (Enhance / Random) ───────────────────────── */
.prompt-wrap {
  position: relative;
}

.prompt-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}

.prompt-action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out);
  line-height: 1;
  padding: 0;
}

.prompt-action-btn:hover {
  background: var(--surface-3);
  border-color: var(--brand-400);
  color: var(--text-primary);
  transform: scale(1.05);
}

.prompt-action-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.prompt-action-btn svg {
  width: 14px;
  height: 14px;
  display: none;
}

/* ── Gallery: Video Badge ────────────────────────────────────── */
.gallery-card-video {
  position: relative;
}

.gallery-video-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.gallery-video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: hsla(0, 0%, 0%, 0.6);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

/* ── Video Result ────────────────────────────────────────────── */
.result-video-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.result-video {
  width: 100%;
  display: block;
  border-radius: var(--radius-xl);
}

.result-video-wrap .result-image-actions {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════════ */

.landing-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Animated Background ──────────────────────────────────────── */
.landing-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--surface-base);
}

.landing-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: orbFloat 12s ease-in-out infinite;
}

.landing-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, hsl(245, 70%, 50%), transparent 70%);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.landing-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, hsl(280, 65%, 45%), transparent 70%);
  top: 30%;
  right: -15%;
  animation-delay: -4s;
}

.landing-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, hsl(320, 60%, 40%), transparent 70%);
  bottom: -5%;
  left: 30%;
  animation-delay: -8s;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(40px, -30px) scale(1.1);
  }

  50% {
    transform: translate(-20px, 40px) scale(0.95);
  }

  75% {
    transform: translate(30px, 20px) scale(1.05);
  }
}

.landing-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(hsla(230, 20%, 30%, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, hsla(230, 20%, 30%, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}

/* ── Language Toggle ──────────────────────────────────────────── */
.landing-lang-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.landing-lang-btn:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.landing-lang-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.landing-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 140px 24px 60px;
  max-width: 720px;
  animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 32px;
  letter-spacing: 0.04em;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px hsla(155, 65%, 48%, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.landing-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
}

.landing-brand {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.landing-tagline {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary), var(--brand-300), var(--brand-200));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.landing-cta-group {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.landing-cta-btn {
  padding: 18px 36px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
}

/* ── Features ─────────────────────────────────────────────────── */
.landing-features {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  padding: 0 24px 80px;
  width: 100%;
  animation: featuresFadeIn 1s ease-out 0.3s both;
}

@keyframes featuresFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-feature {
  padding: 32px 24px;
  text-align: center;
  transition: transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.landing-feature:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.feature-icon-image {
  background: linear-gradient(135deg, hsla(245, 70%, 62%, 0.2), hsla(280, 65%, 60%, 0.15));
  color: var(--brand-300);
}

.feature-icon-video {
  background: linear-gradient(135deg, hsla(320, 60%, 55%, 0.2), hsla(280, 65%, 60%, 0.15));
  color: hsl(320, 60%, 65%);
}

.feature-icon-audio {
  background: linear-gradient(135deg, hsla(155, 65%, 48%, 0.2), hsla(180, 50%, 45%, 0.15));
  color: var(--success);
}

.landing-feature h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.landing-feature p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Models Section ──────────────────────────────────────────── */
.landing-models-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px 80px;
  max-width: 720px;
  width: 100%;
  animation: featuresFadeIn 1s ease-out 0.6s both;
}

.landing-models-section h3 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.landing-models-sub {
  color: var(--text-secondary);
  font-size: 0.938rem;
  margin-bottom: 28px;
}

.landing-models-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 32px;
}

.model-badge {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
}

.model-badge:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.landing-cta2 {
  padding: 14px 32px;
  font-size: 0.938rem;
}

/* ── Footer ──────────────────────────────────────────────────── */
.landing-footer {
  position: relative;
  z-index: 1;
  padding: 32px 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════
   AUDIO MODE STYLES
   ═══════════════════════════════════════════════════════════════ */

/* ── Range Slider ─────────────────────────────────────────────── */
.form-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-3);
  outline: none;
  cursor: pointer;
  margin-top: 4px;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-400);
  cursor: pointer;
  box-shadow: 0 0 8px hsla(245, 70%, 62%, 0.4);
  transition: transform var(--duration-fast) var(--ease-spring);
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.form-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-400);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px hsla(245, 70%, 62%, 0.4);
}

/* ── Audio Result Card ────────────────────────────────────────── */
.audio-result-card {
  padding: 40px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.audio-result-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, hsla(155, 65%, 48%, 0.15), hsla(245, 70%, 62%, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
}

.audio-result-icon svg {
  width: 32px;
  height: 32px;
}

.audio-result-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 400px;
}

.audio-player {
  width: 100%;
  max-width: 400px;
  height: 48px;
  border-radius: var(--radius-md);
  outline: none;
}

.audio-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ── Gallery Audio Card ──────────────────────────────────────── */
.gallery-card-audio {
  cursor: default;
}

.gallery-audio-thumb {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
}

.gallery-audio-thumb svg {
  width: 40px;
  height: 40px;
  color: var(--success);
  opacity: 0.7;
}

.gallery-audio-text {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.gallery-audio-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: hsla(155, 65%, 48%, 0.2);
  backdrop-filter: blur(8px);
  color: var(--success);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — LANDING PAGE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .landing-hero {
    padding: 100px 20px 40px;
  }

  .landing-brand {
    font-size: 1.75rem;
  }

  .landing-tagline {
    font-size: 2rem;
  }

  .landing-subtitle {
    font-size: 1rem;
  }

  .landing-features {
    grid-template-columns: 1fr;
    padding: 0 20px 60px;
  }

  .landing-cta-btn {
    padding: 16px 28px;
    font-size: 0.938rem;
    width: 100%;
  }

  .landing-models-grid {
    gap: 8px;
  }

  .model-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
  }
}

@media (max-width: 480px) {
  .landing-logo-wrap svg {
    width: 40px;
    height: 40px;
  }

  .landing-brand {
    font-size: 1.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SSML Helper Buttons
   ═══════════════════════════════════════════════════════════════ */
.ssml-helpers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.ssml-btn {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.688rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.ssml-btn:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
  background: var(--surface-3);
}

/* ═══════════════════════════════════════════════════════════════
   Voice Cloning UI
   ═══════════════════════════════════════════════════════════════ */
.clone-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.clone-or {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-style: italic;
}

.clone-status {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 8px;
  min-height: 18px;
}

.upload-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 2px;
  line-height: 1.4;
}

.badge-cloned {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: hsla(155, 65%, 48%, 0.15);
  color: var(--success);
  font-size: 0.688rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  vertical-align: middle;
  margin-left: 6px;
}

/* Recording animation */
.btn-secondary.recording {
  background: hsla(0, 75%, 55%, 0.15);
  border-color: var(--error);
  color: var(--error);
  animation: recordPulse 1.2s ease-in-out infinite;
}

@keyframes recordPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 hsla(0, 75%, 55%, 0.3);
  }

  50% {
    box-shadow: 0 0 0 8px hsla(0, 75%, 55%, 0);
  }
}

/* ═══════════════════════════════════════════════════════════════
   Reference Image Upload Zone
   ═══════════════════════════════════════════════════════════════ */
.ref-image-zone {
  border: 2px dashed var(--surface-4);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
}

.ref-image-zone:hover {
  border-color: var(--brand-400);
  background: hsla(245, 70%, 62%, 0.05);
}

.ref-image-zone.has-image {
  border-style: solid;
  border-color: var(--brand-400);
  padding: 8px;
}

.ref-image-zone img {
  max-width: 100%;
  max-height: 120px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.ref-image-zone .placeholder-text {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.ref-image-zone .placeholder-text svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  opacity: 0.5;
}

.ref-image-clear {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ref-image-clear:hover {
  background: var(--error);
  color: white;
}

/* Ensure btn-secondary <a> elements don't get underlines */
a.btn-secondary {
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════
   NEW COMPONENTS — Model Cards, Progress, Lightbox, Results
   ═══════════════════════════════════════════════════════════════ */

/* ── Hidden Utility ──────────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ── Spinner ─────────────────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid hsla(0, 0%, 100%, 0.25);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Loading Pill ────────────────────────────────────────────── */
.loading-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.loading-pill::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent-gradient);
  animation: loadProgress 8s ease-out forwards;
  border-radius: 0 0 var(--radius-full) var(--radius-full);
}

@keyframes loadProgress {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

.result-loading {
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
}

/* Shimmer animation on loading */
.result-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
      transparent 25%,
      hsla(245, 70%, 62%, 0.04) 37%,
      transparent 63%);
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}

/* ── Result Display ──────────────────────────────────────────── */
.result-display {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.result-images-grid {
  display: grid;
  gap: 12px;
}

.result-images-grid.cols-1 {
  grid-template-columns: 1fr;
}

.result-images-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.result-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: auto;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  transition: transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) ease;
}

.result-image-wrap:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.result-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.result-image-actions {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-out);
}

.result-image-wrap:hover .result-image-actions,
.result-video-wrap:hover .result-image-actions {
  opacity: 1;
  transform: translateY(0);
}

.img-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: hsla(230, 20%, 8%, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid hsla(230, 20%, 30%, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
}

.img-action-btn:hover {
  background: var(--brand-500);
  border-color: var(--brand-400);
  transform: scale(1.1);
}

.img-action-btn svg {
  width: 16px;
  height: 16px;
}

/* ── Video Result ────────────────────────────────────────────── */
.result-video-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}

.result-video {
  width: 100%;
  display: block;
  border-radius: var(--radius-xl);
}

/* ── Audio Result ────────────────────────────────────────────── */
.audio-result-card {
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.audio-result-icon svg {
  width: 48px;
  height: 48px;
  color: var(--brand-400);
  opacity: 0.6;
}

.audio-result-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 400px;
}

.audio-player {
  width: 100%;
  max-width: 400px;
  margin: 8px 0;
  border-radius: var(--radius-md);
}

.audio-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.813rem;
}

/* ── Model Cards Grid ────────────────────────────────────────── */
.model-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.model-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--surface-1);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.model-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
  pointer-events: none;
}

.model-card:hover {
  border-color: var(--brand-400);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.model-card:hover::before {
  opacity: 0.04;
}

.model-card.active {
  border-color: var(--brand-400);
  background: hsla(245, 70%, 62%, 0.1);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px var(--brand-400), var(--shadow-sm);
}

.model-card.active::before {
  opacity: 0.06;
}

.model-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.model-card-name {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-card-badge {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--brand-500);
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
}

.model-card-desc {
  font-size: 0.688rem;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.model-card.active .model-card-desc {
  color: var(--text-secondary);
}

/* ── Gallery Lightbox ────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: hsla(230, 20%, 4%, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}

.lightbox-overlay.open {
  display: flex;
  animation: fadeIn var(--duration-base) var(--ease-out);
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.lightbox-overlay img,
.lightbox-overlay video {
  max-width: 90vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  cursor: default;
}

.lightbox-prompt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  line-height: 1.6;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 1px solid hsla(230, 20%, 30%, 0.4);
  background: hsla(230, 18%, 14%, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out);
  z-index: 1000;
}

.lightbox-close:hover {
  background: var(--error);
  border-color: var(--error);
  transform: scale(1.1);
}

.lightbox-actions {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 1000;
}

.lightbox-actions a,
.lightbox-actions button {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: hsla(230, 18%, 14%, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid hsla(230, 20%, 30%, 0.4);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.813rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--duration-fast) var(--ease-out);
}

.lightbox-actions a:hover,
.lightbox-actions button:hover {
  background: var(--brand-500);
  border-color: var(--brand-400);
}

/* ── Keyboard Shortcut Hint ──────────────────────────────────── */
.kbd-hint {
  font-size: 0.625rem;
  font-weight: 500;
  color: hsla(0, 0%, 100%, 0.4);
  background: hsla(0, 0%, 100%, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  pointer-events: none;
}

/* ── Voice Cloning Controls ──────────────────────────────────── */
.clone-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.clone-or {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.clone-status {
  font-size: 0.813rem;
  color: var(--text-secondary);
  margin-top: 8px;
  min-height: 1.3em;
}

.badge-cloned {
  font-size: 0.688rem;
  background: var(--brand-500);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
  margin-left: 6px;
}

.recording {
  color: var(--error) !important;
  border-color: var(--error) !important;
  animation: recordPulse 1s ease-in-out infinite;
}

@keyframes recordPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.upload-label {
  cursor: pointer;
}

/* ── SSML Helper Buttons ─────────────────────────────────────── */
.ssml-helpers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ssml-btn {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 0.688rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.ssml-btn:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
  background: hsla(245, 70%, 62%, 0.08);
}

/* ── Form Range Slider ───────────────────────────────────────── */
.form-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
  outline: none;
  cursor: pointer;
}

.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-400);
  border: 2px solid var(--surface-base);
  box-shadow: 0 0 6px hsla(245, 70%, 62%, 0.4);
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-spring);
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.form-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-400);
  border: 2px solid var(--surface-base);
  cursor: pointer;
}

/* ── Form Hint ───────────────────────────────────────────────── */
.form-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* ── Secondary Button ────────────────────────────────────────── */
.btn-secondary {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.813rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
  background: var(--surface-3);
}

/* ── Prompt Action Buttons ───────────────────────────────────── */
.prompt-wrap {
  position: relative;
}

.prompt-actions {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}

.prompt-action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  transition: all var(--duration-fast) var(--ease-out);
}

.prompt-action-btn:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
  background: var(--surface-3);
}

.prompt-action-btn svg {
  width: 14px;
  height: 14px;
}

/* ── Responsive: Model Cards ─────────────────────────────────── */
@media (max-width: 768px) {
  .model-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Fade In Animation ───────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn var(--duration-slow) var(--ease-out);
}

/* ═══════════════════════════════════════════════════════════════
   TOKENS PAGE
   ═══════════════════════════════════════════════════════════════ */

.tokens-page {
  max-width: 900px;
  margin: 0 auto;
}

.tokens-hero {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, hsla(245, 60%, 30%, 0.3), hsla(280, 50%, 25%, 0.2));
  border: 1px solid hsla(245, 50%, 50%, 0.2);
}

.tokens-balance-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tokens-balance-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.tokens-balance-label {
  font-size: 0.813rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tokens-balance-value {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tokens-balance-sub {
  font-size: 0.813rem;
  color: var(--text-tertiary);
}

.tokens-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.tokens-section-sub {
  font-size: 0.813rem;
  color: var(--text-tertiary);
  margin-bottom: 1.2rem;
}

/* ── Token Cards Grid ─────────────────────────────────────────── */
.tokens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 2rem;
}

.token-card {
  padding: 24px 20px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.token-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px hsla(245, 60%, 40%, 0.15);
}

.token-card-popular {
  border-color: var(--brand-400);
  box-shadow: 0 0 20px hsla(245, 70%, 62%, 0.15);
}

.token-badge-popular {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 14px;
  background: var(--accent-gradient);
  color: white;
  font-size: 0.688rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.token-card-emoji {
  font-size: 2rem;
  margin-bottom: 4px;
}

.token-card-name {
  font-size: 1rem;
  font-weight: 700;
}

.token-card-tokens {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-300);
}

.token-card-tokens span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.token-card-price {
  font-size: 1.3rem;
  font-weight: 700;
}

.token-card-per {
  font-size: 0.688rem;
  color: var(--text-tertiary);
}

.token-card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 4px 0 8px;
}

.token-buy-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 0.813rem;
}

/* ── Cost Reference Table ─────────────────────────────────────── */
.tokens-costs-table {
  padding: 16px 20px;
  overflow-x: auto;
}

.tokens-costs-table table {
  width: 100%;
  border-collapse: collapse;
}

.tokens-costs-table th,
.tokens-costs-table td {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.813rem;
  border-bottom: 1px solid var(--glass-border);
}

.tokens-costs-table th {
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.688rem;
  letter-spacing: 0.06em;
}

.tokens-costs-table td i {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 6px;
  color: var(--brand-400);
}

/* ── Transaction History ──────────────────────────────────────── */
.tokens-history {
  padding: 16px 20px;
}

.tokens-history-loading,
.tokens-history-empty {
  color: var(--text-tertiary);
  font-size: 0.813rem;
  text-align: center;
  padding: 2rem 1rem;
}

.tokens-tx-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tokens-tx-row,
.admin-tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  font-size: 0.813rem;
}

.tx-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tx-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tx-label {
  font-weight: 600;
  text-transform: capitalize;
}

.tx-date {
  font-size: 0.688rem;
  color: var(--text-tertiary);
}

.tx-amount {
  font-weight: 700;
  white-space: nowrap;
}

.tx-bal {
  font-size: 0.688rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.tx-credit .tx-amount {
  color: var(--success);
}

.tx-debit .tx-amount {
  color: var(--error);
}

/* ── Nav Token Badge ──────────────────────────────────────────── */
.nav-token-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--brand-500);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   SUPER ADMIN DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

.admin-page {
  max-width: 1000px;
  margin: 0 auto;
}

.admin-header {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, hsla(155, 60%, 30%, 0.15), hsla(245, 60%, 30%, 0.15));
  border: 1px solid hsla(155, 50%, 40%, 0.2);
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-header-left svg {
  color: var(--success);
}

.admin-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.admin-subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ── Admin Stats ──────────────────────────────────────────────── */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 2rem;
}

.admin-stat-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-stat-label {
  font-size: 0.688rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ── Admin Section ────────────────────────────────────────────── */
.admin-section {
  margin-bottom: 2rem;
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-section-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.admin-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.admin-search {
  max-width: 280px;
}

.admin-loading {
  color: var(--text-tertiary);
  font-size: 0.813rem;
  padding: 2rem;
  text-align: center;
}

/* ── Admin Users Table ────────────────────────────────────────── */
.admin-users-table {
  overflow-x: auto;
  padding: 4px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 0.813rem;
  border-bottom: 1px solid var(--glass-border);
}

.admin-table th {
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.688rem;
  letter-spacing: 0.06em;
  position: sticky;
  top: 0;
  background: var(--glass-bg);
}

.admin-user-cell {
  min-width: 150px;
}

.admin-user-email {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.admin-user-name {
  font-size: 0.688rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.admin-provider-badge {
  font-size: 0.75rem;
  white-space: nowrap;
}

.admin-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-small:hover {
  background: var(--surface-3);
  color: var(--text-primary);
  border-color: var(--brand-400);
}

/* ── Admin Modal ──────────────────────────────────────────────── */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.admin-modal-overlay.hidden {
  display: none;
}

.admin-modal {
  width: 90%;
  max-width: 420px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-modal h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.admin-modal-user {
  font-size: 0.813rem;
  color: var(--text-tertiary);
  font-family: monospace;
}

.admin-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-secondary {
  padding: 10px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.813rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

/* ── Admin Recent Transactions ────────────────────────────────── */
.admin-recent-tx {
  padding: 16px 20px;
  max-height: 400px;
  overflow-y: auto;
}

.admin-tx-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tokens-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .tokens-hero {
    padding: 20px;
  }

  .tokens-balance-value {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .tokens-grid {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   EMAIL VERIFICATION BANNER
   ═══════════════════════════════════════════════════════════════ */

.verify-banner {
  width: 100%;
  background: linear-gradient(135deg, hsl(38, 90%, 14%), hsl(38, 80%, 18%));
  border-bottom: 1px solid hsl(38, 60%, 30%);
  padding: 10px 20px;
  z-index: 50;
  animation: slideDown var(--duration-slow) var(--ease-out);
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.verify-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.verify-banner-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.verify-banner-text {
  font-size: 0.813rem;
  font-weight: 500;
  color: hsl(38, 90%, 85%);
  flex: 1;
  min-width: 0;
}

.verify-banner-resend {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1px solid hsl(38, 60%, 40%);
  background: hsla(38, 80%, 50%, 0.15);
  color: hsl(38, 90%, 75%);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
}

.verify-banner-resend:hover {
  background: hsla(38, 80%, 50%, 0.3);
  border-color: hsl(38, 70%, 55%);
  color: hsl(38, 95%, 90%);
}

.verify-banner-close {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: hsl(38, 50%, 55%);
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--duration-fast) var(--ease-out);
}

.verify-banner-close:hover {
  background: hsla(38, 80%, 50%, 0.2);
  color: hsl(38, 90%, 85%);
}

/* ── Forgot Password Link ────────────────────────────────────── */
.auth-forgot {
  text-align: right;
  margin: -4px 0 8px;
}

.auth-forgot-link {
  font-size: 0.75rem;
  color: var(--brand-400);
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.auth-forgot-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   MISSING COMPONENT STYLES — Mode Toggle, Templates, Gallery,
   Mobile Nav, Persona, Content Studio
   ═══════════════════════════════════════════════════════════════ */

/* ── Mode Toggle (Image/Video/Audio/Studio) ──────────────────── */
.mode-toggle-wrap {
  margin-bottom: 4px;
}

.mode-toggle {
  display: flex;
  gap: 4px;
  background: var(--surface-1);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
}

.mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.mode-btn:hover {
  color: var(--text-secondary);
  background: var(--surface-2);
}

.mode-btn.active {
  background: var(--brand-500);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px hsla(245, 70%, 50%, 0.3);
}

.mode-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Templates Dropdown ──────────────────────────────────────── */
.templates-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 8px;
  max-height: 320px;
  overflow-y: auto;
  animation: dropdownSlide 0.2s var(--ease-out);
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.template-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast) ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.template-item:hover {
  background: var(--surface-3);
}

.template-item .template-category {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-400);
}

.template-item .template-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
}

.template-item .template-preview {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Prompt Actions ──────────────────────────────────────────── */
.prompt-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  position: relative;
}

.prompt-action-btn {
  padding: 5px 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.prompt-action-btn:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
  background: var(--surface-2);
}

/* ── Gallery Toolbar Actions ─────────────────────────────────── */
.gallery-toolbar-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ── Localize Voice Tip ──────────────────────────────────────── */
.localize-voice-tip {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: hsla(245, 70%, 62%, 0.08);
  border: 1px solid hsla(245, 70%, 62%, 0.2);
  font-size: 0.75rem;
  color: var(--brand-300);
  line-height: 1.5;
  margin-top: 8px;
}

/* ── Nav Token Badge ─────────────────────────────────────────── */
.nav-token-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--brand-500);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

/* ── Gallery Favorites / Remix ───────────────────────────────── */
.fav-btn,
.remix-btn {
  font-size: 0.9rem !important;
  line-height: 1;
}

.fav-btn.fav-active {
  color: #f59e0b;
}

/* ── Img Action Buttons (Result cards) ───────────────────────── */
.img-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  text-decoration: none;
  font-size: 0.85rem;
}

.img-action-btn:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
  background: var(--surface-3);
}

.img-action-btn svg {
  width: 16px;
  height: 16px;
}

.result-image-actions {
  display: flex;
  gap: 6px;
  position: absolute;
  bottom: 10px;
  right: 10px;
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
}

.result-image-wrap:hover .result-image-actions {
  opacity: 1;
}

.result-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.result-image-wrap img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
}

.result-images-grid {
  display: grid;
  gap: 12px;
}

.result-images-grid.cols-1 {
  grid-template-columns: 1fr;
}

.result-images-grid.cols-2 {
  grid-template-columns: 1fr 1fr;
}

/* ── btn-secondary (used everywhere) ─────────────────────────── */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.813rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
  background: var(--surface-3);
}

.btn-secondary svg {
  width: 14px;
  height: 14px;
}

/* ── Mobile Bottom Nav ───────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--surface-0);
  border-top: 1px solid var(--glass-border);
  padding: 4px 0;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: none;
}

.mobile-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.mobile-nav-inner::-webkit-scrollbar {
  display: none;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--duration-fast) ease;
  white-space: nowrap;
  min-width: 48px;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-btn svg {
  width: 20px;
  height: 20px;
}

.mobile-nav-btn.active {
  color: var(--brand-400);
}

.mobile-nav-btn:active {
  transform: scale(0.92);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS — Tablet (≤ 1024px)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .create-layout {
    grid-template-columns: 340px 1fr;
    gap: 16px;
  }

  .home-usage-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS — Mobile (≤ 768px)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Hide desktop sidebar, show mobile nav ─────────────────── */
  .sidebar {
    display: none;
  }

  .mobile-nav {
    display: block !important;
  }

  .mobile-nav.hidden {
    display: none !important;
  }

  .mobile-logo {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }

  .mobile-logo span {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
  }

  /* ── Top bar ────────────────────────────────────────────────── */
  .top-bar {
    height: 56px;
    padding: 0 16px;
  }

  .view-title {
    font-size: 1rem;
  }

  /* ── View container ─────────────────────────────────────────── */
  .view-container {
    padding: 16px;
    padding-bottom: 80px;
    /* room for mobile nav */
  }

  /* ── Create layout → single column ─────────────────────────── */
  .create-layout {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* ── Result area → not sticky on mobile ────────────────────── */
  .result-area {
    position: static;
  }

  .result-placeholder {
    aspect-ratio: auto;
    min-height: 200px;
  }

  .result-loading {
    aspect-ratio: auto;
    min-height: 200px;
  }

  /* ── Mode toggle → scrollable ──────────────────────────────── */
  .mode-toggle {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }

  .mode-toggle::-webkit-scrollbar {
    display: none;
  }

  .mode-btn {
    padding: 8px 10px;
    font-size: 0.72rem;
    min-width: max-content;
  }

  /* ── Home stats → 2 cols ────────────────────────────────────── */
  .home-stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .home-usage-grid {
    grid-template-columns: 1fr !important;
  }

  .home-quick-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  /* ── Gallery grid ──────────────────────────────────────────── */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .gallery-toolbar {
    flex-direction: column;
    gap: 10px;
  }

  .gallery-filters {
    flex-wrap: wrap;
    gap: 6px;
  }

  .gallery-filter-btn {
    font-size: 0.72rem;
    padding: 5px 10px;
  }

  /* ── Landing ────────────────────────────────────────────────── */
  .landing-hero h2 {
    font-size: 2rem !important;
  }

  .landing-features {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .landing-models-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* ── Auth card ──────────────────────────────────────────────── */
  .auth-screen {
    padding: 16px;
  }

  .auth-card {
    padding: 28px 22px;
    margin: 0;
  }

  .auth-header {
    margin-bottom: 18px;
  }

  .auth-header svg {
    width: 28px;
    height: 28px;
  }

  .auth-brand {
    font-size: 1.35rem;
  }

  .auth-title {
    font-size: 1.2rem;
    margin-bottom: 4px;
  }

  .auth-subtitle {
    font-size: 0.78rem;
    margin-bottom: 18px;
  }

  .auth-form {
    gap: 12px;
  }

  .auth-form .form-input {
    padding: 11px 14px;
    font-size: 0.85rem;
  }

  .auth-form .btn-generate {
    padding: 12px;
    font-size: 0.9rem;
    margin-top: 2px;
  }

  .auth-divider {
    margin: 12px 0;
  }

  .auth-google-btn {
    padding: 11px;
    font-size: 0.85rem;
  }

  .auth-toggle {
    margin-top: 12px;
    font-size: 0.78rem;
  }

  .auth-forgot {
    margin-top: -4px;
  }

  /* ── Glass cards → less padding on mobile ──────────────────── */
  .control-section {
    padding: 16px;
  }

  /* ── Templates dropdown ────────────────────────────────────── */
  .templates-dropdown {
    max-height: 240px;
  }

  /* ── Result images on mobile ───────────────────────────────── */
  .result-images-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .result-image-actions {
    opacity: 1;
  }

  /* ── Persona wizard → full width ───────────────────────────── */
  #persona-wizard>.glass-card {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 95vh !important;
    margin: 0 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS — Small Mobile (≤ 480px)
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }

  .view-container {
    padding: 12px;
    padding-bottom: 80px;
  }

  .top-bar {
    height: 50px;
    padding: 0 12px;
  }

  .view-title {
    font-size: 0.9rem;
  }

  .status-badge {
    font-size: 0.68rem;
    padding: 4px 8px;
  }

  /* Home stats → single column */
  .home-stats {
    grid-template-columns: 1fr !important;
  }

  .home-quick-actions {
    grid-template-columns: 1fr !important;
  }

  /* Gallery → single column */
  .gallery-grid {
    grid-template-columns: 1fr !important;
  }

  /* Mode toggle → smaller */
  .mode-btn {
    padding: 6px 8px;
    font-size: 0.68rem;
  }

  .mode-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Prompt textarea */
  .form-textarea {
    min-height: 80px;
    padding: 12px;
    font-size: 0.82rem;
  }

  /* Landing */
  .landing-hero h2 {
    font-size: 1.5rem !important;
  }

  .landing-subtitle {
    font-size: 0.85rem !important;
  }

  .landing-models-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px;
  }

  .model-badge {
    font-size: 0.7rem !important;
    padding: 6px 10px !important;
  }

  /* Buttons */
  .btn-generate {
    padding: 14px;
    font-size: 0.85rem;
  }

  /* Glass card defaults */
  .glass-card {
    border-radius: var(--radius-lg);
  }

  .control-section {
    padding: 14px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   iOS / ANDROID SAFE AREA & TOUCH OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════ */

/* iOS safe area insets */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-nav {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .view-container {
    padding-bottom: max(80px, calc(70px + env(safe-area-inset-bottom)));
  }
}

/* Touch targets — minimum 44px per Apple HIG */
button,
a,
select,
input[type="checkbox"] {
  min-height: 44px;
}

.mode-btn,
.dimension-pill,
.style-pill,
.num-pill,
.gallery-filter-btn,
.gallery-action-btn,
.mobile-nav-btn {
  min-height: 44px;
}

/* Prevent text-size adjust on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Smooth momentum scrolling on iOS */
.view-container,
.gallery-grid,
.mode-toggle,
.mobile-nav-inner,
.home-recent-scroll,
.templates-dropdown {
  -webkit-overflow-scrolling: touch;
}

/* Remove tap highlight on mobile */
* {
  -webkit-tap-highlight-color: transparent;
}

/* ── Focus-visible for accessibility ─────────────────────────── */
:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ── Reduced motion for accessibility ────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   CELEBRATION MODAL — Confetti, animated counter, CTAs
   ═══════════════════════════════════════════════════════════════ */
.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: hsla(230, 25%, 6%, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: celebrationFadeIn 0.4s var(--ease-out);
}

.celebration-overlay.celebration-exit {
  animation: celebrationFadeOut 0.4s var(--ease-out) forwards;
}

@keyframes celebrationFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes celebrationFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.celebration-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.celebration-particle {
  position: absolute;
  top: -20px;
  border-radius: 50%;
  animation: particleFall linear forwards;
  opacity: 0.85;
}

@keyframes particleFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.celebration-card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: 40px 36px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-xl), 0 0 80px hsla(245, 70%, 50%, 0.15);
  animation: celebrationCardIn 0.5s var(--ease-spring);
  overflow: hidden;
  z-index: 1;
}

@keyframes celebrationCardIn {
  from {
    transform: scale(0.8) translateY(30px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.celebration-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: radial-gradient(circle at center, hsla(245, 70%, 50%, 0.08), transparent 60%);
  animation: celebrationGlowPulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes celebrationGlowPulse {

  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.celebration-emoji {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 12px;
  animation: celebrationBounce 0.6s var(--ease-spring) 0.3s both;
}

@keyframes celebrationBounce {
  from {
    transform: scale(0);
  }

  50% {
    transform: scale(1.3);
  }

  to {
    transform: scale(1);
  }
}

.celebration-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.celebration-subtitle {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.celebration-token-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  margin: 0 -12px 20px;
  background: linear-gradient(135deg, hsla(245, 70%, 50%, 0.1), hsla(280, 60%, 50%, 0.08));
  border-radius: var(--radius-lg);
  border: 1px solid hsla(245, 70%, 50%, 0.15);
}

.celebration-token-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tokenSpin 2s linear infinite;
}

@keyframes tokenSpin {
  from {
    transform: rotateY(0deg);
  }

  to {
    transform: rotateY(360deg);
  }
}

.celebration-token-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

.celebration-token-count {
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.celebration-token-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.celebration-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.celebration-cta {
  margin-bottom: 12px;
}

.celebration-dismiss {
  display: block;
  margin: 0 auto;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 8px 16px;
  transition: color var(--duration-fast) ease;
}

.celebration-dismiss:hover {
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   VERIFICATION BANNER CARD (Educational, animated)
   ═══════════════════════════════════════════════════════════════ */
.verify-banner-card {
  margin-bottom: 20px;
  animation: verifySlideIn 0.5s var(--ease-out);
}

@keyframes verifySlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.verify-card-inner {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, hsla(245, 70%, 50%, 0.06), hsla(38, 70%, 50%, 0.04));
  border: 1px solid hsla(245, 60%, 50%, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px hsla(245, 70%, 40%, 0.08);
}

.verify-card-icon-wrap {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verify-card-icon {
  font-size: 2rem;
  z-index: 1;
  animation: verifyIconBounce 2s ease-in-out infinite;
}

@keyframes verifyIconBounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

.verify-card-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: hsla(245, 70%, 50%, 0.15);
  animation: verifyPulse 2s ease-in-out infinite;
}

@keyframes verifyPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.3;
  }

  50% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.verify-card-content {
  flex: 1;
  min-width: 0;
}

.verify-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.verify-token-highlight {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.verify-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.verify-card-steps {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.verify-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.verify-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-500);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.verify-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Mobile adjustments for celebration + verify ──────────────── */
@media (max-width: 480px) {
  .celebration-card {
    padding: 28px 20px;
  }

  .celebration-title {
    font-size: 1.25rem;
  }

  .celebration-token-count {
    font-size: 2rem;
  }

  .verify-card-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 20px 16px;
  }

  .verify-card-steps {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .verify-card-actions {
    flex-direction: column;
    width: 100%;
  }

  .verify-card-actions .btn-generate {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════════
   TOKEN PURCHASE PAGE
   ═══════════════════════════════════════════════════════════════ */
.tokens-page {
  max-width: 960px;
  margin: 0 auto;
}

.tokens-hero {
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.tokens-balance-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}

.tokens-balance-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.tokens-balance-label {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.tokens-balance-value {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.tokens-balance-sub {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.tokens-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tokens-section-sub {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

/* ── Token Card Grid ─────────────────────────────────────────── */
.tokens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.token-card {
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s ease;
  position: relative;
}

.token-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.token-card-popular {
  border: 2px solid var(--brand-400);
}

.token-badge-popular {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  padding: 3px 12px;
  background: var(--accent-gradient);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.token-card-emoji {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.token-card-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.token-card-tokens {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.token-card-tokens span {
  font-size: 0.7rem;
  font-weight: 600;
}

.token-card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.token-card-per {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.token-card-desc {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.token-buy-btn {
  width: 100%;
  font-size: 0.82rem !important;
  padding: 10px 14px !important;
  gap: 6px;
}

/* ── Token Card Promo Styling ────────────────────────────────── */
.token-card-promo {
  background: linear-gradient(135deg, hsla(340, 70%, 55%, 0.05), hsla(20, 80%, 55%, 0.05));
}

.token-card-promo:hover {
  box-shadow: 0 8px 32px hsla(340, 70%, 55%, 0.2);
}

@keyframes pulse-badge {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.85;
    transform: scale(1.05);
  }
}

/* ── Token Costs Table ───────────────────────────────────────── */
.tokens-costs-table {
  padding: 16px;
  overflow-x: auto;
}

.tokens-costs-table table {
  width: 100%;
  border-collapse: collapse;
}

.tokens-costs-table th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  padding: 8px 12px;
  border-bottom: 1px solid var(--glass-border);
}

.tokens-costs-table td {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 10px 12px;
  border-bottom: 1px solid var(--glass-border);
}

.tokens-costs-table tr:last-child td {
  border-bottom: none;
}

.tokens-costs-table td i {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 4px;
}

/* ── Transaction History ─────────────────────────────────────── */
.tokens-history {
  padding: 16px;
}

.tokens-history-loading,
.tokens-history-empty {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  text-align: center;
  padding: 24px;
}

.tokens-tx-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tokens-tx-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) ease;
  font-size: 0.82rem;
}

.tokens-tx-row:hover {
  background: var(--surface-1);
}

.tx-icon {
  font-size: 1rem;
}

.tx-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tx-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.82rem;
}

.tx-date {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.tx-amount {
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 60px;
  text-align: right;
}

.tx-credit .tx-amount {
  color: #10b981;
}

.tx-debit .tx-amount {
  color: #ef4444;
}

.tx-bal {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  min-width: 60px;
  text-align: right;
}

/* ── Admin Stats responsive grid ─────────────────────────────── */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

/* ── Token page responsive ───────────────────────────────────── */
@media (max-width: 768px) {
  .tokens-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .token-card {
    padding: 14px 10px;
  }

  .token-card-emoji {
    font-size: 1.4rem;
  }

  .token-card-tokens {
    font-size: 1.2rem;
  }

  .tokens-balance-value {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .tokens-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LANDING — SHOWCASE CARDS
   ═══════════════════════════════════════════════════════════════ */
.landing-showcase {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 800px;
  width: 100%;
  padding: 0 24px 60px;
}

.landing-showcase-card {
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease;
  perspective: 800px;
}

.landing-showcase-card:hover {
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
  box-shadow: var(--shadow-xl), 0 0 60px hsla(245, 70%, 50%, 0.08);
}

.showcase-glow {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.landing-showcase-card:hover .showcase-glow {
  opacity: 1;
}

.showcase-glow-image { background: radial-gradient(circle, hsla(245, 80%, 55%, 0.12), transparent 70%); }
.showcase-glow-video { background: radial-gradient(circle, hsla(320, 70%, 50%, 0.10), transparent 70%); }
.showcase-glow-audio { background: radial-gradient(circle, hsla(155, 70%, 45%, 0.10), transparent 70%); }

.showcase-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  transition: transform 0.3s var(--ease-spring);
}

.landing-showcase-card:hover .showcase-icon {
  transform: scale(1.15);
}

.landing-showcase-card[data-type="image"] .showcase-icon {
  background: linear-gradient(135deg, hsla(245, 70%, 62%, 0.2), hsla(280, 65%, 60%, 0.12));
  color: var(--brand-300);
}

.landing-showcase-card[data-type="video"] .showcase-icon {
  background: linear-gradient(135deg, hsla(320, 60%, 55%, 0.2), hsla(280, 65%, 60%, 0.12));
  color: hsl(320, 60%, 65%);
}

.landing-showcase-card[data-type="audio"] .showcase-icon {
  background: linear-gradient(135deg, hsla(155, 65%, 48%, 0.2), hsla(180, 50%, 45%, 0.12));
  color: var(--success);
}

.landing-showcase-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.landing-showcase-card p {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.showcase-preview-bar {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.showcase-preview-bar span {
  width: 24px;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-4);
  transition: background 0.3s ease;
}

.landing-showcase-card:hover .showcase-preview-bar span {
  background: var(--brand-400);
  animation: barPulse 1.2s ease-in-out infinite;
}

.landing-showcase-card:hover .showcase-preview-bar span:nth-child(2) { animation-delay: 0.15s; }
.landing-showcase-card:hover .showcase-preview-bar span:nth-child(3) { animation-delay: 0.3s; }
.landing-showcase-card:hover .showcase-preview-bar span:nth-child(4) { animation-delay: 0.45s; }
.landing-showcase-card:hover .showcase-preview-bar span:nth-child(5) { animation-delay: 0.6s; }

@keyframes barPulse {
  0%, 100% { opacity: 0.5; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(2); }
}

/* ═══════════════════════════════════════════════════════════════
   LANDING — ANIMATED STATS
   ═══════════════════════════════════════════════════════════════ */
.landing-stats {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 0 24px 60px;
  max-width: 700px;
  width: 100%;
}

.landing-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.landing-stat-number {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.landing-stat-plus {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.landing-stat-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--glass-border), transparent);
}

/* ═══════════════════════════════════════════════════════════════
   LANDING — FLOATING PARTICLES
   ═══════════════════════════════════════════════════════════════ */
.landing-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.landing-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: hsla(245, 70%, 70%, 0.3);
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
    transform: translateY(90vh) translateX(10px) scale(1);
  }
  90% {
    opacity: 0.6;
    transform: translateY(10vh) translateX(-10px) scale(0.8);
  }
  100% {
    transform: translateY(0) translateX(0) scale(0);
    opacity: 0;
  }
}

/* Enhanced model badges hover */
.model-badge {
  transition: all 0.3s var(--ease-out);
}

.model-badge:hover {
  border-color: var(--brand-400);
  color: var(--text-primary);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 24px hsla(245, 70%, 50%, 0.12);
  background: hsla(245, 70%, 55%, 0.08);
}

/* ── Landing responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .landing-showcase {
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 400px;
  }
  .landing-stats {
    gap: 16px;
    flex-wrap: wrap;
  }
  .landing-stat-number {
    font-size: 1.5rem;
  }
  .landing-stat-divider {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════ */
@media print {

  .sidebar,
  .mobile-nav,
  .top-bar {
    display: none !important;
  }

  .main-content {
    margin: 0;
  }

  body {
    background: white;
    color: black;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE v2 — Dramatic UX/UI Improvements
   ═══════════════════════════════════════════════════════════════ */

/* ── Gradient Animated Text ────────────────────────────────────── */
.landing-gradient-text {
  background: linear-gradient(135deg, hsl(245, 70%, 72%), hsl(280, 65%, 70%), hsl(320, 60%, 65%), hsl(200, 70%, 65%));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 6s ease infinite;
}

@keyframes gradientText {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Trust Ribbon ─────────────────────────────────────────────── */
.landing-trust-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}

.trust-item {
  color: hsl(155, 65%, 55%);
  font-weight: 500;
}

.trust-divider {
  color: var(--surface-4);
}

/* ── Demo Button (Secondary CTA) ─────────────────────────────── */
.landing-demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: hsla(230, 20%, 15%, 0.6);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out);
}

.landing-demo-btn:hover {
  border-color: var(--brand-400);
  background: hsla(245, 50%, 20%, 0.3);
  transform: translateY(-1px);
}

.landing-cta-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Section Title (shared) ──────────────────────────────────── */
.landing-section-title {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.landing-section-sub {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.5;
}

/* ── Gallery Marquee ──────────────────────────────────────────── */
.landing-gallery-section {
  padding: 60px 0 40px;
  max-width: 100%;
  overflow: hidden;
}

.landing-gallery-marquee {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 16px;
  animation: marqueeScroll 30s linear infinite;
  width: max-content;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-card {
  flex-shrink: 0;
  width: 200px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out);
}

.marquee-card:hover {
  transform: scale(1.05);
}

.marquee-card-inner {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.marquee-card-inner::after {
  content: '✦';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  opacity: 0.3;
  color: white;
}

.marquee-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: hsla(230, 20%, 10%, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: white;
  text-align: center;
}

/* ── Interactive Model Cards ──────────────────────────────────── */
.landing-models-interactive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto 32px;
  padding: 0 20px;
}

.model-interactive-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  overflow: hidden;
  transition: all var(--duration-base) var(--ease-out);
  cursor: default;
}

.model-interactive-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.model-card-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.15;
  filter: blur(40px);
  transition: opacity var(--duration-base) ease;
}

.model-interactive-card:hover .model-card-glow {
  opacity: 0.3;
}

.model-card-category {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: hsla(245, 60%, 50%, 0.15);
  color: var(--brand-300);
  margin-bottom: 8px;
}

.model-interactive-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.model-interactive-card p {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.model-card-cost {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--brand-300);
  background: hsla(245, 60%, 50%, 0.08);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

/* ── Pricing Section ──────────────────────────────────────────── */
.landing-pricing-section {
  padding: 60px 20px;
  text-align: center;
}

.landing-pricing-section h3 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.landing-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  padding: 28px 20px;
  text-align: center;
  position: relative;
}

.pricing-card-featured {
  border-color: var(--brand-400);
  box-shadow: 0 0 40px hsla(245, 70%, 50%, 0.12);
  transform: scale(1.04);
}

.pricing-card-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 12px;
  border-radius: var(--radius-full);
}

.pricing-card-header {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.pricing-card-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.pricing-card-unit {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.pricing-features li {
  padding: 5px 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 18px;
}

.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: hsl(155, 65%, 55%);
  font-weight: 700;
  font-size: 0.7rem;
}

/* ── Footer Links (refactored from inline) ────────────────────── */
.landing-footer-links {
  margin-top: 8px;
  font-size: 0.78rem;
}

.landing-footer-link {
  color: hsl(230, 10%, 50%);
  text-decoration: none;
  margin: 0 8px;
  transition: color var(--duration-fast) ease;
}

.landing-footer-link:hover {
  color: var(--text-primary);
}

/* ── Responsive: Models & Pricing ─────────────────────────────── */
@media (max-width: 768px) {
  .landing-models-interactive {
    grid-template-columns: 1fr 1fr;
    padding: 0 16px;
  }

  .landing-pricing-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .pricing-card-featured {
    transform: none;
  }

  .marquee-card {
    width: 150px;
  }

  .landing-cta-group {
    flex-direction: column;
  }

  .landing-demo-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .landing-models-interactive {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD HOME v2 — Replace Inline Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Usage Grid ──────────────────────────────────────────────── */
.home-usage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.home-token-card {
  padding: 20px;
}

.home-token-label {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  font-weight: 500;
}

.home-token-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.home-token-bar {
  height: 8px;
  background: var(--border, var(--glass-border));
  border-radius: 99px;
  overflow: hidden;
}

.home-token-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, hsl(245, 70%, 62%), hsl(280, 60%, 60%));
  border-radius: 99px;
  transition: width 0.6s ease;
}

.home-token-sub {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-top: 6px;
}

.home-buy-tokens-btn {
  margin-top: 8px;
  font-size: 0.72rem;
  padding: 4px 10px;
  width: 100%;
}

/* ── Donut Chart Card ────────────────────────────────────────── */
.home-donut-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.home-donut-legend {
  font-size: 0.78rem;
}

.home-donut-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.home-donut-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.home-donut-dot--image { background: hsl(245, 70%, 62%); }
.home-donut-dot--video { background: hsl(340, 75%, 55%); }
.home-donut-dot--audio { background: hsl(160, 60%, 45%); }

/* ── Activity Timeline ───────────────────────────────────────── */
.home-timeline {
  padding: 16px;
  margin-top: 12px;
}

.home-timeline-label {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  font-weight: 500;
}

.home-timeline-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--glass-border);
}

.home-timeline-icon {
  font-size: 1.1rem;
}

.home-timeline-prompt {
  flex: 1;
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-timeline-time {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* ── Onboarding Card ─────────────────────────────────────────── */
.home-onboarding {
  padding: 32px 24px;
  text-align: center;
}

.home-onboarding h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.home-onboarding p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.home-onboarding-steps {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.onboarding-step {
  flex: 1;
  min-width: 140px;
  max-width: 180px;
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  text-align: center;
}

.onboarding-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.onboarding-step h4 {
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.onboarding-step p {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-bottom: 0;
}

/* ── Weekly Sparkline ────────────────────────────────────────── */
.home-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}

.sparkline-bar {
  flex: 1;
  background: hsla(245, 70%, 62%, 0.3);
  border-radius: 3px 3px 0 0;
  min-height: 4px;
  transition: height 0.4s var(--ease-out);
}

.sparkline-bar.today {
  background: var(--brand-400);
}

/* ── Enhanced Quick Action Cards ─────────────────────────────── */
.home-action {
  position: relative;
  overflow: hidden;
}

.home-action::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent, transparent);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  transition: background var(--duration-base) ease;
  pointer-events: none;
}

.home-action:hover::after {
  background: linear-gradient(135deg, hsla(245, 70%, 62%, 0.4), hsla(280, 65%, 60%, 0.2));
}

.home-action:hover {
  transform: translateY(-4px) scale(1.02);
}

/* ── POE Badge (for create.js) ───────────────────────────────── */
.poe-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(139, 92, 246, 0.9);
  color: #fff;
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .home-usage-grid {
    grid-template-columns: 1fr;
  }

  .home-onboarding-steps {
    flex-direction: column;
    align-items: center;
  }
}