/* ==========================================================================
   IQScore - Quiz & Assessment Interface Light Theme Styles
   Includes Image-Based Logic Questions & Touch-Friendly Cards (Mobile-First)
   ========================================================================== */

.quiz-body {
    background: #f8fafc;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* INTRO WRAPPER & MOBILE CARD CONTAINERS */
.intro-wrapper, .email-capture-page {
    max-width: 600px;
    margin: 16px auto 36px auto;
    padding: 0 14px;
    width: 100%;
}

.intro-logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.intro-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 18px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.brain-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 10px;
    animation: floatBrain 3s ease-in-out infinite alternate;
}

@keyframes floatBrain {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}

.intro-content h1 {
    font-size: clamp(1.4rem, 5vw, 2.1rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.25;
    color: var(--text-primary);
}

.intro-rules {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.rule {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.rule b {
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.rule strong {
    color: var(--text-primary);
}

.gender-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.gender-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

@media (max-width: 360px) {
    .gender-buttons {
        grid-template-columns: 1fr;
    }
}

.male-btn, .female-btn {
    min-height: 50px;
    padding: 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.male-btn:active, .female-btn:active {
    transform: scale(0.97);
}

.male-btn:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

.female-btn:hover {
    background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.35);
}

.avg-score {
    text-align: center;
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 0.88rem;
}

.intro-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 18px;
    line-height: 1.4;
}

/* QUIZ TOPBAR */
.quiz-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.back-button {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.back-button:hover {
    background: #f1f5f9;
}

.back-button:active {
    transform: scale(0.95);
}

.question-progress {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.quiz-timer {
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.3);
    color: var(--accent-gold);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

@media (max-width: 380px) {
    .quiz-topbar {
        padding: 8px 10px;
    }
    .question-progress {
        font-size: 0.85rem;
    }
    .quiz-timer {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    .back-button {
        width: 34px;
        height: 34px;
    }
}

/* QUESTION CARD & IMAGE QUESTION STYLES */
.question-container {
    max-width: 640px;
    margin: 16px auto 36px auto;
    padding: 0 14px;
    width: 100%;
}

.question-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.question-image-wrapper {
    margin-bottom: 18px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
    min-height: 140px;
    width: 100%;
    box-sizing: border-box;
}

.question-image-wrapper.hidden,
.question-image-wrapper[style*="display: none"],
.question-image-wrapper[style*="display:none"],
.question-image-wrapper[hidden] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    min-height: 0 !important;
    height: 0 !important;
}

.question-main-image {
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    margin: 0 auto !important;
    vertical-align: middle;
}

.question-title {
    font-size: clamp(1.15rem, 4vw, 1.4rem);
    font-weight: 700;
    margin-bottom: 18px;
    text-align: center;
    color: var(--text-primary);
    line-height: 1.35;
}

.text-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.text-option {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-height: 50px;
    padding: 12px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    text-align: left;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.text-option:hover {
    border-color: var(--primary);
    background: #f8fafc;
    transform: translateY(-1px);
}

.text-option:active,
.text-option.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(0.99);
}

.text-option::after {
    content: "→";
    font-size: 1.1rem;
    opacity: 0.5;
    flex-shrink: 0;
    margin-left: 8px;
}

/* 6 OPTION IMAGE CARDS GRID */
.options-image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.option-card-img {
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    min-height: 80px;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.option-card-img img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    display: block;
    margin: 0 auto !important;
}

.speed-screen,
.social-proof-screen {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.speed-image,
.speed-image img,
.social-proof-screen img {
    margin: 0 auto !important;
    display: block;
}

.option-card-img:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.option-card-img:active,
.option-card-img.selected {
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.4);
    transform: scale(0.98);
}

@media (max-width: 520px) {
    .options-image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .option-card-img {
        padding: 6px;
        min-height: 75px;
    }
    .option-card-img img {
        max-height: 68px;
    }
}

/* OFFER RESULT FUNNEL */
.limited-offer-badge {
    display: inline-block;
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.35);
    color: var(--accent-gold);
    font-weight: 800;
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.capture-title {
    font-size: clamp(1.3rem, 4.5vw, 1.8rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.capture-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 18px;
    line-height: 1.5;
}

.offer-price-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
}

.new-price {
    font-size: clamp(2.5rem, 8vw, 3.4rem);
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.offer-save-text {
    color: var(--accent-green);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.offer-timer-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 18px;
}

.timer-top-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.timer-main {
    font-size: clamp(1.8rem, 6vw, 2.2rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.payment-trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 16px;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

/* CALCULATING & PROGRESS BAR */
.calc-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    text-align: left;
}

.calc-step {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.step-top {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.step-percent {
    color: var(--primary);
    font-weight: 700;
}

.step-bar {
    width: 100%;
    height: 7px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.step-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

/* SOCIAL PROOF REVIEW CARD */
.calc-review-box {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.review-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: left;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.review-avatar {
    font-size: 1.6rem;
}

.review-stars {
    color: var(--accent-gold);
    font-size: 0.95rem;
    margin-top: 2px;
}

/* FINAL RESULT DASHBOARD */
.final-result-card {
    text-align: center;
}

.score-badge-box {
    width: 140px;
    height: 140px;
    margin: 18px auto 24px auto;
    border-radius: 50%;
    background: var(--gradient-primary);
    padding: 4px;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-inner {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-number {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.score-category {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-top: 4px;
}

.result-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.result-item {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    gap: 8px;
}

.result-item span {
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
}

.unlock-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-top: 12px;
}

.unlock-box h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* SPEED / WINNER / MILESTONE SCREENS */
.speed-screen, .social-proof-screen {
    text-align: center;
}

@media (min-width: 600px) {
    .intro-card, .question-card {
        padding: 32px 24px;
    }
    .question-main-image {
        max-height: 280px;
    }
}
