/* === variables.css === */
/* ==========================================================================
   HDR Boost Design System - Variables
   AUTO-GENERATED from tokens.json — do not edit directly!
   Run: node design-tokens/generate.js
   ========================================================================== */

:root {
  /* Colors */
  --bg: #000000;
  --bg-elevated: #0A0A0A;
  --bg-surface: #141414;
  --accent: #FFFFFF;
  --accent-hover: #E8E8E8;
  --accent-muted: rgba(255, 255, 255, 0.15);
  --accent-glow: rgba(255, 255, 255, 0.35);
  --text: #E8E8E8;
  --text-secondary: #888888;
  --text-tertiary: #555555;
  --border: #1F1F1F;
  --border-hover: #333333;
  --success: #4ADE80;
  --success-bg: rgba(74, 222, 128, 0.12);
  --error: #F87171;
  --error-bg: rgba(248, 113, 113, 0.12);
  --warning: #FBBF24;
  --warning-bg: rgba(251, 191, 36, 0.12);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 18px;
  --text-xl: 24px;
  --text2xl: 32px;
  --text3xl: 42px;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-accent: 0 10px 30px rgba(255, 255, 255, 0.35);

  /* Transitions */
  --transition-fast: 0.08s ease;
  --transition-base: 0.15s ease;
  --transition-slow: 0.25s ease;
}


/* === layout.css === */
/* ==========================================================================
   HDR Boost Design System - Layout
   ========================================================================== */

/* ==========================================================================
   Page Shell
   ========================================================================== */

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg) 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.shell-narrow {
  max-width: 640px;
}

.shell-wide {
  max-width: 1280px;
}

/* ==========================================================================
   Page Structure
   ========================================================================== */

.page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-header {
  margin-bottom: var(--space-xl);
}

.page-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-sm);
}

.page-description {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 600px;
  margin: 0;
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  margin-bottom: var(--space-2xl);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.section-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin: 0;
}

/* ==========================================================================
   Grid System
   ========================================================================== */

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Auto-fit grids */
.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-auto-sm {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Legacy page grid */
.page-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  align-items: start;
}

/* Stat grid */
.stat-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

/* ==========================================================================
   Stack (Vertical Spacing)
   ========================================================================== */

.stack {
  display: flex;
  flex-direction: column;
}

.stack-xs { gap: var(--space-xs); }
.stack-sm { gap: var(--space-sm); }
.stack-md { gap: var(--space-md); }
.stack-lg { gap: var(--space-lg); }
.stack-xl { gap: var(--space-xl); }

/* ==========================================================================
   Flex Utilities
   ========================================================================== */

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* ==========================================================================
   Button Row
   ========================================================================== */

.button-row {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Text Utilities
   ========================================================================== */

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }

.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

.text-muted { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Legacy muted class */
.muted { color: var(--text-secondary); }

/* ==========================================================================
   Spacing Utilities
   ========================================================================== */

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }

.mx-auto { margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Display Utilities
   ========================================================================== */

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 900px) {
  .shell {
    padding: var(--space-xl) var(--space-md) 0;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .card {
    padding: 26px;
  }

  /* Hide on tablet */
  .hide-tablet {
    display: none;
  }
}

@media (max-width: 600px) {
  .shell {
    padding: var(--space-lg) var(--space-md) 0;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .button-row {
    flex-direction: column;
  }

  /* Hide on mobile */
  .hide-mobile {
    display: none;
  }

  /* Show only on mobile */
  .show-mobile {
    display: block;
  }
}

/* Show only on mobile - default hidden */
.show-mobile {
  display: none;
}

/* ==========================================================================
   Auth Page (Centered Minimal Layout)
   ========================================================================== */

/* Hide nav when auth-page or landing-page is present */
body:has(.auth-page) .nav,
body:has(.landing-page) .nav {
  display: none;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 250px);
  padding: var(--space-xl) var(--space-md);
  width: 100%;
}

.auth-page > .card {
  width: 100%;
  max-width: 420px;
  padding: var(--space-2xl) var(--space-xl);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.auth-logo .brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent);
  box-shadow: 0 0 0 8px var(--accent-muted);
}

.auth-logo-img {
  width: 64px;
  height: 64px;
}

.auth-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.01em;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin: 0;
}

.auth-body {
  display: flex;
  flex-direction: column;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.auth-form .divider {
  margin: var(--space-md) 0;
}

.auth-switch {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: var(--space-md) 0 0;
}

.auth-switch a {
  color: var(--accent);
  font-weight: var(--font-medium);
}

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

.auth-link {
  text-align: center;
  font-size: var(--text-sm);
  margin: var(--space-sm) 0 0;
}

.auth-link a {
  color: var(--text-secondary);
}

.auth-link a:hover {
  color: var(--text);
}

.auth-logged-in {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (max-width: 480px) {
  .auth-page > .card {
    padding: var(--space-xl);
    border-radius: var(--radius-md);
  }

  .auth-logo .brand-mark {
    width: 40px;
    height: 40px;
  }
}


/* === components.css === */
/* ==========================================================================
   HDR Boost Design System - Components
   ========================================================================== */

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-base), background var(--transition-base);
}

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

/* Primary - solid accent */
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--accent-hover);
  box-shadow: var(--shadow-accent);
}

/* Secondary - ghost with border */
.btn-secondary {
  background: var(--bg-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

/* Ghost - minimal */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  background: var(--bg-hover);
}

/* Danger */
.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(255, 107, 107, 0.15);
}

/* Sizes */
.btn-sm {
  padding: 8px 12px;
  font-size: var(--text-sm);
}

.btn-lg {
  padding: 16px 24px;
  font-size: var(--text-lg);
}

/* Full width */
.btn-block {
  width: 100%;
}

/* Legacy aliases for backward compat */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-weight: var(--font-bold);
  box-shadow: var(--shadow-accent);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-base), background var(--transition-base);
}

.cta:hover {
  transform: translateY(-1px);
  background: var(--accent-hover);
  box-shadow: var(--shadow-accent);
}

.cta.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

.cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-compact {
  padding: var(--space-lg);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.card-title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  letter-spacing: -0.01em;
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-top: var(--space-xs);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.card-footer {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

/* Featured card variant */
.card-featured {
  border-color: var(--accent);
  position: relative;
}

/* ==========================================================================
   Badges / Pills
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.badge-default {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-accent {
  background: var(--accent-muted);
  color: var(--text);
  border: 1px solid var(--border);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.badge-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

/* Badge sizes */
.badge-sm {
  padding: 2px 8px;
  font-size: 11px;
}

/* Larger pill variant */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-muted);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================================================
   Form Inputs
   ========================================================================== */

.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: var(--text-base);
  font-family: inherit;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.input::placeholder {
  color: var(--text-tertiary);
}

.input-error {
  border-color: var(--error);
}

.input-error:focus {
  box-shadow: 0 0 0 3px var(--error-bg);
}

/* Input with label */
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: var(--font-medium);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--error);
}

/* Legacy form group */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 16px;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

/* ==========================================================================
   Alerts / Messages
   ========================================================================== */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: var(--font-semibold);
  margin-bottom: 4px;
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

.alert-error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error);
}

.alert-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning);
}

.alert-info {
  background: var(--accent-muted);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Legacy message classes */
.error-msg {
  color: var(--error);
  padding: 12px 14px;
  background: var(--error-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--error-border);
}

.success-msg {
  color: var(--success);
  padding: 12px 14px;
  background: var(--success-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--success-border);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th,
.table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: var(--bg-hover);
}

/* Clickable rows */
.table tr.clickable-row {
  cursor: pointer;
}

.table tr.clickable-row:hover td {
  background: var(--accent-muted);
}

/* Compact variant */
.table-compact th,
.table-compact td {
  padding: 8px 12px;
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.tabs {
  display: flex;
  gap: var(--space-xs);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-lg);
}

.tab {
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: var(--font-medium);
  font-family: inherit;
  font-size: var(--text-base);
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-base);
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--accent);
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ==========================================================================
   Stat Cards
   ========================================================================== */

.stat-card {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

.stat-card .stat-value {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  letter-spacing: -0.02em;
}

.stat-change {
  font-size: var(--text-sm);
  margin-top: var(--space-xs);
}

.stat-change-positive {
  color: var(--success);
}

.stat-change-negative {
  color: var(--error);
}

/* Legacy stat styles */
.stat {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.stat-label {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.stat-value {
  font-weight: var(--font-bold);
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Divider
   ========================================================================== */

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: var(--space-lg) 0;
  color: var(--text-secondary);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.divider span {
  padding: 0 var(--space-md);
  font-size: var(--text-sm);
}

/* ==========================================================================
   Spinner / Loading
   ========================================================================== */

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: var(--space-sm);
}

.progress-row.is-hidden {
  display: none;
}

/* ==========================================================================
   Upload Box
   ========================================================================== */

.upload-box {
  border: 2px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color var(--transition-base), background var(--transition-base);
}

.upload-box.highlight {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.upload-box input[type="file"] {
  margin-top: 12px;
}

/* ==========================================================================
   Preview Container
   ========================================================================== */

.preview-container {
  margin: 10px 0 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
}

#preview-image,
#source-preview-image {
  display: block;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  max-height: 400px;
  margin: 0 auto;
}

/* ==========================================================================
   Google Button (special case)
   ========================================================================== */

.google-btn {
  width: 100%;
  justify-content: center;
  background: #fff;
  color: #111a2e;
  box-shadow: var(--shadow-sm);
}

.google-btn:hover {
  background: #f5f5f5;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-md);
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color var(--transition-base);
}

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

.modal-body {
  padding: var(--space-lg);
}

/* ==========================================================================
   Pricing Cards
   ========================================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  padding-top: 14px;
}

.pricing-card {
  position: relative;
  padding: var(--space-lg);
  padding-top: calc(var(--space-lg) + 4px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  transition: border-color var(--transition-base), transform var(--transition-fast);
}

.pricing-card:hover {
  border-color: var(--border-hover);
}

.pricing-card.featured {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  z-index: 1;
}

.pricing-name {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-xs);
}

.pricing-credits {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--accent);
}

.pricing-price {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin-top: var(--space-sm);
}

.pricing-per-credit {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* Small spinner variant */
.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
  display: inline-block;
  vertical-align: middle;
}

/* ==========================================================================
   Pricing Section (Landing)
   ========================================================================== */

.pricing-section {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  margin-bottom: var(--space-xl);
}

/* Skeleton loading cards */
.pricing-card-skeleton {
  height: 280px;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.02) 25%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.02) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

.site-footer {
  margin-top: auto;
  padding: var(--space-2xl) 0 var(--space-lg);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-logo {
  width: 24px;
  height: 24px;
}

.footer-title {
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md) var(--space-lg);
}

.footer-links a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  transition: color var(--transition-base);
}

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

.footer-copyright {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  margin: 0;
}

.footer-made-with {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  margin: var(--space-xs) 0 0;
}

.footer-made-with .heart {
  display: inline-block;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.2); }
  28% { transform: scale(1); }
  42% { transform: scale(1.2); }
  56% { transform: scale(1); }
}

/* ==========================================================================
   Legal Pages (Privacy, Terms)
   ========================================================================== */

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-lg) 0 var(--space-3xl);
}

.legal-page h1 {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  margin: 0 0 var(--space-xs);
  letter-spacing: -0.02em;
}

.legal-updated {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-xl);
}

.legal-section {
  margin-bottom: var(--space-xl);
}

.legal-section h2 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin: 0 0 var(--space-md);
  color: var(--text);
}

.legal-section h3 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  margin: var(--space-lg) 0 var(--space-sm);
  color: var(--text);
}

.legal-section p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.legal-section ul {
  color: var(--text-secondary);
  margin: 0 0 var(--space-md);
  padding-left: var(--space-lg);
  line-height: 1.7;
}

.legal-section li {
  margin-bottom: var(--space-xs);
}

.legal-section a {
  color: var(--accent);
}

.legal-section a:hover {
  text-decoration: underline;
}

.legal-section strong {
  color: var(--text);
  font-weight: var(--font-semibold);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-top: 1px solid var(--border);
}

.pagination-info {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  min-width: 100px;
  text-align: center;
}

.pagination-size {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  color: var(--text);
  font-size: var(--text-sm);
  font-family: inherit;
  cursor: pointer;
  margin-left: var(--space-md);
}

.pagination-size:hover {
  border-color: var(--border-hover);
}

.pagination-size:focus {
  outline: none;
  border-color: var(--accent);
}


/* === main.css === */
/* ==========================================================================
   HDR Boost - Main Stylesheet
   Imports design system modules + page-specific overrides
   ========================================================================== */

/* ==========================================================================
   Base / Reset
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, var(--accent-muted), transparent 26%),
    radial-gradient(circle at 80% -4%, rgba(255, 255, 255, 0.06), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 6px;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-muted);
}

.brand-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-weight: var(--font-bold);
  letter-spacing: -0.01em;
}

.brand-sub {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-user {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.nav-link {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: var(--font-semibold);
  transition: background var(--transition-base), border-color var(--transition-base);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-hover);
}

.nav-link.ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.nav-link.ghost:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-link.nav-link-danger {
  color: var(--error);
  border-color: transparent;
  background: transparent;
}

.nav-link.nav-link-danger:hover {
  color: var(--error);
  background: var(--error-bg);
  border-color: var(--error-border);
}

/* Credit display in header */
#credit-display {
  font-size: var(--text-sm);
}

/* ==========================================================================
   Hamburger Menu (Mobile)
   ========================================================================== */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   Hero Section (Landing Page)
   ========================================================================== */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg) var(--space-lg);
}

.hero-logo {
  margin-bottom: var(--space-lg);
}

.hero-logo-img {
  width: 80px;
  height: 80px;
}

.hero-title {
  font-size: clamp(42px, 8vw, 72px);
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-weight: var(--font-bold);
}

.hero-subtitle {
  margin: var(--space-lg) 0 0;
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 480px;
  line-height: 1.6;
}

.hero-cta {
  margin-top: var(--space-xl);
}

/* ==========================================================================
   Example Section (Landing Page)
   ========================================================================== */

.example {
  padding: var(--space-md) var(--space-lg) var(--space-2xl);
  display: flex;
  justify-content: center;
}

.example-stack {
  position: relative;
  width: 520px;
  height: 480px;
}

.example-item {
  position: absolute;
  width: 260px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-base);
}

.example-item:hover {
  transform: scale(1.02);
}

.example-before {
  top: 0;
  left: 0;
  z-index: 1;
}

.example-after {
  top: 60px;
  right: 0;
  z-index: 1;
}

.example-item img {
  display: block;
  width: 100%;
  height: auto;
}

.example-label {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: var(--text);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.example-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 180px;
  height: 75px;
}

@media (max-width: 700px) {
  .example-stack {
    width: 340px;
    height: 420px;
  }

  .example-item {
    width: 180px;
  }

  .example-before {
    top: 0;
    left: 0;
  }

  .example-after {
    top: 40px;
    right: 0;
  }

  .example-arrow {
    width: 160px;
    height: 67px;
  }
}

/* ==========================================================================
   Feature List
   ========================================================================== */

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: grid;
  gap: 10px;
}

.feature-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.feature-list .dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-muted);
}

/* ==========================================================================
   Muted Card (dashed border variant)
   ========================================================================== */

.muted-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
  padding: 14px 16px;
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   Mobile Navigation
   ========================================================================== */

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .menu-toggle {
    display: flex;
  }

  .nav-right {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 8px;
    box-shadow: var(--shadow-md);
    z-index: 100;
  }

  .nav-right.open {
    display: flex;
  }

  .nav-right .nav-user {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    padding: 10px 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
    text-align: left;
  }

  .nav-right .nav-link {
    font-size: var(--text-base);
    padding: 10px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    text-align: left;
    transition: background var(--transition-base), color var(--transition-base);
  }

  .nav-right .nav-link:hover {
    background: var(--bg-hover);
    color: var(--text);
  }

  .nav-right .nav-link.nav-link-danger {
    color: var(--error);
    margin-top: 4px;
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding-top: 14px;
  }

  .nav-right .nav-link.nav-link-danger:hover {
    background: var(--error-bg);
    color: var(--error);
  }

  .nav {
    position: relative;
  }
}
