/* =============================================
   ATLON QUIZ — DESIGN SYSTEM
   Clean + Connective Design
   ============================================= */

/* ---------- Design Tokens ---------- */
:root {
    /* Core */
    --bg: #050508;
    --bg-subtle: #0a0a10;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    /* Brand */
    --primary: #00d47b;
    --primary-light: #00ff91;
    --primary-glow: rgba(0, 212, 123, 0.12);
    --primary-glow-strong: rgba(0, 212, 123, 0.25);

    /* Semantic */
    --red: #ff4d4d;
    --red-glow: rgba(255, 77, 77, 0.1);
    --blue: #4d9fff;
    --blue-glow: rgba(77, 159, 255, 0.1);
    --whatsapp: #25D366;

    /* Text */
    --text-primary: #eaeaf0;
    --text-secondary: #8b8b9e;
    --text-muted: #555568;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration: 0.5s;
    --duration-fast: 0.3s;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100dvh;
    width: 100vw;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ---------- App Container ---------- */
.quiz-app {
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}

/* ---------- Header ---------- */
.quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.back-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--duration-fast);
    opacity: 0;
    pointer-events: none;
}

.back-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-btn:hover {
    color: var(--text-primary);
    background: var(--surface-hover);
}

.brand {
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.step-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* ---------- Progress Bar ---------- */
.progress-bar {
    width: 100%;
    height: 3px;
    background: var(--surface);
    flex-shrink: 0;
}

.progress-fill {
    height: 100%;
    width: 14%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.6s var(--ease-out);
}

/* ---------- Screens ---------- */
.screens-wrapper {
    flex: 1;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    display: none;
    padding: var(--space-lg);
    padding-bottom: var(--space-3xl);
}

.screen.active {
    display: block;
    animation: fadeSlideIn var(--duration) var(--ease-out) both;
    z-index: 2;
}

.screen.exiting {
    display: block;
    animation: fadeSlideOut 0.15s ease-in both;
    z-index: 1;
    pointer-events: none;
}

.screen-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.screen-center {
    align-items: center;
    justify-content: center;
    min-height: calc(100dvh - 80px);
    text-align: center;
}

/* ---------- Animations ---------- */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSlideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-16px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ---------- Badges ---------- */
.screen-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--red-glow);
    color: var(--red);
    border: 1px solid rgba(255, 77, 77, 0.15);
    width: fit-content;
}

.badge-green {
    background: var(--primary-glow);
    color: var(--primary);
    border-color: rgba(0, 212, 123, 0.15);
}

.badge-blue {
    background: var(--blue-glow);
    color: var(--blue);
    border-color: rgba(77, 159, 255, 0.15);
}

.badge-pro {
    background: linear-gradient(135deg, var(--primary-glow), rgba(77, 159, 255, 0.08));
    color: var(--primary);
    border-color: rgba(0, 212, 123, 0.2);
}

/* ---------- Typography ---------- */
.screen-title {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.highlight-red {
    color: var(--red);
}

.highlight-green {
    color: var(--primary);
}

.screen-footnote {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.question-number {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---------- Pain List (Info 1) ---------- */
.pain-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.pain-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--red-glow);
    border: 1px solid rgba(255, 77, 77, 0.08);
    border-radius: var(--radius-md);
    animation: fadeSlideIn var(--duration) var(--ease-out) both;
}

.pain-list li:nth-child(1) {
    animation-delay: 0.1s;
}

.pain-list li:nth-child(2) {
    animation-delay: 0.2s;
}

.pain-list li:nth-child(3) {
    animation-delay: 0.3s;
}

.pain-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.pain-list p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

/* ---------- Benefit List (Info 2) ---------- */
.benefit-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.benefit-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--primary-glow);
    border: 1px solid rgba(0, 212, 123, 0.08);
    border-radius: var(--radius-md);
    animation: fadeSlideIn var(--duration) var(--ease-out) both;
}

.benefit-list li:nth-child(1) {
    animation-delay: 0.1s;
}

.benefit-list li:nth-child(2) {
    animation-delay: 0.2s;
}

.benefit-list li:nth-child(3) {
    animation-delay: 0.3s;
}

.benefit-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.benefit-list strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.95rem;
}

.benefit-list p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ---------- Steps List (Info 3) ---------- */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.step-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    animation: fadeSlideIn var(--duration) var(--ease-out) both;
}

.step-item:nth-child(1) {
    animation-delay: 0.1s;
}

.step-item:nth-child(2) {
    animation-delay: 0.2s;
}

.step-item:nth-child(3) {
    animation-delay: 0.3s;
}

.step-item:nth-child(4) {
    animation-delay: 0.4s;
}

.step-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step-item p {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.step-item strong {
    color: var(--primary);
}

/* ---------- Options (Questions) ---------- */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.option-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    text-align: left;
    transition: all var(--duration-fast) var(--ease-out);
    position: relative;
    overflow: hidden;
    animation: fadeSlideIn var(--duration) var(--ease-out) both;
}

.option-card:nth-child(1) {
    animation-delay: 0.05s;
}

.option-card:nth-child(2) {
    animation-delay: 0.1s;
}

.option-card:nth-child(3) {
    animation-delay: 0.15s;
}

.option-card:nth-child(4) {
    animation-delay: 0.2s;
}

.option-card:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
    transform: translateY(-1px);
}

.option-card.selected {
    border-color: var(--primary);
    background: var(--primary-glow);
    box-shadow: 0 0 24px var(--primary-glow);
}

.option-card.selected::after {
    content: '✓';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #000;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    animation: checkmark 0.3s var(--ease-spring) both;
}

.option-emoji {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.option-text {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
}

.option-text small {
    display: block;
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-top: 2px;
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px var(--space-xl);
    background: var(--primary);
    color: #000;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) var(--ease-out);
    width: 100%;
    margin-top: var(--space-sm);
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 24px var(--primary-glow-strong);
    transform: translateY(-1px);
}

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

/* ---------- WhatsApp Buttons ---------- */
.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 16px var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all var(--duration-fast) var(--ease-out);
    text-align: center;
}

.btn-recommended {
    background: var(--whatsapp);
    color: #fff;
}

.btn-recommended:hover {
    background: #22c55e;
    box-shadow: 0 4px 24px rgba(37, 211, 102, 0.3);
    transform: translateY(-2px);
}

.btn-secondary-wa {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-secondary-wa:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: var(--surface-hover);
}

.wa-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.result-cta-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* ---------- Result Screens ---------- */
.result-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(0, 212, 123, 0.15);
    width: fit-content;
}

.result-price {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
}

.price-value {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--primary);
}

.price-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.result-sub {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.result-sub-large {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
}

.result-reasons {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.result-reasons h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-reasons ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.result-reasons li {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* ---------- Social Proof ---------- */
.social-proof {
    margin-top: var(--space-md);
}

.social-proof h3 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}

.proof-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.proof-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.proof-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-glow);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.proof-info {
    flex: 1;
    min-width: 0;
}

.proof-info strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
}

.proof-info span {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.proof-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(0, 212, 123, 0.15);
    flex-shrink: 0;
}

/* ---------- Guarantee ---------- */
.guarantee-badge {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: var(--space-sm);
}

.guarantee-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ---------- Loader ---------- */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
}

.loader-ring {
    width: 56px;
    height: 56px;
    border: 3px solid var(--surface);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    animation: pulse 1.5s ease infinite;
}

.loader-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.loader-step {
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: all 0.4s var(--ease-out);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.loader-step::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all 0.4s var(--ease-out);
}

.loader-step.done {
    color: var(--primary);
}

.loader-step.done::before {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow-strong);
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .screen-title {
        font-size: 1.4rem;
    }

    .price-value {
        font-size: 2.1rem;
    }

    .quiz-header {
        padding: var(--space-sm) var(--space-md);
    }

    .screen {
        padding: var(--space-md);
        padding-bottom: var(--space-2xl);
    }
}

@media (min-width: 520px) {
    .screen {
        padding: var(--space-xl) var(--space-lg);
    }
}

/* ---------- Video Demo ---------- */
.video-container {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    aspect-ratio: 9 / 16;
    border-radius: 24px;
    overflow: hidden;
    border: 2px solid rgba(0, 212, 123, 0.25);
    background: #000;
    position: relative;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 80px rgba(0, 212, 123, 0.08);
    cursor: pointer;
}

.demo-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-pause-indicator {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-pause-indicator.visible {
    opacity: 1;
}

.video-caption {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ---------- Plan Cards ---------- */
.plan-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    transition: all var(--duration-fast) var(--ease-out);
}

.plan-recommended {
    border-color: var(--primary);
    background: rgba(0, 212, 123, 0.04);
    box-shadow: 0 0 32px var(--primary-glow);
}

.plan-recommended-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: var(--primary);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.plan-header {
    margin-bottom: var(--space-md);
}

.plan-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.plan-price-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.plan-price-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.plan-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: var(--space-lg);
}

.plan-features li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.btn-pro-cta {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-pro-cta:hover {
    border-color: var(--whatsapp);
    background: rgba(37, 211, 102, 0.08);
    transform: translateY(-1px);
}

/* ---------- Scrollbar ---------- */
.screens-wrapper::-webkit-scrollbar {
    width: 3px;
}

.screens-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.screens-wrapper::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}