/* =====================================================
   Squabblify — App Styles
   Mobile-first, dark theme with yellow/orange accents
   ===================================================== */

/* =====================================================
   Design Tokens
   ===================================================== */
:root {
  --yellow: #eab308;
  --orange: #f97316;
  --purple: #a855f7;
  --grad: linear-gradient(135deg, #eab308, #f97316);
  --grad-btn: linear-gradient(135deg, #eab308 0%, #f97316 100%);
  --grad-purple: linear-gradient(135deg, #a855f7, #7c3aed);
  --bg: #111008;
  --bg-dark: #0c0b02;
  --card: rgba(255, 255, 255, 0.04);
  --card-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(234, 179, 8, 0.5);
  --text: #f0ece0;
  --text-dim: #c0baa8;
  --muted: #555;
  --muted2: #888;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --font-display: 'Nunito', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 5px 20px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.7);
  --glow: 0 0 30px rgba(234, 179, 8, 0.2);
  --glow-strong: 0 0 40px rgba(234, 179, 8, 0.3);
}

/* =====================================================
   Reset & Base
   ===================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Lock body scroll only when screens are present */
body:has(.screen) {
  overflow-y: hidden;
}

/* =====================================================
   Screen System
   ===================================================== */
.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100vw;
}

.screen.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

/* Prevent horizontal overflow on all major containers */
.landing-wrap,
.auth-wrap,
.home-body,
.voice-step,
.result-wrap,
.history-list,
.paywall-inner {
  max-width: 100%;
  overflow-x: hidden;
}

/* Ensure all grids don't overflow */
.mode-grid,
.pack-grid,
.plan-cards,
.features-grid,
.use-cases-grid,
.steps-grid,
.sides-grid {
  max-width: 100%;
  overflow-x: hidden;
}

/* =====================================================
   Utility helpers
   ===================================================== */
.hidden { display: none !important; }

/* =====================================================
   Typography
   ===================================================== */
.logo-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.logo-text-sm {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-emoji {
  font-size: 2.2rem;
  display: inline-block;
}

.logo-sub {
  color: var(--muted2);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* =====================================================
   Spinner
   ===================================================== */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 24px auto 0;
}

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

/* =====================================================
   Splash Screen
   ===================================================== */
#screen-splash {
  justify-content: center;
  align-items: center;
  background: var(--bg-dark);
}

.splash-inner {
  text-align: center;
  animation: fadeInUp 0.5s ease;
}

.splash-logo {
  font-size: 4rem;
  margin-bottom: 8px;
  animation: bounce 1s ease infinite alternate;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}

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

/* =====================================================
   Maintenance Screen
   ===================================================== */
#screen-maintenance {
  justify-content: center;
  align-items: center;
  background: var(--bg-dark);
}

.maintenance-wrap {
  text-align: center;
  padding: 40px 24px;
  max-width: 600px;
}

.maintenance-icon {
  font-size: 5rem;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

.maintenance-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.5rem;
  color: var(--text);
  margin-bottom: 20px;
  background: linear-gradient(135deg, #f97316, #eab308);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.maintenance-message {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin-bottom: 40px;
}

.maintenance-loader {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.maintenance-loader .dot {
  width: 12px;
  height: 12px;
  background: var(--grad-btn);
  border-radius: 50%;
  animation: dot-bounce 1.4s ease-in-out infinite both;
}

.maintenance-loader .dot:nth-child(1) { animation-delay: -0.32s; }
.maintenance-loader .dot:nth-child(2) { animation-delay: -0.16s; }
.maintenance-loader .dot:nth-child(3) { animation-delay: 0s; }

@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.maintenance-sub {
  color: var(--muted2);
  font-size: 0.95rem;
}

/* =====================================================
   Landing Page
   ===================================================== */
#screen-landing {
  overflow-y: auto;
}

.landing-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.landing-hero {
  text-align: center;
  padding: 80px 24px 60px;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg) 100%);
}

.landing-logo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.landing-logo-mark {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(234,179,8,0.15), rgba(249,115,22,0.15));
  border: 2px solid var(--border-active);
  border-radius: 20px;
  box-shadow: var(--glow);
}

.landing-logo-mark .logo-emoji {
  font-size: 3rem;
}

.landing-logo-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  margin: 0;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(234,179,8,0.15), rgba(249,115,22,0.15));
  border: 1px solid var(--border-active);
  color: var(--yellow);
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.5rem;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 0%, var(--text) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 680px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-note {
  color: var(--muted2);
  font-size: 0.85rem;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  text-align: center;
  color: var(--text);
  margin-bottom: 40px;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.features-section {
  padding: 60px 24px;
  background: var(--bg);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-active);
  box-shadow: var(--glow);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.feature-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 12px;
}

.feature-desc {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

.how-it-works {
  padding: 60px 24px;
  background: var(--bg-dark);
}

.steps-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  flex: 1;
  min-width: 200px;
  max-width: 260px;
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--grad-btn);
  color: #000;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 10px;
}

.step-desc {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.5;
}

.step-arrow {
  font-size: 2rem;
  color: var(--yellow);
  flex-shrink: 0;
}

.use-cases {
  padding: 60px 24px;
  background: var(--bg);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.use-case-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  font-size: 0.95rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s;
}

.use-case-item:hover {
  border-color: var(--border-active);
  transform: translateX(4px);
}

.cta-section {
  padding: 80px 24px;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg) 100%);
  text-align: center;
}

.cta-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.2rem;
  color: var(--text);
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.landing-footer {
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted2);
  font-size: 0.85rem;
}

/* =====================================================
   Auth Screen
   ===================================================== */
#screen-auth {
  justify-content: flex-start;
  padding: 0;
}

.auth-wrap {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-wrap .btn-back {
  align-self: flex-start;
  margin-bottom: 8px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
}

.auth-tagline {
  text-align: center;
  color: var(--muted2);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

/* =====================================================
   Tab Bars
   ===================================================== */
.tab-bar {
  display: flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--muted2);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background: var(--grad-btn);
  color: #000;
  font-weight: 700;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

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

/* =====================================================
   Auth Forms
   ===================================================== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.terms-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--yellow);
}

.terms-checkbox label {
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1.5;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
}

.terms-checkbox label a {
  color: var(--yellow);
  text-decoration: none;
  font-weight: 600;
}

.terms-checkbox label a:hover {
  text-decoration: underline;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field-group.half {
  flex: 1;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
textarea:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15);
}

textarea {
  resize: vertical;
  min-height: 90px;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

.form-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

/* =====================================================
   Buttons
   ===================================================== */
.btn-primary {
  padding: 14px 24px;
  background: var(--grad-btn);
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary.btn-block { width: 100%; }

.btn-primary.btn-big {
  padding: 18px 24px;
  font-size: 1.1rem;
  border-radius: var(--radius);
}

.btn-ghost {
  padding: 13px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ghost:hover { background: var(--card-hover); border-color: rgba(255,255,255,0.14); }
.btn-ghost.btn-block { width: 100%; }

.btn-ghost-sm {
  padding: 8px 16px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted2);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 8px;
}

.btn-back {
  background: none;
  border: none;
  color: var(--yellow);
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
}

/* Button spinner */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

/* =====================================================
   Home Screen
   ===================================================== */
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 0;
  flex-shrink: 0;
}

.home-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
}

.home-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-profile {
  width: 32px;
  height: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted2);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-profile:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(234,179,8,0.1);
}

.credit-badge {
  background: var(--card);
  border: 1px solid var(--border-active);
  border-radius: 24px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--yellow);
}

.credit-count {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
}

.credit-label {
  color: var(--muted2);
  font-weight: 400;
}

.credit-badge.is-pro {
  background: linear-gradient(135deg, rgba(234,179,8,0.15), rgba(249,115,22,0.15));
  border-color: var(--yellow);
}

.credit-badge.is-pro::before {
  content: '⭐ PRO';
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--yellow);
}

.home-body {
  padding: 20px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
  overflow-y: auto;
}

.home-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.8rem;
  line-height: 1.2;
  color: var(--text);
  text-align: center;
  margin-top: 8px;
  flex-shrink: 0;
}

.mode-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.mode-grid-4 {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Desktop: Show all 4 modes in a single row */
@media (min-width: 768px) {
  .mode-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 8px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.mode-card:hover {
  background: var(--card-hover);
  border-color: rgba(234,179,8,0.3);
}

.mode-card.active {
  background: linear-gradient(135deg, rgba(234,179,8,0.12), rgba(249,115,22,0.12));
  border-color: var(--yellow);
  box-shadow: var(--glow);
}

.mode-icon { font-size: 1.5rem; }
.mode-name { font-size: 0.85rem; font-weight: 700; color: var(--text); }
.mode-desc { font-size: 0.72rem; color: var(--muted2); text-align: center; }

.mode-card-pro {
  position: relative;
  border-color: rgba(168, 85, 247, 0.3);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(124, 58, 237, 0.08));
}

.mode-card-pro:hover {
  border-color: rgba(168, 85, 247, 0.5);
}

.mode-card-pro.active {
  border-color: var(--purple);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.2);
}

.mode-card-pro .mode-desc {
  color: var(--purple);
  font-weight: 600;
}

.names-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.vs-divider {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--yellow);
  padding-bottom: 12px;
  flex-shrink: 0;
}

.alert-warn, .alert-error {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.alert-warn {
  background: rgba(234,179,8,0.1);
  border: 1px solid rgba(234,179,8,0.3);
  color: #fde047;
}

.alert-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
}

.alert-link {
  background: none;
  border: none;
  color: var(--yellow);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* Subscription Management Card */
.subscription-card {
  background: linear-gradient(135deg, rgba(234,179,8,0.08), rgba(249,115,22,0.08));
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 8px;
}

.sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.sub-badge {
  background: var(--grad-btn);
  color: #000;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.sub-status {
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 600;
}

.sub-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.sub-detail-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
}

.sub-label {
  color: var(--muted2);
}

.sub-value {
  color: var(--text);
  font-weight: 600;
}

.btn-cancel-sub {
  color: var(--red) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

.btn-cancel-sub:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: var(--red) !important;
}

/* Upgrade CTA Card */
.upgrade-cta-card {
  background: linear-gradient(135deg, rgba(234,179,8,0.12), rgba(249,115,22,0.12));
  border: 1px solid var(--border-active);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.upgrade-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
}

.upgrade-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.upgrade-text strong {
  font-size: 1rem;
  color: var(--text);
  font-weight: 700;
}

.upgrade-text span {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.upgrade-cta-card .btn-primary {
  flex-shrink: 0;
}

/* =====================================================
   Voice Screen
   ===================================================== */
.voice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  flex-shrink: 0;
}

.voice-steps {
  display: flex;
  gap: 8px;
  align-items: center;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  transition: all 0.3s;
}

.step-dot.active {
  background: var(--yellow);
  width: 24px;
  border-radius: 4px;
}

.voice-step {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 40px;
  gap: 16px;
  animation: slideIn 0.3s ease;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.voice-step.active {
  display: flex;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(15px); }
  to   { opacity: 1; transform: translateX(0); }
}

.voice-step-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  text-align: center;
  color: var(--text);
}

.voice-step-sub {
  color: var(--muted2);
  font-size: 0.9rem;
  text-align: center;
  margin-top: -8px;
}

/* Mic Button */
.mic-btn {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--grad-btn);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.15s;
  box-shadow: 0 6px 24px rgba(234,179,8,0.3);
  margin: 8px 0;
}

.mic-btn:hover { transform: scale(1.05); }
.mic-btn:active { transform: scale(0.95); }

.mic-btn.recording {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
  animation: pulse-green 1s ease infinite !important;
  outline: 3px solid #22c55e !important;
  outline-offset: 4px !important;
  border: 2px solid #15803d !important;
  box-shadow: 0 6px 24px rgba(34,197,94,0.4) !important;
}

.mic-icon {
  font-size: 2.2rem;
  position: relative;
  z-index: 2;
}

.mic-ripple {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  opacity: 0;
  animation: ripple 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(234,179,8,0.3), 0 0 0 0 rgba(234,179,8,0.4); }
  50% { box-shadow: 0 6px 24px rgba(234,179,8,0.3), 0 0 0 20px rgba(234,179,8,0); }
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 6px 24px rgba(34,197,94,0.3), 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 6px 24px rgba(34,197,94,0.3), 0 0 0 20px rgba(34,197,94,0); }
}

@keyframes ripple {
  0%   { opacity: 0; transform: scale(1); }
  30%  { opacity: 0.6; }
  100% { opacity: 0; transform: scale(1.8); }
}

.transcript-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  min-height: 72px;
  display: flex;
  align-items: center;
}

.transcript-text {
  color: var(--muted2);
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.5;
}

.transcript-text.has-text {
  color: var(--text);
  font-style: normal;
}

.voice-btn-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.voice-btn-row .btn-ghost { flex: 0 0 auto; }
.voice-btn-row .btn-primary { flex: 1; }

.btn-settle {
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-size: 1rem;
}

/* =====================================================
   Loading Screen
   ===================================================== */
#screen-loading {
  justify-content: center;
  align-items: center;
  background: var(--bg-dark);
}

.loading-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.loading-logo {
  font-size: 4rem;
  animation: wobble 0.8s ease infinite alternate;
}

@keyframes wobble {
  from { transform: rotate(-8deg) scale(1); }
  to   { transform: rotate(8deg) scale(1.1); }
}

.loading-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.loading-sub {
  color: var(--muted2);
  font-size: 0.9rem;
}

/* Wave Bars */
.wave-bars {
  display: flex;
  gap: 5px;
  align-items: center;
  height: 40px;
  margin-top: 8px;
}

.wave-bars .bar {
  width: 5px;
  border-radius: 3px;
  background: var(--grad-btn);
  animation: wave 1.2s ease-in-out infinite;
}

.wave-bars .bar:nth-child(1) { animation-delay: 0s;    height: 16px; }
.wave-bars .bar:nth-child(2) { animation-delay: 0.1s;  height: 28px; }
.wave-bars .bar:nth-child(3) { animation-delay: 0.2s;  height: 40px; }
.wave-bars .bar:nth-child(4) { animation-delay: 0.3s;  height: 28px; }
.wave-bars .bar:nth-child(5) { animation-delay: 0.4s;  height: 16px; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.3); opacity: 0.4; }
  50%       { transform: scaleY(1);   opacity: 1; }
}

.wave-bars-sm {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 24px;
}

.wave-bars-sm .bar {
  width: 3px;
  border-radius: 2px;
  background: var(--grad-btn);
  animation: wave 1s ease-in-out infinite;
}

.wave-bars-sm .bar:nth-child(1) { animation-delay: 0s;   height: 8px; }
.wave-bars-sm .bar:nth-child(2) { animation-delay: 0.1s; height: 14px; }
.wave-bars-sm .bar:nth-child(3) { animation-delay: 0.2s; height: 20px; }
.wave-bars-sm .bar:nth-child(4) { animation-delay: 0.3s; height: 14px; }
.wave-bars-sm .bar:nth-child(5) { animation-delay: 0.4s; height: 8px; }

/* =====================================================
   Result Screen
   ===================================================== */
.result-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 20px 60px;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
  animation: fadeInUp 0.4s ease;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 8px;
  flex-shrink: 0;
}

.result-header-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.result-card-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.result-summary {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.result-verdict {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.result-advice {
  border-color: rgba(234,179,8,0.2);
  background: linear-gradient(135deg, rgba(234,179,8,0.05), rgba(249,115,22,0.05));
}

.result-advice p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
}

.voice-playback-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-play-voice {
  flex-shrink: 0;
  padding: 12px 20px;
  background: var(--card);
  border: 1px solid var(--border-active);
  border-radius: 30px;
  color: var(--yellow);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-play-voice:hover { background: rgba(234,179,8,0.1); }

.winner-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(234,179,8,0.15), rgba(249,115,22,0.15));
  border: 1px solid var(--yellow);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: 0 0 24px rgba(234,179,8,0.1);
}

.winner-trophy { font-size: 1.6rem; }

.winner-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.winner-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: auto;
}

.sides-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.side-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-a { border-top: 3px solid var(--yellow); }
.side-b { border-top: 3px solid var(--orange); }

.side-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  color: var(--text);
}

.side-section { display: flex; flex-direction: column; gap: 6px; }

.side-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.side-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-list li {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.4;
  padding-left: 14px;
  position: relative;
}

.side-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--yellow);
}

.upsell-card {
  background: linear-gradient(135deg, rgba(234,179,8,0.1), rgba(249,115,22,0.1));
  border: 1px solid rgba(234,179,8,0.3);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.upsell-icon { font-size: 1.8rem; flex-shrink: 0; }

.upsell-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.upsell-text strong {
  font-size: 0.9rem;
  color: var(--text);
}

.upsell-text span {
  font-size: 0.78rem;
  color: var(--muted2);
}

.upsell-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.credits-remaining-note {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted2);
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =====================================================
   Profile / Settings Screen
   ===================================================== */
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.profile-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--text);
}

.profile-body {
  padding: 24px 20px 60px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.form-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

/* =====================================================
   History Screen
   ===================================================== */
.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.history-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--text);
}

.pro-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 32px;
  text-align: center;
}

.pro-gate-icon { font-size: 3rem; }

.pro-gate h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--text);
}

.pro-gate p {
  color: var(--muted2);
  font-size: 0.9rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  gap: 10px;
}

.history-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.history-item:hover {
  background: var(--card-hover);
  border-color: rgba(234,179,8,0.2);
}

.history-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.history-item-topic {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  line-height: 1.4;
}

.history-item-mode {
  font-size: 1rem;
  flex-shrink: 0;
}

.history-item-meta {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.history-item-winner {
  font-size: 0.78rem;
  color: var(--yellow);
  font-weight: 600;
}

.history-item-date {
  font-size: 0.75rem;
  color: var(--muted2);
  margin-left: auto;
}

.history-item-detail {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.history-item-detail.open {
  display: block;
  animation: fadeIn 0.2s ease;
}

.history-item-detail p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 8px;
}

.history-item-detail .btn-primary {
  font-size: 0.85rem;
  padding: 10px 16px;
}

.history-loading {
  text-align: center;
  padding: 30px;
  color: var(--muted2);
  font-size: 0.9rem;
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 32px;
  text-align: center;
  color: var(--muted2);
  font-size: 2rem;
}

.history-empty p {
  font-size: 0.9rem;
}

/* =====================================================
   Paywall Bottom Sheet
   ===================================================== */
.paywall-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s;
}

.paywall-overlay.visible { opacity: 1; }

.paywall-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 101;
  background: #1a1806;
  border-top: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.1, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.paywall-sheet.visible { transform: translateY(0); }

.paywall-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
}

.paywall-inner {
  padding: 16px 20px 40px;
}

.paywall-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.paywall-header h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--text);
}

.paywall-close {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Credit packs */
.pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.pack-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: relative;
}

.pack-card:hover { border-color: rgba(234,179,8,0.4); }

.pack-card.selected {
  border-color: var(--yellow);
  background: linear-gradient(135deg, rgba(234,179,8,0.1), rgba(249,115,22,0.1));
  box-shadow: var(--glow);
}

.pack-card.popular {
  border-color: var(--yellow);
}

.pack-popular-badge, .plan-popular-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-btn);
  color: #000;
  font-size: 0.6rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pack-label {
  font-size: 0.72rem;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pack-credits {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  color: var(--text);
}

.pack-price {
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pack-per {
  font-size: 0.68rem;
  color: var(--muted);
}

/* Plans */
.plan-perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.perk-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-weight: 500;
}

.plan-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.plan-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-card.popular { border-color: var(--yellow); }

.plan-card.selected {
  border-color: var(--yellow);
  background: linear-gradient(135deg, rgba(234,179,8,0.1), rgba(249,115,22,0.1));
  box-shadow: var(--glow);
}

.plan-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.plan-price {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.plan-price span {
  font-size: 0.75rem;
  -webkit-text-fill-color: var(--muted2);
  color: var(--muted2);
}

.plan-note {
  font-size: 0.72rem;
  color: var(--muted);
}

/* =====================================================
   Scrollbar
   ===================================================== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 2px; }

/* =====================================================
   Enhanced Animations & Effects
   ===================================================== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(234, 179, 8, 0.2); }
  50% { box-shadow: 0 0 40px rgba(234, 179, 8, 0.4); }
}

.btn-primary.btn-big {
  animation: glow-pulse 3s ease-in-out infinite;
}

.mode-card:hover {
  transform: translateY(-2px);
}

.pack-card:hover, .plan-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* Smooth transitions for all interactive elements */
button, .btn-primary, .btn-ghost, .mode-card, .pack-card, .plan-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   Media Queries - Mobile & Tablet
   ===================================================== */

/* Small phones */
@media (max-width: 340px) {
  .mode-name { font-size: 0.75rem; }
  .mode-icon { font-size: 1.2rem; }
  .pack-credits { font-size: 0.85rem; }
  .plan-price { font-size: 1.2rem; }
  .home-title { font-size: 1.6rem; }
  .auth-wrap { padding: 32px 16px; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .section-heading { font-size: 1.6rem; }
  .step-arrow { display: none; }
  
  /* Ultra-compact mode adjustments */
  .home-header { padding: 16px 16px 0; }
  .home-body { padding: 16px 16px 32px; }
  .names-row { flex-direction: column; gap: 12px; }
  .vs-divider { display: none; }
  .field-group.half { width: 100%; }
  .upsell-card { flex-direction: column; }
  .upsell-btn { width: 100%; }
}

/* Portrait phones */
@media (max-width: 480px) {
  /* Improve touch targets */
  .btn-primary, .btn-ghost { min-height: 48px; padding: 14px 20px; }
  .mode-card { min-height: 90px; padding: 16px 10px; }
  .pack-card, .plan-card { min-height: 120px; }
  
  /* Better text sizing on small screens */
  body { font-size: 15px; }
  .home-title { font-size: 1.8rem; line-height: 1.15; }
  .result-header-title { font-size: 1rem; }
  .voice-step-title { font-size: 1.3rem; }
  
  /* Optimize spacing */
  .home-body { gap: 14px; }
  .result-wrap { gap: 12px; padding: 0 16px 40px; }
  
  /* Stack side cards on very small screens */
  .sides-grid { 
    grid-template-columns: 1fr; 
    gap: 12px; 
  }
  
  /* Make history items more compact */
  .history-item { padding: 12px 14px; }
  .history-item-top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .history-item-mode { align-self: flex-end; margin-top: -24px; }
  
  /* Paywall sheet optimization */
  .paywall-sheet { max-height: 85vh; }
  .pack-grid { gap: 8px; }
  .plan-cards { gap: 8px; }
  
  /* Result screen optimizations */
  .result-header { padding: 16px 0 6px; }
  .voice-playback-row { flex-direction: column; align-items: stretch; }
  .btn-play-voice { justify-content: center; }
  
  /* Landing page mobile */
  .landing-hero { padding: 60px 20px 50px; }
  .features-section,  .how-it-works, .use-cases { padding: 50px 20px; }
  .cta-section { padding: 60px 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .use-cases-grid { grid-template-columns: 1fr; }
  .steps-grid { flex-direction: column; }
  .step-arrow { display: none; }
}

/* Tablet and larger phones */
@media (min-width: 600px) {
  .home-title { font-size: 2.4rem; line-height: 1.1; }
  .auth-wrap { padding-top: 60px; max-width: 460px; }
  .sides-grid { gap: 14px; }
  .pack-grid, .plan-cards { gap: 14px; }
  
  .home-body {
    max-width: 560px;
    padding: 32px 24px 60px;
  }
  
  .result-wrap {
    max-width: 640px;
    padding: 0 32px 80px;
  }
  
  .voice-step {
    max-width: 560px;
    padding: 0 32px 60px;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="password"],
  textarea {
    font-size: 1.05rem;
    padding: 15px 18px;
  }
  
  .btn-primary {
    font-size: 1.05rem;
    padding: 16px 28px;
  }
  
  .btn-primary.btn-big {
    font-size: 1.2rem;
    padding: 20px 32px;
  }
}

/* Desktop */
@media (min-width: 768px) {
  .home-title { font-size: 1.6rem; margin-top: 0; }
  
  .home-body {
    max-width: 700px;
    gap: 12px;
    padding: 12px 24px 40px;
  }
  
  .auth-wrap {
    max-width: 480px;
    padding: 80px 40px 60px;
  }
  
  /* Landing page desktop enhancements */
  .hero-title { font-size: 3.4rem; }
  .hero-subtitle { font-size: 1.25rem; max-width: 750px; }
  .section-heading { font-size: 2.4rem; }
  .landing-hero { padding: 100px 40px 80px; }
  .features-section, .how-it-works, .use-cases { padding: 80px 40px; }
  .cta-section { padding: 100px 40px; }
  .cta-title { font-size: 2.6rem; }
  .cta-subtitle { font-size: 1.2rem; }
  .features-grid { gap: 32px; }
  .feature-card { padding: 36px 28px; }
  .step-arrow { display: block; }
  
  .result-wrap {
    max-width: 720px;
    gap: 18px;
  }
  
  .sides-grid {
    gap: 16px;
  }
  
  .side-card {
    padding: 18px;
  }
  
  .mode-grid {
    gap: 14px;
  }
  
  .mode-card {
    padding: 18px 12px;
  }
  
  .mode-icon { font-size: 1.8rem; }
  .mode-name { font-size: 0.95rem; }
  .mode-desc { font-size: 0.78rem; }
  
  .pack-grid {
    gap: 16px;
  }
  
  .pack-card {
    padding: 20px 14px;
  }
  
  .plan-cards {
    gap: 16px;
  }
  
  .plan-card {
    padding: 24px 18px;
  }
  
  .paywall-inner {
    padding: 24px 32px 50px;
  }
  
  .voice-step-title {
    font-size: 1.8rem;
  }
  
  .mic-btn {
    width: 120px;
    height: 120px;
  }
  
  .mic-icon {
    font-size: 2.6rem;
  }
}

/* Large Desktop */
@media (min-width: 1024px) {
  .home-title { font-size: 1.8rem; margin-top: 0; }
  
  .home-body {
    max-width: 700px;
    gap: 12px;
    padding: 16px 32px 40px;
  }
  
  .auth-wrap {
    max-width: 520px;
    padding: 100px 50px 80px;
  }
  
  .result-wrap {
    max-width: 800px;
    padding: 0 40px 100px;
  }
  
  .voice-step {
    max-width: 640px;
    padding: 0 40px 80px;
  }
  
  .result-card, .side-card {
    padding: 20px;
  }
  
  .result-card-label, .side-section-title {
    font-size: 0.85rem;
  }
  
  .result-summary, .result-verdict {
    font-size: 1.05rem;
    line-height: 1.7;
  }
  
  .side-list li {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  /* Centered paywall for large screens */
  .paywall-sheet {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(100%);
    max-width: 600px;
    border-radius: 24px;
  }
  
  .paywall-sheet.visible {
    transform: translateX(-50%) translateY(0);
  }
}

/* Extra large screens */
@media (min-width: 1440px) {
  .home-title { font-size: 2rem; margin-top: 0; }
  
  .home-body {
    max-width: 750px;
    gap: 14px;
    padding: 16px 32px 40px;
  }
  
  .result-wrap {
    max-width: 880px;
  }
  
  .sides-grid {
    gap: 20px;
  }
}

/* =====================================================
   Touch & Hover States (Mobile-friendly)
   ===================================================== */
@media (hover: hover) and (pointer: fine) {
  /* Enhanced hover effects for desktop only */
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 179, 8, 0.4);
  }
  
  .mode-card:hover,
  .pack-card:hover,
  .plan-card:hover {
    box-shadow: var(--shadow-sm);
  }
  
  .history-item:hover {
    transform: translateX(4px);
  }
}

/* Mobile touch optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn-primary:active {
    transform: scale(0.97);
  }
  
  .mode-card:active,
  .pack-card:active,
  .plan-card:active {
    transform: scale(0.97);
  }
  
  /* Larger touch targets */
  .btn-primary, .btn-ghost {
    min-height: 48px;
  }
  
  .mode-card {
    min-height: 100px;
  }
}

/* =====================================================
   Print styles
   ===================================================== */
@media print {
  .home-header,
  .voice-header,
  .result-header button,
  .btn-play-voice,
  .upsell-card,
  .result-actions,
  .paywall-overlay,
  .paywall-sheet {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .result-wrap {
    padding: 20px;
  }
}

/* =====================================================
   Toast Notification
   ===================================================== */
.toast-notification {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, rgba(234,179,8,0.95), rgba(249,115,22,0.95));
  backdrop-filter: blur(10px);
  color: #000;
  padding: 14px 24px;
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 40px rgba(234, 179, 8, 0.4);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.1, 0.64, 1);
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* =====================================================
   Live Debate Screen
   ===================================================== */
.debate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg) 100%);
}

.debate-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  background: var(--grad-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.debate-round-badge {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(124, 58, 237, 0.15));
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: var(--purple);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.debate-body {
  padding: 20px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

.debate-topic-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 8px;
}

.debate-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.debate-topic-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.debate-arena {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 12px;
}

.debate-round {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.debate-round-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.debate-round-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.debate-round-number {
  font-size: 0.75rem;
  color: var(--purple);
  font-weight: 600;
}

.debate-statement-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.debate-statement {
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--yellow);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.debate-statement.person-b {
  border-left-color: var(--orange);
}

.debate-statement-author {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.debate-statement.person-b .debate-statement-author {
  color: var(--orange);
}

.debate-statement-text {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.debate-input-section {
  background: var(--card);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.3s ease;
}

.debate-input-header {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.debate-turn-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(124, 58, 237, 0.12));
  padding: 10px 20px;
  border-radius: 30px;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.turn-icon {
  font-size: 1.2rem;
}

.turn-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

#debate-input {
  background: rgba(255, 255, 255, 0.02);
}

.debate-btn-row {
  display: flex;
  gap: 10px;
}

.debate-feedback-section {
  animation: slideInUp 0.4s ease;
}

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

.feedback-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(124, 58, 237, 0.08));
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feedback-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.feedback-icon {
  font-size: 1.8rem;
}

.feedback-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  background: var(--grad-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feedback-content {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.score-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.score-bar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.score-bar {
  width: 100%;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.score-fill {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #000;
  position: relative;
}

.score-fill::after {
  content: attr(data-score);
  position: absolute;
  right: 8px;
}

.score-a {
  background: linear-gradient(90deg, var(--yellow), #facc15);
}

.score-b {
  background: linear-gradient(90deg, var(--orange), #fb923c);
}

.debate-final-section {
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.1, 0.64, 1);
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.final-verdict-card {
  background: linear-gradient(135deg, rgba(234,179,8,0.1), rgba(249,115,22,0.1));
  border: 2px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--glow-strong);
}

.final-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-active);
}

.final-icon {
  font-size: 2.5rem;
  animation: bounce 1s ease infinite alternate;
}

.final-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.8rem;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.final-winner {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  text-align: center;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 16px;
  background-color: rgba(234,179,8,0.08);
  border-radius: var(--radius);
  border: 1px solid rgba(234,179,8,0.3);
}

.final-verdict-text {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.7;
  text-align: center;
  padding: 0 12px;
}

.debate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

/* Mobile responsive adjustments for debate */
@media (max-width: 480px) {
  .debate-body {
    padding: 16px 16px 40px;
  }
  
  .debate-topic-card {
    padding: 14px;
  }
  
  .debate-topic-text {
    font-size: 0.95rem;
  }
  
  .debate-round {
    padding: 14px;
  }
  
  .debate-input-section {
    padding: 16px;
  }
  
  .feedback-card {
    padding: 16px;
  }
  
  .final-verdict-card {
    padding: 20px 16px;
  }
  
  .final-title {
    font-size: 1.5rem;
  }
  
  .final-winner {
    font-size: 1.6rem;
  }
}

@media (min-width: 768px) {
  .debate-body {
    max-width: 800px;
    padding: 32px 40px 80px;
  }
  
  .debate-topic-text {
    font-size: 1.15rem;
  }
  
  .debate-round {
    padding: 20px;
  }
  
  .debate-input-section {
    padding: 24px;
  }
  
  .feedback-card {
    padding: 24px;
  }
  
  .final-verdict-card {
    padding: 32px 28px;
  }
}

/* =====================================================
   Accessibility Enhancements
   ===================================================== */

/* Focus styles */
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(255, 255, 255, 0.3);
    --card: rgba(255, 255, 255, 0.08);
  }
}
