/* ==========================================================================
   MADNESSBOT — OFFICIAL BRAND DESIGN SYSTEM v2.0 (LIGHT THEME)
   Based on MadnessBot Style Guide — December 2025
   ========================================================================== */

/* Import Google Fonts - Official Brand Typography */
@import url('https://fonts.googleapis.com/css2?family=Zen+Dots&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

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

/* ==========================================================================
   DESIGN TOKENS — Official Brand Variables (Light Theme)
   ========================================================================== */
:root {
  /* Primary Colors - Orange Palette */
  --orange-500: #FF4D00;
  --orange-400: #FF6B2E;
  --orange-300: #FF8A5C;
  --orange-600: #E64500;
  --orange-700: #CC3D00;
  
  /* Dark Neutrals (for text on light backgrounds) */
  --dark-950: #0A0A0F;
  --dark-900: #111118;
  --dark-800: #1A1A25;
  --dark-700: #2A2A3A;
  --dark-600: #3A3A4A;
  --dark-500: #4A4A5A;
  
  /* Light Neutrals (for backgrounds) */
  --light-50: #FAFAFA;
  --light-100: #F5F5F5;
  --light-200: #E8E8E8;
  --light-300: #D4D4D4;
  --light-400: #A3A3A3;
  --light-500: #737373;
  
  /* Semantic Colors */
  --success: #16A34A;
  --warning: #D97706;
  --error: #DC2626;
  --info: #2563EB;
  
  /* Semantic Backgrounds (slightly stronger for light theme) */
  --success-bg: rgba(34, 197, 94, 0.12);
  --warning-bg: rgba(245, 158, 11, 0.12);
  --error-bg: rgba(239, 68, 68, 0.12);
  --info-bg: rgba(59, 130, 246, 0.12);
  --orange-bg: rgba(255, 77, 0, 0.1);
  
  /* Typography */
  --font-display: 'Zen Dots', cursive;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;
  
  /* Spacing Scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;
  
  /* Shadows (lighter for light theme) */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 30px rgba(255, 77, 0, 0.25);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Touch Targets */
  --touch-target: 44px;
  
  color-scheme: light;
  
  /* Light Theme Semantic Mappings */
  --brand-primary: var(--light-50);
  --brand-accent: var(--orange-500);
  --brand-accent-hover: var(--orange-600);
  --brand-accent-soft: var(--orange-bg);
  --background-color: var(--light-50);
  --surface-color: white;
  --surface-elevated: var(--light-100);
  --border-color: var(--light-300);
  --border-color-light: var(--light-200);
  --text-primary: var(--dark-950);
  --text-secondary: var(--dark-700);
  --text-tertiary: var(--light-500);
  --text-inverse: white;
  --primary-color: var(--orange-500);
  --primary-hover: var(--orange-600);
  --secondary-color: var(--orange-400);
  --success-color: var(--success);
  --warning-color: var(--warning);
  --error-color: var(--error);
  --info-color: var(--info);
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */
html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--light-50);
  color: var(--dark-950);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100vw;
  overflow-x: hidden;
  background: var(--light-50);
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */
.app-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--light-300);
  padding: var(--space-4) var(--space-6);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: var(--space-4);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.logo-icon {
  flex-shrink: 0;
}

/* Logo wordmark - Using Zen Dots display font */
.logo-wordmark {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.25rem);
  color: var(--dark-950);
  letter-spacing: 0;
}

/* Auth Section */
.auth-single {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.auth-button {
  background: var(--orange-500);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 90px;
}

.auth-button:hover {
  background: var(--orange-600);
  box-shadow: var(--shadow-glow);
}

.help-button {
  background: transparent;
  color: var(--dark-700);
  border: 1px solid var(--light-300);
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.help-button:hover {
  background: var(--light-100);
  border-color: var(--light-400);
}

.auth-user-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--light-100);
  padding: 6px 12px 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--light-300);
}

.user-name {
  font-size: 13px;
  color: var(--dark-900);
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-logout-btn {
  background: transparent;
  color: var(--dark-500);
  border: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.auth-logout-btn:hover {
  background: var(--error-bg);
  color: var(--error);
}

/* Session Dropdown */
.session-dropdown {
  background: white;
  border: 1px solid var(--light-300);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--dark-700);
  cursor: pointer;
  max-width: 180px;
  transition: all var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234A4A5A' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.session-dropdown:hover {
  border-color: var(--orange-500);
  background-color: var(--orange-bg);
}

.session-dropdown:focus {
  outline: none;
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px var(--orange-bg);
}

.session-dropdown option {
  background: white;
  color: var(--dark-900);
  padding: 8px;
}

/* ==========================================================================
   EMAIL VERIFICATION
   ========================================================================== */
.email-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: var(--space-1);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--light-200);
  color: var(--dark-500);
}

.email-status-chip.chip-verified {
  background: var(--success-bg);
  color: var(--success);
}

.email-status-chip.chip-verified::before {
  content: "✓";
}

.email-status-chip.chip-unverified {
  background: var(--warning-bg);
  color: var(--warning);
}

.verify-banner {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-left: 3px solid var(--warning);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 14px;
  font-weight: 500;
}

.verify-banner strong {
  font-weight: 600;
}

.verify-banner .btn {
  margin-left: auto;
  flex-shrink: 0;
}

.verify-banner-text {
  color: var(--dark-600);
  font-weight: 400;
}

.verify-hint {
  margin-top: var(--space-2);
  font-size: 13px;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 12px;
  background: var(--warning-bg);
  border-radius: var(--radius-md);
}

/* ==========================================================================
   AUTH MODAL
   ========================================================================== */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-modal-content {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--light-300);
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  overflow: hidden;
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { 
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.auth-modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--dark-950);
}

.auth-modal-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.auth-modal-logo .logo-icon {
  flex-shrink: 0;
}

.auth-modal-logo .logo-wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--dark-950);
  letter-spacing: -0.02em;
}

.auth-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--dark-500);
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius-full);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.auth-modal-close:hover {
  background: var(--light-100);
  color: var(--dark-900);
}

.auth-form-modal {
  padding: var(--space-6);
}

.auth-input-group {
  margin-bottom: var(--space-4);
}

.auth-input-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dark-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-input-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--light-300);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--light-50);
  color: var(--dark-950);
  transition: all var(--transition-fast);
}

.auth-input-group input::placeholder {
  color: var(--light-500);
}

.auth-input-group input:focus {
  outline: none;
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px var(--orange-bg);
  background: white;
}

.auth-form-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.auth-primary-btn {
  flex: 1;
  background: var(--orange-500);
  color: white;
  border: none;
  padding: 12px var(--space-4);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-primary-btn:hover {
  background: var(--orange-600);
  box-shadow: var(--shadow-glow);
}

.auth-secondary-btn {
  flex: 1;
  background: transparent;
  color: var(--dark-700);
  border: 1px solid var(--light-300);
  padding: 12px var(--space-4);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-secondary-btn:hover {
  background: var(--light-100);
  border-color: var(--light-400);
}

.auth-status-modal {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: 13px;
  text-align: center;
  font-weight: 500;
}

.auth-status-modal.error {
  background: var(--error-bg);
  color: var(--error);
  border-left: 3px solid var(--error);
}

.auth-status-modal.success {
  background: var(--success-bg);
  color: var(--success);
  border-left: 3px solid var(--success);
}

/* Auth Trial Hint */
.auth-trial-hint {
  text-align: center;
  color: var(--dark-500);
  margin-bottom: var(--space-5);
  font-size: 0.95rem;
}

.auth-trial-hint strong {
  color: var(--orange-500);
  font-weight: 600;
}

/* Google Sign-in Button - Primary (Prominent) */
.auth-google-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border: 2px solid var(--light-300);
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 15px;
  color: var(--dark-900);
  background: white;
  text-decoration: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.auth-google-btn-primary:hover {
  border-color: var(--orange-500);
  background: var(--orange-bg);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(255, 77, 0, 0.1);
  transform: translateY(-1px);
}

.auth-google-btn-primary:active {
  transform: translateY(0);
}

.auth-google-btn-primary svg {
  flex-shrink: 0;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: var(--space-5) 0;
  gap: var(--space-3);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--light-300);
}

.auth-divider span {
  color: var(--dark-500);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Legacy Google Button (keep for backward compatibility) */
.auth-google-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--light-300);
  border-radius: var(--radius-lg);
  font-weight: 500;
  font-size: 13px;
  color: var(--dark-700);
  background: transparent;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.auth-google-btn:hover {
  background: var(--light-100);
  border-color: var(--light-400);
}

.auth-alt-actions {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--light-200);
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-alt-actions a {
  color: var(--dark-500);
  font-size: 13px;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.auth-alt-actions a:hover {
  color: var(--orange-500);
}

/* ==========================================================================
   HELP MODAL
   ========================================================================== */
.help-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.help-modal-content {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--light-300);
  width: 95%;
  max-width: 720px;
  max-height: 90vh;
  overflow: auto;
  animation: slideUp 0.3s ease;
}

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

.help-modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--dark-950);
}

.help-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--dark-500);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.help-modal-close:hover {
  background: var(--orange-bg);
  color: var(--orange-500);
}

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

.help-section {
  margin-bottom: var(--space-6);
}

.help-section h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--orange-500);
}

.help-section p,
.help-section li,
.help-section summary {
  font-size: 14px;
  line-height: 1.6;
  color: var(--dark-700);
}

.help-section ul,
.help-section ol {
  padding-left: var(--space-4);
}

.help-section li {
  margin-bottom: var(--space-1);
}

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

.help-section summary {
  cursor: pointer;
  font-weight: 500;
  padding: var(--space-2) 0;
}

.help-section blockquote {
  background: var(--light-100);
  border-left: 3px solid var(--orange-500);
  padding: var(--space-3) var(--space-4);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-2) 0;
}

/* ==========================================================================
   SUBSCRIPTION PANEL
   ========================================================================== */
.subscription-panel {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--light-300);
  padding: var(--space-4) var(--space-6);
  backdrop-filter: blur(8px);
  animation: panelSlideDown 0.3s ease-out;
}

@keyframes panelSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.subscription-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.plan-status {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex: 1;
  min-width: 280px;
}

.plan-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 100px;
}

.plan-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--dark-900);
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-name::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.plan-price {
  font-size: 12px;
  color: var(--dark-500);
  font-weight: 500;
}

.usage-info {
  flex: 1;
  max-width: 280px;
}

.usage-bar-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.usage-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.usage-text {
  font-size: 13px;
  color: var(--dark-600);
  font-weight: 500;
}

.usage-bar {
  width: 100%;
  height: 6px;
  background: var(--light-300);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.usage-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--orange-500), var(--orange-400));
  border-radius: var(--radius-sm);
  transition: width var(--transition-base);
}

.usage-warning {
  color: var(--warning) !important;
}

.usage-critical {
  color: var(--error) !important;
}

.usage-progress.warning {
  background: linear-gradient(90deg, var(--orange-400), var(--warning)) !important;
}

.usage-progress.critical {
  background: linear-gradient(90deg, var(--warning), var(--error)) !important;
}

/* Upgrade Button */
.upgrade-section {
  flex-shrink: 0;
}

.upgrade-btn {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--orange-500);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  padding: 12px 20px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 240px;
}

.upgrade-btn:hover {
  background: var(--orange-600);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.upgrade-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.upgrade-text {
  flex: 1;
  text-align: left;
}

.upgrade-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}

.upgrade-subtitle {
  font-size: 12px;
  opacity: 0.85;
  line-height: 1.2;
  margin-top: 2px;
}

.upgrade-price {
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: var(--radius-md);
}

/* Premium Features */
.premium-features {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex: 1;
}

.premium-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, var(--success), #059669);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: none;
}

.premium-icon {
  font-size: 14px;
}

.premium-text {
  color: white;
  font-weight: 600;
  font-size: 13px;
}

.premium-benefits {
  display: flex;
  gap: var(--space-4);
  flex: 1;
}

.benefit {
  color: var(--dark-600);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.manage-btn {
  background: white;
  color: var(--dark-700);
  border: 1px solid var(--light-300);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.manage-btn:hover {
  background: var(--orange-500);
  color: white;
  border-color: var(--orange-500);
}

.cancel-btn {
  background: transparent;
  color: var(--dark-500);
  border: 1px solid var(--light-300);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: var(--space-1);
}

.cancel-btn:hover {
  background: var(--error-bg);
  color: var(--error);
  border-color: var(--error);
}

/* ==========================================================================
   PRICING MODAL
   ========================================================================== */
.pricing-modal-content {
  max-width: 960px !important;
  width: 95% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.pricing-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: var(--space-6) !important;
  padding: var(--space-6) !important;
}

@media (max-width: 800px) {
  .pricing-modal-content {
    max-height: 85vh !important;
  }
  
  .pricing-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-4) !important;
    padding: var(--space-4) !important;
    padding-bottom: var(--space-8) !important;
  }
  
  .pricing-card {
    margin: 0 !important;
  }
}

.pricing-card {
  background: white !important;
  border: 1px solid var(--light-300) !important;
  border-radius: var(--radius-xl) !important;
  padding: var(--space-6) !important;
  text-align: center !important;
  transition: all var(--transition-base) !important;
  position: relative !important;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--light-400) !important;
}

.pricing-card.featured {
  border-color: var(--orange-500) !important;
  background: linear-gradient(180deg, var(--orange-bg) 0%, white 100%) !important;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--orange-500) !important;
}

.pricing-card h4 {
  font-family: var(--font-display) !important;
  font-size: 18px !important;
  color: var(--dark-950) !important;
  margin: 0 0 var(--space-2) !important;
}

.pricing-card .price {
  font-size: 32px !important;
  font-weight: 700 !important;
  color: var(--dark-950) !important;
  margin: var(--space-4) 0 !important;
}

.pricing-card .price span {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--dark-500) !important;
}

.pricing-card ul {
  text-align: left !important;
  margin: var(--space-6) 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.pricing-card li {
  padding: 8px 0 !important;
  font-size: 13px !important;
  color: var(--dark-700) !important;
  border-bottom: 1px solid var(--light-200) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.pricing-card li:last-child {
  border-bottom: none !important;
}

.pricing-card li[style*="color: var(--text-tertiary)"] {
  color: var(--dark-500) !important;
  opacity: 0.6 !important;
}

.pricing-card.featured > div:first-child {
  position: absolute !important;
  top: -12px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: var(--orange-500) !important;
  color: white !important;
  padding: 6px 16px !important;
  border-radius: var(--radius-full) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  box-shadow: var(--shadow-md) !important;
}

.select-plan-btn {
  width: 100% !important;
  padding: 12px 20px !important;
  border-radius: var(--radius-lg) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
}

.pricing-card.featured .select-plan-btn {
  background: var(--orange-500) !important;
}

.pricing-card.featured .select-plan-btn:hover {
  background: var(--orange-600) !important;
  box-shadow: var(--shadow-glow) !important;
}

/* ==========================================================================
   CHAT CONTAINER
   ========================================================================== */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-6);
  margin-bottom: 120px;
  overflow: hidden;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.chat-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6) 0;
  overflow-y: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Progress Overlay */
.progress-overlay-root {
  position: sticky;
  bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 20;
}

.progress-overlay-root .video-progress-container {
  pointer-events: auto;
}

/* ==========================================================================
   MESSAGE BUBBLES - Chat Interface
   ========================================================================== */
.user-message,
.assistant-message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: var(--radius-xl);
  word-wrap: break-word;
  line-height: 1.5;
  position: relative;
  margin-bottom: var(--space-1);
  font-size: 14px;
}

.user-message {
  background: var(--light-200);
  color: var(--dark-900);
  align-self: flex-end;
  border-bottom-left-radius: var(--radius-sm);
}

.assistant-message {
  background: var(--light-50);
  color: var(--dark-900);
  align-self: flex-start;
  border-bottom-right-radius: var(--radius-sm);
  border: 1px solid var(--light-200);
}

.system-message {
  color: var(--dark-500);
  font-style: normal;
  text-align: center;
  font-size: 13px;
  margin: var(--space-4) 0;
  padding: 10px 16px;
  background: var(--light-100);
  border: 1px solid var(--light-300);
  border-radius: var(--radius-full);
  display: inline-block;
  align-self: center;
}

/* Message Content */
.response-text {
  white-space: normal;
  line-height: 1.5;
}

.response-text p {
  margin: 0;
}

.response-text p + p {
  margin-top: 0.5em;
}

.response-text ol,
.response-text ul {
  margin: 0;
  padding-left: 1.25em;
}

.response-text p + ul,
.response-text p + ol {
  margin-top: 0.25em;
}

.response-text li {
  margin: 0.15em 0;
}

.response-text li p {
  margin: 0;
  display: inline;
}

.response-text pre,
.response-text code {
  font-family: var(--font-mono);
  font-size: 13px;
}

.response-text code {
  background-color: rgba(255, 77, 0, 0.12);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--orange-600);
}

.response-text pre {
  background-color: var(--dark-950);
  color: var(--light-100);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--space-2) 0;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--dark-700);
}

.response-text pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.response-text blockquote {
  border-left: 3px solid var(--orange-500);
  padding-left: var(--space-4);
  margin: var(--space-2) 0;
  color: var(--dark-700);
  background: var(--light-100);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-3) var(--space-4);
}

.response-text table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-2) 0;
  font-size: 13px;
}

.response-text th,
.response-text td {
  border: 1px solid var(--light-300);
  padding: 8px 12px;
  text-align: left;
}

.response-text th {
  background-color: var(--light-100);
  font-weight: 600;
  color: var(--dark-900);
}

/* ==========================================================================
   WELCOME STATE
   ========================================================================== */
.welcome-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-6);
  max-width: 640px;
  margin: 0 auto;
  animation: welcomeFadeIn 0.5s ease;
}

@keyframes welcomeFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-icon {
  font-size: 56px;
  margin-bottom: var(--space-4);
  filter: drop-shadow(0 4px 12px rgba(255, 77, 0, 0.3));
}

.welcome-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 28px);
  color: var(--dark-950);
  margin-bottom: var(--space-3);
}

.welcome-subtitle {
  font-size: 15px;
  color: var(--dark-500);
  margin-bottom: var(--space-8);
  line-height: 1.6;
}

.welcome-trial-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--success-bg);
  color: var(--success);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: var(--space-8);
}

.welcome-trial-badge::before {
  content: "✓";
}

/* Example Prompts */
.example-prompts {
  width: 100%;
  margin-top: var(--space-4);
}

.example-prompts-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--dark-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}

.example-prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
}

.example-prompt {
  background: white;
  border: 1px solid var(--light-300);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--dark-700);
  line-height: 1.4;
}

.example-prompt:hover {
  border-color: var(--orange-500);
  background: var(--orange-bg);
  color: var(--dark-900);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.example-prompt-icon {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

/* Features Highlight */
.features-highlight {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-8);
  width: 100%;
}

.feature-highlight-item {
  text-align: center;
  padding: var(--space-4);
}

.feature-highlight-icon {
  font-size: 24px;
  margin-bottom: var(--space-2);
}

.feature-highlight-text {
  font-size: 13px;
  color: var(--dark-500);
  font-weight: 500;
}

@media (max-width: 600px) {
  .features-highlight {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
  
  .example-prompts-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   BOTTOM INPUT AREA
   ========================================================================== */
.bottom-input-area {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, transparent 0%, var(--light-50) 30%);
  padding: var(--space-6) var(--space-6) var(--space-4);
  z-index: 200;
}

.bottom-input-area::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(180deg, transparent, var(--light-50));
  pointer-events: none;
}

.image-preview-area {
  background-color: var(--light-100);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-2);
  border: 1px solid var(--light-300);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.image-preview-content {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

#preview-image {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 2px solid var(--light-300);
}

.image-controls {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.image-detail-select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--light-300);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  background: white;
  color: var(--dark-700);
}

/* Input Form */
.chat-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 900px;
  margin: 0 auto;
}

.input-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background-color: white;
  border: 1px solid var(--light-300);
  border-radius: var(--radius-xl);
  padding: 6px 8px 6px 16px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.input-row:focus-within {
  border-color: var(--orange-500);
  box-shadow: 0 0 0 3px var(--orange-bg);
  background-color: white;
}

.attachment-buttons {
  display: flex;
  gap: var(--space-1);
}

.message-input-container {
  flex: 1;
}

.message-input {
  width: 100%;
  border: none;
  outline: none;
  padding: 12px 8px;
  font-family: var(--font-body);
  font-size: 14px;
  background: transparent;
  resize: none;
  min-height: var(--touch-target);
  line-height: 1.4;
  color: var(--dark-950);
}

.message-input::placeholder {
  color: var(--light-500);
}

.send-buttons {
  display: flex;
  gap: var(--space-1);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  min-height: var(--touch-target);
  min-width: var(--touch-target);
  padding: var(--space-2) var(--space-4);
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--orange-500);
  color: white;
}

.btn-primary:hover {
  background-color: var(--orange-600);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background-color: var(--light-200);
  color: var(--dark-900);
}

.btn-secondary:hover {
  background-color: var(--light-300);
}

.btn-small {
  padding: 4px 8px;
  font-size: 13px;
  min-height: auto;
  min-width: auto;
}

.btn-attachment,
.btn-analyze,
.btn-search {
  background-color: transparent;
  border: none;
  color: var(--dark-500);
  font-size: 20px;
  padding: 8px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-width: 40px;
  min-height: 40px;
}

.btn-attachment:hover,
.btn-analyze:hover,
.btn-search:hover {
  background-color: var(--orange-bg);
  color: var(--orange-500);
}

.btn-send {
  background: var(--orange-500);
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-size: 18px;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 44px;
}

.btn-send:hover:not(:disabled) {
  background: var(--orange-600);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-send:disabled {
  background: var(--light-300);
  color: var(--light-500);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-remove {
  background-color: var(--error);
  color: white;
  font-size: 14px;
  padding: var(--space-1) var(--space-2);
}

.btn-remove:hover {
  background-color: #dc2626;
}

.btn-logout {
  background-color: var(--error);
  color: white;
}

.btn-logout:hover {
  background-color: #dc2626;
}

/* ==========================================================================
   IMAGE HANDLING
   ========================================================================== */
.image-container,
.generated-image {
  margin: var(--space-4) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--light-100);
  border: 2px solid var(--light-300);
  max-width: 100%;
}

.image-container img,
.generated-image img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
  object-fit: contain;
}

.image-indicator {
  color: var(--orange-400);
  font-style: italic;
  font-size: 13px;
  margin: var(--space-1) 0;
}

.error-message {
  background-color: var(--error-bg);
  color: var(--error);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--error);
  margin: var(--space-4) 0;
}

/* ==========================================================================
   ALERT POPUP
   ========================================================================== */
.alert-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--light-50);
  border: 1px solid var(--light-200);
  border-left: 3px solid var(--orange-500);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  max-width: 90vw;
  min-width: 280px;
  text-align: center;
}

.alert-popup p {
  color: var(--dark-900);
  margin-bottom: var(--space-4);
  font-size: 14px;
  line-height: 1.5;
}

.alert-popup.success {
  border-left-color: var(--success);
}

.alert-popup.error {
  border-left-color: var(--error);
}

.alert-popup.warning {
  border-left-color: var(--warning);
}

/* Overlay behind alert */
.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9999;
}

/* ==========================================================================
   VIDEO PROGRESS
   ========================================================================== */
.video-progress-container {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--orange-bg);
  border: 1px solid rgba(255, 77, 0, 0.2);
}

.video-progress-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--dark-900);
}

.video-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 77, 0, 0.15);
  overflow: hidden;
}

.video-progress-fill {
  width: 8%;
  height: 100%;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--orange-500), var(--orange-400));
  transition: width 0.35s ease;
}

.video-progress-container.progress-complete {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.video-progress-error .video-progress-bar {
  background: var(--error-bg);
}

.video-progress-error .video-progress-fill {
  background: linear-gradient(90deg, var(--error), #b91c1c);
}

/* ==========================================================================
   ANIMATED M-BOLT PROGRESS ICON
   ========================================================================== */
.progress-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.progress-text {
  flex: 1;
}

.mbolt-progress-icon {
  animation: mbolt-pulse 1.5s ease-in-out infinite;
}

.mbolt-spark {
  animation: mbolt-spark-glow 1s ease-in-out infinite;
}

.mbolt-spark-1 {
  animation-delay: 0s;
}

.mbolt-spark-2 {
  animation-delay: 0.5s;
}

@keyframes mbolt-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 4px rgba(255, 77, 0, 0.4));
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(255, 77, 0, 0.7));
  }
}

@keyframes mbolt-spark-glow {
  0%, 100% {
    opacity: 0.85;
    r: 4;
  }
  50% {
    opacity: 1;
    r: 5;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .mbolt-progress-icon,
  .mbolt-spark {
    animation: none;
  }
}

.sora-video-player {
  width: 100%;
  max-height: 420px;
  border-radius: var(--radius-lg);
  margin-top: 6px;
  background: #000;
}

.video-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--dark-500);
}

.video-download-link {
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
}

.video-download-link:hover {
  opacity: 0.75;
}

/* ==========================================================================
   LINKS
   ========================================================================== */
.chat-display a {
  color: var(--orange-600);
  text-decoration: none;
  background-color: var(--orange-bg);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 77, 0, 0.2);
  word-break: break-word;
  transition: all var(--transition-fast);
}

.chat-display a:hover {
  background-color: rgba(255, 77, 0, 0.2);
  border-color: var(--orange-500);
}

/* ==========================================================================
   INFO SECTION
   ========================================================================== */
.info-section {
  background-color: white;
  border-radius: var(--radius-lg);
  margin: var(--space-4);
  border: 1px solid var(--light-300);
}

.info-toggle {
  width: 100%;
  padding: var(--space-4);
  background-color: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  min-height: var(--touch-target);
  color: var(--dark-900);
}

.info-toggle:hover {
  background-color: var(--light-100);
}

.info-content {
  border-top: 1px solid var(--light-200);
  padding: var(--space-4);
  display: block;
}

.features-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.feature-item {
  padding: var(--space-4);
  background-color: var(--light-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-200);
}

.feature-item h4 {
  margin-bottom: var(--space-2);
  color: var(--orange-500);
  font-size: 14px;
}

.feature-item p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--dark-600);
}

/* Search Container */
.search-container {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  background-color: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--light-300);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: var(--space-2);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--dark-900);
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.mt-auto {
  margin-top: auto;
}

/* Cache clear button */
.btn-cache-clear {
  background-color: var(--warning);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.btn-cache-clear:hover {
  background-color: #d97706;
}

/* Keyboard shortcut styling */
kbd {
  background-color: var(--light-100);
  border: 1px solid var(--light-300);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  color: var(--dark-700);
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  padding: 2px 6px;
  white-space: nowrap;
}

/* Focus styles for accessibility */
.btn:focus,
input:focus,
select:focus {
  outline: 2px solid var(--orange-500);
  outline-offset: 2px;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Mobile adjustments */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: var(--space-4);
  }
  
  .logo {
    text-align: center;
  }
  
  .auth-single {
    justify-content: center;
  }
  
  .auth-modal-content {
    width: 95%;
    margin: var(--space-4);
  }
  
  .auth-form-actions {
    flex-direction: column;
  }
  
  .user-name {
    max-width: 100px;
  }
  
  .auth-user-info {
    gap: 6px;
    padding: 4px 8px 4px 12px;
  }
  
  .session-dropdown {
    max-width: 100px;
    font-size: 11px;
  }
  
  .subscription-content {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
  }
  
  .plan-status {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-width: auto;
  }
  
  .usage-info {
    max-width: 180px;
  }
  
  .upgrade-btn {
    min-width: auto;
    justify-content: center;
  }
  
  .premium-features {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
  }
  
  .premium-benefits {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  
  .benefit {
    font-size: 12px;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .subscription-panel {
    padding: var(--space-3) var(--space-4);
  }
  
  .plan-status {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
  }
  
  .usage-info {
    max-width: none;
  }
  
  .upgrade-btn {
    padding: 10px 16px;
    gap: var(--space-2);
  }
  
  .upgrade-title {
    font-size: 13px;
  }
  
  .upgrade-subtitle {
    font-size: 11px;
  }
  
  .upgrade-price {
    font-size: 13px;
    padding: 3px 8px;
  }
}

/* Tablets and larger */
@media (min-width: 481px) {
  .app-header {
    padding: var(--space-6);
  }
  
  .chat-container {
    padding: 0 var(--space-6);
  }
  
  .bottom-input-area {
    padding: var(--space-6);
  }
  
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .user-message,
  .assistant-message {
    max-width: 80%;
  }
}

/* Desktop */
@media (min-width: 769px) {
  .app-container {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .input-row {
    padding: var(--space-2);
  }
  
  .user-message,
  .assistant-message {
    max-width: 75%;
  }
  
  .info-content {
    display: block !important;
  }
}

/* Large desktop */
@media (min-width: 1025px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .user-message,
  .assistant-message {
    max-width: 70%;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
