/* --- Design System (Optimized HSL) --- */
:root {
    --p-h: 218;
    --p-s: 72%;
    --p-l: 19%;
    /* #0E2954 */
    --primary: hsl(var(--p-h), var(--p-s), var(--p-l));
    --primary-light: hsl(197, 64%, 34%);

    --a-h: 145;
    --a-s: 50%;
    --a-l: 36%;
    /* #2E8A57 */
    --accent: hsl(var(--a-h), var(--a-s), var(--a-l));
    --accent-light: hsl(145, 46%, 47%);

    --bg: #F8FAFC;
    --text: #0F172A;
    --text-muted: #64748B;

    --radius: 20px;
    --shadow: 0 10px 30px -10px rgba(14, 41, 84, 0.1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem;
}

.screen {
    width: 100%;
    min-height: 100dvh;
    display: none;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 0;
}

/* --- UI Elements --- */
.badge {
    background: hsla(var(--a-h), var(--a-s), var(--a-l), 0.1);
    color: var(--accent);
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 1.5rem;
    border: 1px solid hsla(var(--a-h), var(--a-s), var(--a-l), 0.2);
}

h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--primary);
}

h1 span {
    color: var(--accent-light);
}

.subheadline {
    font-size: 1.15rem;
    color: var(--text-muted);
}

.btn {
    appearance: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 15px 30px -10px hsla(var(--a-h), var(--a-s), var(--a-l), 0.4);
    width: 100%;
    display: block;
}

.btn:active {
    transform: scale(0.98);
}

.btn-large {
    padding: 1.5rem 2.5rem;
    font-size: 1.2rem;
}

/* --- Progress --- */
#progress-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: #E2E8F0;
    z-index: 1000;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-light);
    border-radius: 0 4px 4px 0;
    transition: width 0.4s ease;
}

/* --- Quiz UI --- */
.question-wrapper {
    background: white;
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    transform: translateZ(0);
    /* GPU acceleration */
}

.question-header {
    margin-bottom: 2rem;
}

.question-icon-container {
    width: 70px;
    height: 70px;
    background: hsla(var(--p-h), var(--p-s), var(--p-l), 0.05);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.question-icon-container i {
    font-size: 2rem;
    color: var(--primary-light);
}

.quiz-category {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: block;
}

.question-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.options-container {
    display: grid;
    gap: 0.85rem;
}

.option-btn {
    background: #F1F5F9;
    border: 2px solid transparent;
    padding: 1.15rem 1.5rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
}

.option-btn:hover {
    background: #E2E8F0;
}

.option-btn.pressed {
    border-color: var(--accent-light);
    background: hsla(var(--a-h), var(--a-s), var(--a-l), 0.05);
}

/* --- Feedback --- */
.floating-feedback {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    font-weight: 800;
    color: var(--accent-light);
    animation: floatAnim 1s ease-out forwards;
}

@keyframes floatAnim {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform: translateY(-40px);
        opacity: 0;
    }
}

/* --- Results --- */
.glass-card {
    background: white;
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

.profile-diagnosis h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.divider {
    border: 0;
    height: 1px;
    background: #E2E8F0;
    margin: 1.5rem 0;
}

.offer-card {
    padding: 0;
    overflow: hidden;
}

.offer-grid {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 600px) {
    .offer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.offer-img {
    background: #EDF2F7;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offer-img img {
    max-width: 180px;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.15));
}

.offer-details {
    padding: 2rem;
}

.feature-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
}

.price-box {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 1rem;
}

.price-strikethrough {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.price-highlight {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
}

.price-highlight span {
    font-size: 1rem;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 440px;
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
}

.discount-alert {
    border: 2px dashed var(--accent-light);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
    background: hsla(145, 46%, 47%, 0.03);
}

.discount-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--red-alert);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.85rem;
}

.final-price strong {
    font-size: 2.5rem;
    color: var(--accent);
    display: block;
    line-height: 1;
    margin-top: 5px;
}

.countdown-timer {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--red-alert);
    margin-bottom: 1.5rem;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

/* Mobile Tap Targets */
@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .question-wrapper {
        padding: 2rem 1rem;
    }

    .question-text {
        font-size: 1.25rem;
    }

    .option-btn {
        font-size: 1rem;
        padding: 1rem;
    }
}