/* FitCraft Landing Page & Quiz Styles */
/* Gamified, Modern, Friendly Design for Women 35+ */

:root {
    /* Primary Colors - Energetic & Game-like */
    --primary-color: #4C51BF; /* Deep blue-purple */
    --primary-light: #667EEA;
    --primary-dark: #3730A3;
    
    /* Secondary Colors */
    --secondary-color: #10B981; /* Success green */
    --secondary-light: #34D399;
    --accent-color: #F59E0B; /* Warm orange/gold */
    --accent-light: #FCD34D;
    
    /* Neutrals */
    --background: #F8FAFC;
    --surface: #FFFFFF;
    --surface-alt: #F1F5F9;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --container-padding: 20px;
    --section-spacing: 32px;
    
    /* Typography */
    --font-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Segoe UI', system-ui, sans-serif;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Blazor Error UI Fix */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

body {
    font-family: var(--font-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    overflow-x: hidden;
}

/* Container */
.fitcraft-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    position: relative;
}

.fitcraft-app {
    min-height: 100vh;
}

/* Loading Screen */
.loading-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.loading-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 48px 32px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
}

.loading-icon {
    font-size: 64px;
    display: inline-block;
    animation: pulse 2s infinite;
    margin-bottom: 24px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.loading-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.fitcraft-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.08)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.06)"/></svg>');
    pointer-events: none;
}

/* --- FitCraft brand image sizing (safe, responsive, non-stretch) --- */

/* Generic guard rails for ALL images */
img {
  max-width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
}

/* Shared helpers */
.img-contain { object-fit: contain; }
.img-cover  { object-fit: cover; }

/* BRAND: banner (logo + "FitCraft") */
.fitcraft-logo .logo-main {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 0.25rem;
}

/* The white horizontal banner — scale by width, cap the height */
.fitcraft-logo .main-logo-image {
  display: block;
  width: min(96vw, 1100px);           /* made even wider */
  max-width: 1100px;                  /* increased max width */
  max-height: clamp(72px, 12vw, 140px);/* proportionally increased height */
  object-fit: contain;               /* no stretching */
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

/* Optional: tighten on ultra-narrow screens */
@media (max-width: 380px) {
  .fitcraft-logo .main-logo-image {
    width: 88vw;
    max-height: 64px;
  }
}

/* BRAND: square icon (quiz header, results, paywall) */
.mini-logo {
  display: inline-grid;
  place-items: center;
  width: clamp(32px, 6vw, 56px);
  height: clamp(32px, 6vw, 56px);
  aspect-ratio: 1 / 1;               /* perfect square */
  border-radius: 12px;                /* optional polish */
  position: relative;
  overflow: hidden;                   /* stops layout bleed */
  background: var(--gradient-primary);
  color: white;
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  min-height: 36px;
  white-space: nowrap;
  gap: 6px;
}

/* Square logo file */
.mini-logo .mini-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;                /* no stretch */
  display: block;
  margin-right: 6px;
}

/* Tiny game icon overlay — keep it inside the square */
.mini-logo .mini-logo-icon {
  position: absolute;
  right: -6%;
  bottom: -8%;
  font-size: clamp(12px, 2.7vw, 18px);
  opacity: 0.85;
  pointer-events: none;
}

/* Welcome hero: keep brand block tidy */
.welcome-screen .fitcraft-logo {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 0.5rem;
  padding-inline: 12px;
  text-align: center;
  margin-bottom: 32px;
}

/* Tagline scales but won't wrap awkwardly */
.welcome-screen .brand-tagline {
  letter-spacing: 0.18em;
  font-weight: 700;
  font-size: clamp(14px, 3vw, 18px);  /* increased font size */
  white-space: nowrap;
  opacity: 0.95;
  margin-top: 12px;
  margin-bottom: 24px;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* Quiz header / results / paywall logo rows keep height stable */
.quiz-header .quiz-logo,
.results-header .results-logo,
.paywall-header .paywall-logo,
.thank-you-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: clamp(36px, 7vw, 64px);  /* prevents jumpy layout shifts */
  justify-content: center;
  margin-bottom: 16px;
}

/* Large variant on Thank You screen */
.mini-logo.large {
  width: clamp(48px, 9vw, 92px);
  height: clamp(48px, 9vw, 92px);
  padding: 12px 24px;
  font-size: 1.1rem;
  border-radius: 24px;
}

/* Defensive: if images fail, show fallback text nicely */
.logo-fallback .fallback-text {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: clamp(22px, 6vw, 32px);
  font-family: var(--font-heading);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-fallback {
    text-align: center;
}

/* Optional: dark background polish for white marks */
body, .welcome-screen, .quiz-header, .results-header, .paywall-header {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Ty (coach) onboarding styles === */
.coach-intro{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:16px;
  margin-top: 24px;  /* added top margin */
  margin-bottom: 32px;  /* increased bottom margin */
  max-width: 600px;  /* contain width for better readability */
  margin-left: auto;
  margin-right: auto;
}

.coach-avatar{
  width:72px; height:72px; border-radius:50%;  /* slightly bigger avatar */
  object-fit:cover; box-shadow:var(--shadow-lg);
  border: 3px solid rgba(255, 255, 255, 0.9);  /* white border */
}

.coach-bubble{ position:relative; background:rgba(255, 255, 255, 0.95); border:1px solid rgba(255, 255, 255, 0.3); 
  border-radius:16px; padding:14px 18px; box-shadow:var(--shadow-md);
  backdrop-filter: blur(10px);
}
.coach-bubble-text{ color:var(--text-primary); font-weight:600; line-height:1.4; font-size: 0.95rem; }
.coach-bubble-tail{ position:absolute; left:-8px; top:18px; width:0; height:0; 
  border-top:8px solid transparent; border-bottom:8px solid transparent; border-right:8px solid #ffffff; }

.coach-header-line{ display:flex; align-items:center; gap:10px; margin-left:10px; }
.coach-avatar-xs{ width:28px; height:28px; border-radius:50%; object-fit:cover; box-shadow:var(--shadow-sm); background: linear-gradient(135deg, #e6e9f0 0%, #d4d8e3 100%); }
.coach-inline-text{ color:var(--text-secondary); font-weight:600; font-size:0.95rem; }

/* Thank you page coach welcome */
.coach-welcome{ display:grid; grid-template-columns:auto 1fr; align-items:center; gap:14px; margin:16px 0; }
.coach-avatar-lg{ width:72px; height:72px; border-radius:50%; object-fit:cover; box-shadow:var(--shadow-md); background: linear-gradient(135deg, #e6e9f0 0%, #d4d8e3 100%); }
.coach-welcome-bubble{ position:relative; background:#ffffff; border:1px solid #E2E8F0; 
  border-radius:16px; padding:14px 16px; box-shadow:var(--shadow-sm); }
.coach-welcome-text{ color:var(--text-primary); font-weight:600; line-height:1.4; }
.coach-bubble-tail-left{ position:absolute; left:-8px; top:20px; width:0; height:0; 
  border-top:8px solid transparent; border-bottom:8px solid transparent; border-right:8px solid #ffffff; }

/* === SVG Logo Optimizations === */

/* Welcome banner: clean SVG scaling with brand colors */
.welcome-screen .fitcraft-logo .main-logo-image{
  width: min(100%, 320px) !important;
  height: auto !important;
  max-height: 60px !important;
  object-fit: contain !important;
  display: block !important;
  filter: brightness(0) saturate(100%) invert(61%) sepia(26%) saturate(2878%) hue-rotate(202deg) brightness(99%) contrast(96%) !important;
}

/* Remove old conflicting styles - now using app-icon.png directly */

/* Controller icon positioning */
.mini-logo .mini-logo-icon{
  position: absolute !important;
  right: -2px !important;
  bottom: -2px !important;
  font-size: clamp(12px, 2.5vw, 16px) !important;
  opacity: 0.9 !important;
  pointer-events: none !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
}

.logo-game-icon {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 24px;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    animation: bounce 2s infinite;
}

.brand-tagline {
    font-size: 1.2rem;  /* increased from 0.9rem */
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);  /* made it white for better visibility */
    letter-spacing: 3px;
    margin-top: 12px;
    margin-bottom: 24px;
}

.mini-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    min-height: 36px;
    white-space: nowrap;
}

.mini-logo.large {
    padding: 12px 24px;
    font-size: 1.1rem;
    border-radius: 24px;
}

.mini-logo.large .mini-logo-image {
    height: 28px;
    max-width: 80px;
}

.mini-logo-text {
    letter-spacing: 1px;
}

.mini-logo-icon {
    font-size: 1.2rem;
}

/* Welcome Screen */
.welcome-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    padding: 48px 32px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
}

/* ========== INTRO SEQUENCE STYLES ========== */

/* Splash Screen */
.splash-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.splash-content {
    text-align: center;
    max-width: 500px;
}

.splash-logo {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto 24px;
}

.splash-tagline {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Ty Introduction Screen */
.ty-intro-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    position: relative;
}

.ty-intro-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.intro-logo-banner {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin: 0 auto 20px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.ty-avatar-large {
    margin-bottom: 24px;
}

.ty-avatar-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 6px solid white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    background: radial-gradient(circle, #9E98D8 0%, #3B3286 100%);
}

.ty-intro-bubble {
    position: relative;
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 32px;
}

.ty-intro-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Loading Bar */
.loading-container {
    max-width: 350px;
    margin: 0 auto;
}

.loading-label {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.loading-bar {
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.loading-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 12px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
    position: relative;
}

.loading-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: shimmer 1.5s infinite;
}

.loading-percentage {
    color: white;
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 600;
}

/* Simplified Hero Screen */
.welcome-screen.simplified {
    min-height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Use quiz-header for consistency */
.welcome-screen.simplified .quiz-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.mini-logo {
    display: flex;
    align-items: center;
}

/* FitCraft banner in header */
.fitcraft-banner {
    width: 100%;
    max-width: 200px;
    text-align: center;
}

.banner-logo {
    width: 100%;
    height: auto;
    max-height: 40px;
    object-fit: contain;
    /* Lighter blue-purple color for better visibility */
    filter: brightness(0) saturate(100%) invert(53%) sepia(38%) saturate(1283%) hue-rotate(207deg) brightness(95%) contrast(91%);
}

.coach-header-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.coach-avatar-xs {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    object-fit: cover;
    background: radial-gradient(circle, #9E98D8 0%, #3B3286 100%);
}

.coach-inline-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Simplified Hero Content */
.hero-content-simplified {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px 20px; /* Top padding accounts for fixed header */
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* White container box for hero content */
.hero-content-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 48px 32px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 500px;
}

.welcome-screen.simplified .hero-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 16px;
}

.welcome-screen.simplified .hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 24px;
}

.welcome-screen.simplified .features-preview {
    margin-bottom: 32px;
}

.welcome-screen.simplified .cta-button {
    margin-bottom: 16px;
}

/* HERO: prevent vertical overflow on short devices */
.welcome-screen {
    min-height: 100dvh;
}

@media (max-height: 740px) and (orientation: portrait) {
    .hero-content { padding: 32px 20px; }
    .hero-title { font-size: clamp(1.5rem, 5.5vw, 2rem); }
    .hero-subtitle { font-size: clamp(0.95rem, 3.5vw, 1.1rem); margin-bottom: 20px; }
}

@media (max-height: 740px) and (orientation: portrait) {
    .hero-content-simplified { padding: 72px 16px 16px; }
    .hero-content-box { padding: 28px 18px; }
}
@media (max-height: 670px) and (orientation: portrait) {
    .hero-content-simplified { padding: 60px 14px 12px; }
    .hero-content-box { padding: 22px 14px; }
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .mini-ty-header {
        flex-direction: column;
        gap: 8px;
        padding: 10px 16px;
    }
    
    .coach-inline-text {
        font-size: 0.85rem;
    }
    
    .hero-content-simplified {
        padding: 100px 16px 16px;
    }
}

/* Animations */
@keyframes shimmer {
    0% { transform: translateX(-50px); }
    100% { transform: translateX(50px); }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-slide-up {
    animation: slideUp 1s ease-out 0.5s both;
}

.animate-fade-in-subtitle {
    animation: fadeInSubtitle 0.8s ease-out both;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInSubtitle {
    from { 
        opacity: 0;
        transform: translateY(10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.game-avatar {
    margin-bottom: 24px;
}

.avatar-emoji {
    font-size: 64px;
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.brand-highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 500;
}

.features-preview {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface-alt);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.feature-icon {
    font-size: 1.2rem;
}

.privacy-note {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 16px;
}

/* Buttons */
.cta-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    justify-content: center;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

.cta-button:active {
    transform: translateY(0);
}

.button-icon {
    font-size: 1.2rem;
}

/* Quiz Container */
.quiz-container {
    min-height: 100vh;
    min-height: -webkit-fill-available; /* For mobile browsers */
    min-height: 100dvh; /* Dynamic viewport height */
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.quiz-header {
    background: rgba(255, 255, 255, 0.95);
    padding: clamp(12px, 2vh, 20px) var(--container-padding);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(8px, 1vh, 12px);
}

.quiz-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.results-logo,
.paywall-logo,
.thank-you-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-secondary);
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

.question-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Full height for gamification reveal screen */
.question-content.full-height {
    height: 100vh;
    padding: 0;
}

/* Final step: reduce container padding to match hero screen - fallback approach */
.question-content.final-step {
    padding: 20px !important;
}

@media (max-width: 768px) {
    .question-content.final-step {
        padding: 16px !important;
    }
}

@media (max-width: 480px) {
    .question-content.final-step {
        padding: 12px !important;
    }
}

.question-screen {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 16px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    max-width: 600px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 180px);
    max-height: calc(100vh - 180px);
    overflow: hidden; /* clip inner cards to rounded corners to prevent bleed */
}

/* Special handling for commitment screen - make it fill screen like other questions */
.question-screen.commitment-screen {
    padding: 16px;
    height: auto;
    max-height: calc(100dvh - 120px);
    max-height: calc(100vh - 120px);
    justify-content: space-between;
    max-width: 600px;
    display: flex;
    flex-direction: column;
}

.question-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.question-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

/* Option Grids */
/* Options Grid - Mobile First with 2-column layout for 4+ options */
.options-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    grid-auto-rows: 1fr;
}

/* Mobile: Force 2 columns for all 4-option questions */
.age-options,
.frequency-options,
.limitation-options,
.diet-options,
.activity-options,
.game-options,
.goal-options,
.time-options,
.workout-style-options,
.training-options,
.fitness-level-options,
.intensity-options {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

/* Single column for 2-option questions */
.nutrition-options {
    grid-template-columns: 1fr;
}

/* Desktop only: Allow flexible columns */
@media (min-width: 768px) {
    .options-grid {
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .age-options,
    .frequency-options,
    .limitation-options,
    .diet-options {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .goal-options,
    .time-options,
    .workout-style-options,
    .training-options,
    .fitness-level-options,
    .intensity-options {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.option-button {
    background: var(--surface);
    border: 2px solid #E2E8F0;
    border-radius: 16px;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 76px;
    text-align: center;
    width: 100%;
    min-width: 0; /* allow to shrink inside grid column */
    overflow: hidden; /* prevent inner text overflow */
}

.option-button:hover {
    border-color: var(--primary-light);
    background: #F8FAFC;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.option-button.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.option-button.selected .option-icon {
    filter: brightness(1.2);
}

.option-icon {
    font-size: 1.5rem;
}

.option-content {
    display: flex;
    flex-direction: column;
    text-align: center;
    min-width: 0; /* so text wraps inside grid column */
}

.option-title {
    font-weight: 600;
    margin-bottom: 4px;
    word-break: break-word;
}

.option-description {
    font-size: 0.875rem;
    opacity: 0.8;
    overflow-wrap: anywhere;
}

/* Activity Options */
.activity-option {
    justify-content: flex-start;
    padding: 16px;
    gap: 12px;
}

.activity-option .option-icon {
    font-size: 2rem;
    min-width: 48px;
}

/* Game Options */
.game-option {
    justify-content: flex-start;
    padding: 16px;
    gap: 12px;
}

.game-option .option-icon {
    font-size: 2.5rem;
    min-width: 56px;
}

/* Nutrition Options */
.nutrition-option {
    justify-content: flex-start;
    padding: 24px;
    gap: 20px;
}

.nutrition-option .option-icon {
    font-size: 2rem;
    min-width: 48px;
}

/* Time Options */
.time-option {
    flex-direction: column;
    gap: 8px;
}

.time-option .option-icon {
    font-size: 2rem;
}

/* Goal Options */
.goal-option {
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.goal-option .option-icon {
    font-size: 2rem;
}

/* Input Styles */
.height-inputs {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
}

.input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.input-group label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.height-input,
.weight-input {
    width: 80px;
    padding: 12px;
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.height-input:focus,
.weight-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
}

.weight-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.weight-input {
    width: 120px;
}

.weight-unit {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Input Validation Styles */
.height-input.error,
.weight-input.error {
    border-color: #EF4444;
    background-color: #FEF2F2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.height-input.error:focus,
.weight-input.error:focus {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
    outline: none;
}

.validation-error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 16px 0;
    padding: 12px 16px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    font-size: 0.9rem;
    animation: shake 0.3s ease-in-out;
}

.error-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.error-message {
    color: #DC2626;
    font-weight: 500;
    line-height: 1.4;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.weight-loss-preview {
    margin: 16px 0;
    padding: 16px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 12px;
}

.loss-calculation {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

.realistic-badge {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.long-term-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.continue-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.continue-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.continue-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Avatar Selection */
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.avatar-option {
    background: var(--surface);
    border: 2px solid #E2E8F0;
    border-radius: 16px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 120px;
}

.avatar-option:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.avatar-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.avatar-image {
    font-size: 3rem;
    margin-bottom: 8px;
}

.avatar-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

/* Analysis Loading Screen - Matching Ty Intro Design */
.analysis-loading-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    position: relative;
}

.analysis-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.analysis-content .intro-logo-banner {
    margin-bottom: 24px;
}

.ty-analysis-bubble {
    position: relative;
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 32px;
}

.ty-analysis-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.analysis-progress-container {
    max-width: 350px;
    margin: 0 auto;
}

.analysis-label {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.analysis-progress-bar {
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.analysis-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    border-radius: 12px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
    position: relative;
}

.analysis-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: shimmer 1.5s infinite;
}

.analysis-percentage {
    color: white;
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 600;
}

.analysis-status {
    color: white;
    font-size: 0.95rem;
    font-style: italic;
    margin-top: 16px;
    animation: fade-in 0.5s ease-in;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Commitment Screen - Responsive without scrolling */
.commitment-screen {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.commitment-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.commitment-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
    line-height: 1.4;
}

.commitment-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(4px, 1vh, 8px);
    flex: 1;
    overflow: hidden;
}

/* Final CTA layout polish */
.commitment-screen .commitment-content {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.commitment-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.commitment-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 24px 0;
    width: 100%;
}

.commitment-item {
    background: var(--surface-alt);
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-primary);
    text-align: left;
    line-height: 1.4;
}

.commitment-button {
    font-size: 1.125rem;
    padding: 14px 28px;
    margin-top: 16px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

/* Trust Badges */

.trust-badge {
    background: var(--gradient-secondary);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.badge-text {
    background: var(--gradient-accent);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Results Screen */
.results-container {
    min-height: 100vh;
    padding: var(--container-padding);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.results-main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    max-width: 800px;
    width: 100%;
    overflow: hidden;
}

.results-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px var(--container-padding);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.results-header .fitcraft-banner {
    display: flex;
    justify-content: center;
    width: 100%;
}

.results-header .coach-header-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: rgba(245, 245, 245, 0.8);
    padding: 6px 12px;
    border-radius: 20px;
}

.results-coach-intro {
    margin-top: 24px;
    margin-bottom: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 16px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.results-coach-intro .coach-avatar {
    width: 72px !important;
    height: 72px !important;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    border: 3px solid rgba(255, 255, 255, 0.9);
}

.results-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 16px 32px 8px 32px;
    text-align: center;
    line-height: 1.2;
}

.results-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    margin: 0 32px 16px 32px;
}

.results-badge {
    display: flex;
    justify-content: center;
    margin: 0 32px 24px 32px;
}

.results-content {
    padding: 0 32px 32px 32px;
}

.chart-section {
    margin-bottom: 40px;
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.progress-chart {
    background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 100%);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid #BBF7D0;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-arrow {
    font-size: 2rem;
    color: var(--secondary-color);
}

.chart-visual {
    position: relative;
    margin-bottom: 24px;
}

.chart-line {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
    margin: 40px 0;
}

.chart-milestones {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.milestone-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
}

.milestone-dot.start {
    background: var(--primary-color);
}

.milestone-dot.week2 {
    background: var(--accent-color);
}

.milestone-dot.goal {
    background: var(--secondary-color);
}

.milestone-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.milestone-label small {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.chart-encouragement {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-primary);
    margin: 0;
}

/* Success Story */
.success-story {
    margin-bottom: 40px;
    background: var(--surface-alt);
    padding: 32px;
    border-radius: 16px;
}

.story-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.before-after {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.before-after-images {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.before-image,
.after-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.transformation-photo {
    width: 150px;
    height: auto;
    max-height: 285px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.transformation-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.placeholder-image {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-secondary);
}

.placeholder-image.confident {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: white;
}

.transformation-arrow {
    font-size: 2rem;
    color: var(--secondary-color);
}

.image-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.testimonial {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    font-size: 1.125rem;
    color: var(--text-primary);
    text-align: center;
    margin: 0;
}

/* Plan Summary */
.plan-summary {
    margin-bottom: 32px;
}

.summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.plan-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.plan-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #F1F5F9;
}

.plan-icon {
    font-size: 1.5rem;
    min-width: 32px;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

.plan-content {
    flex: 1;
    line-height: 1.5;
}

.plan-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.plan-content small {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.results-cta {
    font-size: 1.25rem;
    padding: 18px 36px;
    margin: 32px auto 0 auto;
    display: block;
    width: fit-content;
}

/* Paywall Styles */
.paywall-container {
    min-height: 100vh;
    padding: var(--container-padding);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.paywall-main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    max-width: 1000px;
    width: 100%;
    overflow: hidden;
}

.paywall-header {
    text-align: center;
    padding: 32px 32px 16px 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.paywall-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 24px 32px 12px 32px;
    text-align: center;
    line-height: 1.3;
}

.paywall-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0 32px 24px 32px;
    text-align: center;
    line-height: 1.5;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 0 32px 32px 32px;
    flex-wrap: wrap;
}

.pricing-plans {
    padding: 0 32px 32px 32px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.pricing-plan {
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.pricing-plan:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-plan.recommended {
    border-color: var(--primary-color);
    transform: scale(1.05);
    z-index: 1;
}

.pricing-plan.value {
    border-color: var(--secondary-color);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.plan-badge.best-value {
    background: var(--gradient-secondary);
}

.plan-header {
    margin-bottom: 24px;
}

.plan-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.plan-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trial-text {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.then-text,
.price-period {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.savings {
    background: var(--secondary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 8px;
}

.plan-features {
    margin-bottom: 24px;
    text-align: left;
}

.feature {
    padding: 8px 0;
    font-size: 0.95rem;
    color: var(--text-primary);
    border-bottom: 1px solid #F1F5F9;
}

.feature:last-child {
    border-bottom: none;
}

.feature.highlight {
    background: #FEF3C7;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    margin-top: 8px;
}

.plan-button {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.trial-button {
    background: var(--gradient-primary);
    color: white;
}

.monthly-button {
    background: var(--surface-alt);
    color: var(--text-primary);
    border: 2px solid #E2E8F0;
}

.bundle-button {
    background: var(--gradient-secondary);
    color: white;
}

.plan-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.plan-note {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
}

.paywall-footer {
    padding: 24px 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 16px;
}

.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Thank You Screen */
.thank-you-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    position: relative;
    z-index: 1;
}

.thank-you-content {
    text-align: center;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    padding: 48px 32px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    display: block;
}

.thank-you-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.thank-you-message {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.next-steps {
    margin-bottom: 32px;
    text-align: left;
    background: var(--surface-alt);
    padding: 24px;
    border-radius: 12px;
}

.next-steps h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.step-item {
    padding: 8px 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.app-download {
    margin-bottom: 32px;
}

.app-download h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.download-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 180px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.download-btn.android {
    background: var(--gradient-secondary);
}

.download-note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 16px;
    font-weight: 500;
}

.final-cta {
    background: var(--gradient-accent);
}

/* Responsive Design */

/* Mobile browser chrome compensation */
@supports (height: 100dvh) {
    .quiz-container {
        min-height: 100dvh;
    }
    
    .question-screen {
        max-height: calc(100dvh - 140px);
    }
    
    .question-screen.commitment-screen { max-height: none; height: auto; }
}

/* Mobile portrait orientation - universal */
@media (orientation: portrait) and (max-width: 768px) {
    .quiz-header {
        padding: 8px var(--container-padding);
        gap: 6px;
    }
    
    .banner-logo {
        max-height: 28px;
    }
    
    .coach-header-line {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .coach-avatar-xs {
        width: 24px;
        height: 24px;
    }
    
    .question-screen.commitment-screen { 
        padding: 16px 12px; 
        max-height: calc(100dvh - 140px);
    }
}

/* Remove iPhone SE specific - use universal mobile styles instead */
/* DELETED - iPhone SE specific styles removed */
@media (max-width: 1px) and (max-height: 1px) {
    .fitcraft-container {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }
    
    .quiz-header {
        padding: 3px 8px;
        gap: 2px;
        min-height: auto;
    }
    
    .banner-logo {
        max-height: 18px;
    }
    
    .coach-header-line {
        font-size: 0.6rem;
        padding: 2px 4px;
        gap: 3px;
    }
    
    .coach-avatar-xs {
        width: 16px;
        height: 16px;
    }
    
    /* Use default commitment screen styles */
    
    .commitment-screen {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
    }
    
    .commitment-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow: hidden;
    }
    
    /* Don't override commitment screen sizes - keep them readable */
    
    /* Fix question screens */
    .question-screen {
        padding: 4px 8px;
        height: calc(100vh - 50px);
        height: calc(100dvh - 50px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    .question-title {
        font-size: 0.9rem;
        margin-bottom: 2px;
        line-height: 1.1;
    }
    
    .question-subtitle {
        font-size: 0.6rem;
        margin-bottom: 4px;
        line-height: 1;
    }
    
    /* Fix grid layouts for ALL question types */
    .options-grid {
        gap: 3px !important;
        margin-bottom: 4px;
        flex: 1;
        display: grid !important;
        overflow: hidden;
    }
    
    /* Force 2-column layout for ALL grids with 4 options */
    .goal-options,
    .frequency-options,
    .time-options,
    .limitation-options,
    .age-options,
    .diet-options {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Single column only for 2-option questions */
    .activity-options,
    .game-options,
    .nutrition-options {
        grid-template-columns: 1fr !important;
    }
    
    /* Universal option button styling for small screens */
    .option-button {
        padding: 8px !important;
        min-height: auto !important;
        font-size: 0.9rem !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
    
    .option-icon {
        font-size: 1rem !important;
        margin-bottom: 1px;
    }
    
    .option-text {
        font-size: 0.85rem !important;
        line-height: 1.2 !important;
        text-align: center;
    }
    
    .option-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1px;
    }
    
    .option-title {
        font-size: 0.5rem !important;
        line-height: 1 !important;
    }
    
    .option-description {
        font-size: 0.45rem !important;
        line-height: 1 !important;
    }
    
    /* Use default commitment screen styles */
    
    .commitment-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        overflow: hidden;
        padding: 0;
    }
}

/* Remove height-based media query - handled by universal mobile styles */
@media (max-width: 1px) {
    .fitcraft-container {
        height: 100vh;
        overflow: hidden;
    }
    
    .quiz-header {
        padding: 4px 10px;
        gap: 2px;
        min-height: auto;
    }
    
    .banner-logo {
        max-height: 20px;
    }
    
    .coach-header-line {
        font-size: 0.65rem;
        padding: 2px 4px;
        gap: 4px;
    }
    
    .coach-avatar-xs {
        width: 18px;
        height: 18px;
    }
    
    /* Use default commitment screen styles */
    
    .commitment-screen {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        overflow: hidden;
    }
    
    .commitment-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow: hidden;
    }
    
    .commitment-title {
        font-size: 0.85rem;
        margin-bottom: 2px;
        line-height: 1;
    }
    
    .commitment-subtitle {
        font-size: 0.6rem;
        margin-bottom: 2px;
        line-height: 1;
    }
    
    .commitment-icon {
        font-size: 1.3rem;
        margin-bottom: 2px;
    }
    
    .commitment-features {
        gap: 2px;
        margin: 2px 0;
    }
    
    .commitment-item {
        padding: 2px 4px;
        font-size: 0.55rem;
        line-height: 1.1;
        border-radius: 4px;
    }
    
    .commitment-button {
        padding: 6px 12px;
        font-size: 0.7rem;
        margin-top: 2px;
        min-height: auto;
    }
}

@media (max-width: 768px) {
    /* Universal mobile styles - works for all devices */
    .option-button {
        padding: 10px 6px;
        min-height: 72px;
    }
    
    .option-icon {
        font-size: 1.3rem;
        margin-bottom: 3px;
    }
    
    .option-text {
        font-size: 0.9rem;
        line-height: 1.2;
    }
    
    /* Commitment screen universal mobile */
    .question-screen.commitment-screen {
        max-height: calc(100vh - 100px);
        padding: 12px;
    }
    
    .commitment-features {
        gap: 8px;
        margin: 12px 0;
    }
    
    .commitment-item {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
    
    .commitment-button {
        padding: 12px 24px;
        font-size: 1rem;
        margin-top: 12px;
        margin-bottom: 4px;
    }

    /* Keep two columns even on small screens; ensure equal heights */
    .age-options,
    .frequency-options,
    .limitation-options,
    .diet-options,
    .goal-options,
    .time-options,
    .workout-style-options,
    .training-options,
    .fitness-level-options,
    .intensity-options { grid-template-columns: repeat(2, 1fr) !important; }
    .options-grid { width: 100%; }
    .options-grid > * { min-width: 0; } /* Prevent item overflow in grid columns */
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .features-preview {
        flex-direction: column;
        align-items: center;
    }
    
    .question-title {
        font-size: 1.75rem;
    }
    
    .question-screen {
        padding: 32px 24px;
    }
    
    /* Put icon/image ABOVE text for all two-column option cards */
    .options-grid .option-button {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }
    .options-grid .option-content { 
        align-items: center; 
        text-align: center; 
        min-width: 0; 
    }
    .options-grid .option-title, 
    .options-grid .option-description, 
    .options-grid .option-text { 
        text-align: center; 
        word-break: break-word; 
        overflow-wrap: anywhere; 
    }
    .options-grid .option-icon { margin-bottom: 2px; }

    /* Maintain 2-column layout on mobile for 4+ option questions */
    .age-options,
    .frequency-options,
    .limitation-options,
    .diet-options,
    .goal-options,
    .time-options,
    .workout-style-options,
    .training-options,
    .fitness-level-options,
    .intensity-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Already handled by default mobile styles above */
    
    .height-inputs {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .avatar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .before-after-images {
        flex-direction: column;
        gap: 16px;
    }
    
    .transformation-photo {
        width: 120px;
        max-height: 228px;
    }
    
    .transformation-arrow {
        transform: rotate(90deg);
    }
    
    .pricing-plans {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .pricing-plan.recommended {
        transform: none;
    }
    
    .paywall-main-content {
        margin: 16px;
        border-radius: 16px;
    }
    
    .paywall-header {
        padding: 24px 20px 12px 20px;
    }
    
    .paywall-title {
        font-size: 1.75rem;
        margin: 16px 20px 8px 20px;
    }
    
    .paywall-subtitle {
        margin: 0 20px 16px 20px;
    }
    
    .trust-badges {
        margin: 0 20px 24px 20px;
        gap: 12px;
    }
    
    .pricing-plans {
        padding: 0 20px 24px 20px;
        grid-template-columns: 1fr;
    }
    
    .paywall-footer {
        padding: 20px;
    }
    
    .trust-indicators {
        flex-direction: column;
        gap: 16px;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .paywall-title {
        font-size: 1.75rem;
    }
    
    .results-title {
        font-size: 2rem;
        margin: 16px 0 8px 0;
    }
    
    .results-subtitle {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }
    
    .results-main-content {
        margin: 16px;
        border-radius: 16px;
    }
    
    .results-header {
        padding: 24px 20px 20px 20px;
    }
    
    .results-coach-intro {
        margin-top: 16px;
    }
    
    .results-title {
        margin: 12px 20px 6px 20px;
    }
    
    .results-subtitle {
        margin: 0 20px 12px 20px;
    }
    
    .results-badge {
        margin: 0 20px 16px 20px;
    }
    
    .results-content {
        padding: 0 20px 24px 20px;
    }
    
    .results-cta {
        margin: 24px auto 0 auto;
        padding: 16px 28px;
        font-size: 1.125rem;
    }
    
    .loot-chest-container {
        margin: 12px 20px;
        padding: 8px 0;
    }
    
    .chest-icon {
        font-size: 3rem;
    }
    
    .animated-chart {
        margin: 16px auto;
        padding: 16px;
    }
    
    .chart-header {
        font-size: 1rem;
    }
    
    .chart-milestones {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
    
    .chart-line {
        display: none;
    }
}

@media (max-width: 480px) {
    
    .fitcraft-logo {
        margin-bottom: 24px;
    }
    
    .hero-content,
    .question-screen,
    .thank-you-content {
        padding: 32px 20px;
    }
    .question-screen.commitment-screen { padding: 18px 16px; }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .question-title {
        font-size: 1.5rem;
    }
    
    .container-padding {
        --container-padding: 16px;
    }
    
    .paywall-main-content {
        margin: 12px;
        border-radius: 12px;
    }
    
    .paywall-header {
        padding: 20px 16px 10px 16px;
    }
    
    .paywall-title {
        font-size: 1.5rem;
        margin: 12px 16px 6px 16px;
    }
    
    .paywall-subtitle {
        margin: 0 16px 12px 16px;
        font-size: 1rem;
    }
    
    .trust-badges {
        margin: 0 16px 20px 16px;
        gap: 8px;
    }
    
    .pricing-plans {
        padding: 0 16px 20px 16px;
    }
    
    .paywall-footer {
        padding: 16px;
    }
    
    .pricing-plan {
        padding: 24px 16px;
    }
    
    .results-content {
        padding: 24px 20px;
    }
    
    .results-main-content {
        margin: 12px;
        border-radius: 12px;
    }
    
    .results-header {
        padding: 20px 16px 16px 16px;
    }
    
    .results-coach-intro {
        margin-top: 12px;
    }
    
    .results-title {
        font-size: 1.75rem;
        margin: 10px 16px 4px 16px;
    }
    
    .results-subtitle {
        font-size: 1.125rem;
        margin: 0 16px 10px 16px;
    }
    
    .results-badge {
        margin: 0 16px 12px 16px;
    }
    
    .results-content {
        padding: 0 16px 20px 16px;
    }
    
    .results-cta {
        margin: 20px auto 0 auto;
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .loot-chest-container {
        margin: 8px 16px;
        padding: 6px 0;
    }
    
    .chest-icon {
        font-size: 2.5rem;
    }
    
    .animated-chart {
        margin: 12px auto;
        padding: 12px;
    }
    
    .weight-chart-svg {
        height: 160px;
    }
}

/* Animated Chart Styles */
.animated-chart {
    width: 100%;
    max-width: 500px;
    margin: 24px auto;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.weight-chart-svg {
    width: 100%;
    height: 200px;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.weight-label {
    font-family: var(--font-base);
    font-size: 12px;
    font-weight: 600;
    fill: var(--text-primary);
}

.timeline-label {
    font-family: var(--font-base);
    font-size: 11px;
    font-weight: 500;
    fill: var(--text-secondary);
}

.goal-label {
    font-weight: 700;
    fill: var(--secondary-color);
}

.weight-label.goal-label {
    fill: #22c55e;
    font-weight: 700;
}

.timeline-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    font-weight: 500;
    fill: #6b7280;
}

/* Chart responsiveness */
@media (max-width: 768px) {
    .animated-chart {
        padding: 16px;
        margin: 16px auto;
    }
    
    .weight-label {
        font-size: 10px;
    }
    
    .timeline-label {
        font-size: 9px;
    }
}