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

:root {
    /* Color Palette - Light Theme adapted from LandVibeCode */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #ffffff;
    
    --border-color: rgba(15, 23, 42, 0.08);
    --border-color-glow: rgba(0, 240, 255, 0.3);
    
    --color-primary: #0ea5e9;    /* Sky Blue */
    --color-secondary: #8b5cf6;  /* Violet */
    --color-success: #10b981;    /* Emerald Green */
    --color-orange: #f97316;     /* Orange Accent */
    
    --color-text-main: #0f172a;   /* Slate 900 */
    --color-text-muted: #475569;  /* Slate 600 */
    --color-text-light: #94a3b8;  /* Slate 400 */
    --color-text-dark: #0f172a;
    
    --gradient-hero: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --gradient-glow: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, rgba(139, 92, 246, 0.04) 50%, transparent 100%);
    --gradient-progress: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Misc */
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.09);
    
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.1);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* Header */
.main-header {
    position: sticky;
    top: 0;
    height: 70px;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.header-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
}

.logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.badge-vibe {
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--gradient-hero);
    color: #fff;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.2);
}

/* Glowing Background Orbs */
.glow-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: var(--gradient-glow);
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.9;
}

.glow-orb-1 {
    top: -150px;
    right: -100px;
}

.glow-orb-2 {
    bottom: -150px;
    left: -200px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--gradient-hero);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.35);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--color-text-main);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--color-text-muted);
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--color-text-main);
    color: var(--color-text-main);
    background: rgba(15, 23, 42, 0.03);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Main Content Area */
main {
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 60px 0 100px;
}

/* Hero Section */
.hero {
    text-align: center;
    position: relative;
    padding: 20px 0 40px;
}

.terminal-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    background: #0f172a;
    color: #38bdf8;
    padding: 8px 16px;
    border-radius: 100px;
    margin-bottom: 24px;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.terminal-tag::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #38bdf8;
    border-radius: 50%;
    animation: blink 1.2s steps(2) infinite;
}

@keyframes blink {
    50% { opacity: 0.2; }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 6.5vw, 4.4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-title em {
    font-style: italic;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--color-text-muted);
    max-width: 660px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
}

.meta-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    color: var(--color-text-muted);
}

.meta-pill b {
    color: var(--color-text-main);
    font-weight: 700;
}

/* Quiz Stage Container */
.stage {
    display: none;
}

.progress-container {
    position: sticky;
    top: 70px;
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 16px 0 12px;
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    font-weight: 500;
}

.progress-bar {
    height: 6px;
    background: rgba(15, 23, 42, 0.05);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-progress);
    width: 0%;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Question Card */
.question-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-hero);
}

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

.q-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}

.q-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-main);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.q-hint {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 28px;
}

/* Quiz Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    display: flex;
    align-items: center;
    cursor: pointer;
    background: var(--bg-main);
    border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    font-size: 1rem;
    line-height: 1.45;
    transition: var(--transition-smooth);
    text-align: left;
    width: 100%;
    font-family: inherit;
    color: var(--color-text-main);
}

.option:hover {
    background: var(--bg-card-hover);
    border-color: rgba(15, 23, 42, 0.15);
    transform: translateX(4px);
}

.option.selected {
    background: #f5f3ff;
    border-color: var(--color-secondary);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.08);
}

.option-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    min-width: 24px;
    height: 24px;
    margin-right: 14px;
    font-weight: 700;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.option.selected .option-key {
    background: var(--color-secondary);
    color: #ffffff;
    border-color: var(--color-secondary);
}

.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    gap: 16px;
}

/* Result Section */
.result {
    display: none;
    padding: 20px 0 40px;
}

.result.active {
    display: block;
    animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 56px 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.result-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-result, var(--bg-main));
    opacity: 0.06;
    z-index: 0;
}

.result-content {
    position: relative;
    z-index: 1;
}

.result-emoji {
    font-size: clamp(4rem, 12vw, 6.5rem);
    line-height: 1;
    margin-bottom: 20px;
    display: inline-block;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
}

.result-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    background: #0f172a;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 18px;
    letter-spacing: 0.02em;
}

.result-name {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    color: var(--color-text-main);
}

.result-score {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

.result-score b {
    color: var(--color-text-main);
    font-weight: 700;
}

.result-desc {
    font-size: 1.1rem;
    color: var(--color-text-main);
    max-width: 580px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.result-takeaway {
    background: var(--bg-main);
    border: 1.5px dashed rgba(15, 23, 42, 0.15);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    max-width: 580px;
    margin: 0 auto 36px;
    text-align: left;
    font-size: 0.98rem;
    line-height: 1.6;
}

.takeaway-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-secondary);
}

.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Course Web Academy CTA */
.course-cta {
    background: #0f172a;
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 56px 44px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.course-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.course-cta-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.course-cta h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}

.course-cta p {
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto 32px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.course-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    max-width: 640px;
    margin: 0 auto 36px;
}

.course-feature {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    font-size: 0.9rem;
    color: #cbd5e1;
    text-align: left;
    transition: var(--transition-smooth);
}

.course-feature:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
}

.course-feature b {
    display: block;
    color: #38bdf8;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

/* Stickers (Background Floating Elements) */
.stickers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.sticker {
    position: absolute;
    font-size: 2.2rem;
    opacity: 0.45;
    animation: floatingSticker 6s ease-in-out infinite;
}

.sticker:nth-child(1) { top: 15%; left: 8%; animation-delay: 0s; }
.sticker:nth-child(2) { top: 25%; right: 10%; animation-delay: 1.5s; }
.sticker:nth-child(3) { bottom: 12%; left: 14%; animation-delay: 3s; }
.sticker:nth-child(4) { bottom: 20%; right: 8%; animation-delay: 4.5s; }

@keyframes floatingSticker {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-14px) rotate(6deg); }
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    position: relative;
    z-index: 10;
}

footer a {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .container {
        padding: 0 16px;
    }
    
    main {
        padding: 40px 0 60px;
    }
    
    /* Header mobile adjustments */
    .main-header {
        height: 60px;
    }
    
    .header-container {
        padding: 0 16px;
    }
    
    .logo-img {
        height: 28px;
    }
    
    .badge-vibe {
        font-size: 0.55rem;
        padding: 2px 6px;
    }
    
    .header-cta .btn {
        padding: 8px 14px;
        font-size: 0.82rem;
        border-radius: var(--radius-sm);
    }
    
    .question-card {
        padding: 30px 20px;
    }
    
    .result-card {
        padding: 40px 20px;
    }
    
    .course-cta {
        padding: 40px 20px;
    }
    
    .nav-row {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .nav-row .btn {
        width: 100%;
    }
    
    .sticker {
        display: none;
    }
}
