:root {
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --primary: #018b7c;
    /* Teal - User Request */
    --primary-light: #02a696;
    /* Slightly lighter teal for gradients */
    --accent: #2dd4bf;
    /* Teal 400 - Fresh accent */
    --text-main: #1e293b;
    /* Slate 800 - Good contrast */
    --text-muted: #64748b;
    /* Slate 500 */
    --success: #018b7c;
    /* Matching success color to primary often looks clean, or keep emerald */
    --card-shadow: 0 10px 40px -10px rgba(1, 139, 124, 0.1);
    /* Shadow tinted with new primary */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --radius: 24px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 5% 5%, rgba(1, 139, 124, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 95% 95%, rgba(45, 212, 191, 0.08) 0%, transparent 40%);
}

.app-container {
    flex: 1;
    width: 100%;
    max-width: 100%;
    /* Full width for mobile focus */
    margin: 0 auto;
    padding: 16px;
    /* Reduced for mobile (was 20px) */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    perspective: 1000px;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    line-height: 1.1;
}

.title-xl {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #0f172a;
    /* Slate 900 - Solid Dark */
    background: none;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    text-align: center;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.15rem;
    color: #475569;
    /* Slate 600 */
    text-align: center;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/* Bullet Points */
.info-list {
    list-style: none;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
    border-radius: 16px;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    color: var(--text-main);
}

.info-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.info-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

/* Buttons */
.btn-primary {
    display: block;
    width: 100%;
    padding: 1.2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px -10px rgba(109, 40, 217, 0.5);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.btn-primary:hover {
    box-shadow: 0 15px 35px -10px rgba(109, 40, 217, 0.6);
    transform: translateY(-3px);
}

.btn-primary:hover::after {
    transform: translateX(100%);
}

.btn-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.btn-option {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    padding: 1.2rem;
    border-radius: 20px;
    color: var(--text-main);
    font-size: 1.15rem;
    font-family: var(--font-body);
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 0 #cbd5e1;
    margin-bottom: 5px;
}

.btn-option:hover,
.btn-option.selected {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #cbd5e1;
}

.btn-option.image-option {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Visuals */
.visual-container {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
}

.brain-pulse {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--primary), transparent);
    border-radius: 50%;
    position: relative;
    animation: pulse 3s infinite ease-in-out;
}

.brain-pulse::before {
    content: '';
    position: absolute;
    inset: -20px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    animation: spin 10s linear infinite;
}

.brain-pulse::after {
    content: '';
    position: absolute;
    inset: -40px;
    border: 1px dashed rgba(14, 165, 233, 0.2);
    border-radius: 50%;
    animation: spin 15s linear infinite reverse;
}

/* Progress */
.progress-container {
    width: 100%;
    margin-bottom: 2rem;
    text-align: center;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-text {
    display: none;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.disclaimer {
    font-size: 0.75rem;
    color: #475569;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Utilities */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3x3 Grid for abstract questions */
.grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 1.5rem;
    background: #ffffff;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--card-shadow);
}

.grid-cell {
    aspect-ratio: 1;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    border: 2px solid #e2e8f0;
}

.grid-cell.question-mark {
    background: rgba(109, 40, 217, 0.1);
    color: var(--primary);
    border: 1px dashed var(--primary);
}

/* Checkout / Timer */
.timer-header {
    background: #fee2e2;
    color: #ef4444;
    text-align: center;
    padding: 0.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid #fecaca;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.price-box {
    background: #f0fdf4;
    border: 2px solid var(--success);
    padding: 1.8rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.15);
}

.price-old {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 1.1rem;
}

.price-new {
    font-size: 3rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0.5rem 0;
}

.price-sub {
    font-size: 1rem;
    color: var(--success);
    font-weight: 700;
}

/* Popup / Modal */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.popup-content {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    width: 320px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-overlay.show .popup-content {
    transform: scale(1);
}

.popup-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.popup-title {
    font-size: 1.5rem;
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.popup-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.popup-btn {
    width: 100%;
    margin-bottom: 0.8rem;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 12px;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-family: var(--font-heading);
    padding: 1rem;
    border-radius: 12px;
    width: 100%;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Quiz Navigation */
.quiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 5px;
}

.nav-back {
    background: #e2e8f0;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: #334155;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.nav-back:hover {
    background: #cbd5e1;
}

.nav-timer {
    font-weight: 700;
    font-family: var(--font-heading);
    color: #0f172a;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}

.nav-counter {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Analysis Page Styles */
.analysis-list {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
    margin-bottom: 2rem;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
    opacity: 0.3;
    /* Start hidden/dimmed */
    flex-wrap: wrap;
    /* For progress bar wrapping */
}

.analysis-item:last-child {
    border-bottom: none;
}

.analysis-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

.analysis-status {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-circle {
    width: 12px;
    height: 12px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
}

.analysis-percent {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

/* Name Input */
.name-input {
    width: 100%;
    padding: 1.2rem;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.name-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(1, 139, 124, 0.1);
}

/* Checkout Page Styles */
.checkout-sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #e0f2fe;
    color: #0369a1;
    padding: 10px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.checkout-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.checkout-header-blue {
    background: #0ea5e9;
    /* Light blue/primary */
    padding: 1.5rem;
    text-align: center;
}

.price-tag {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1;
}

/* Animations */
@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.live-dot {
    height: 10px;
    width: 10px;
    background-color: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-green 2s infinite;
    margin-right: 8px;
}

.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* --- FAQ Accordion Fix --- */
.checkout-faq-item {
    border-bottom: 1px solid #e2e8f0;
}

.checkout-faq-question {
    width: 100%;
    padding: 1rem 0;
    background: none;
    border: none;
    text-align: left;
    font-weight: 700;
    color: #0f172a;
    font-family: var(--font-heading);
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    outline: none;
}

.checkout-faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary);
}

.checkout-faq-question.active i {
    transform: rotate(180deg);
}

.checkout-faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out, margin-top 0.3s ease;
    margin-top: 0;
    opacity: 1;
}

.checkout-faq-answer.open {
    grid-template-rows: 1fr;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.checkout-faq-body {
    overflow: hidden;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Enhanced Selection Style */
.btn-option:hover,
.btn-option.selected {
    background: #f0fdfa !important;
    border: 2px solid var(--primary) !important;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #ccfbf1;
}