:root {
    --bg-gradient-1: #4f46e5;
    --bg-gradient-2: #7c3aed;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --success: #16a34a;
    --danger: #dc2626;
    --border: #e5e7eb;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
    min-height: 100vh;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.page-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    min-width: 0;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    padding: 40px;
    width: 100%;
    min-width: 0;
    max-width: 640px;
}

.card.wide { max-width: 780px; }

.landing-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 640px;
}
.landing-content .card { max-width: none; }

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 18px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.btn-hero {
    padding: 20px 28px;
    font-size: 1.15rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.45);
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.btn-hero:hover { box-shadow: 0 12px 30px rgba(79, 70, 229, 0.55); }

.trust-line {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 14px;
}

.info-section h2 { margin-top: 0; }
.info-section p { line-height: 1.55; }

.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
}
.category-card {
    text-align: center;
    padding: 18px 10px;
    background: #f9fafb;
    border-radius: 12px;
    flex: 1 1 120px;
    max-width: 150px;
}
.category-icon { font-size: 1.8rem; margin-bottom: 8px; }
.category-card h3 { font-size: 0.95rem; margin: 0 0 4px; }
.category-card p { font-size: 0.8rem; color: var(--text-muted); margin: 0; line-height: 1.4; }

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: '+';
    display: inline-block;
    width: 20px;
    color: var(--accent);
    font-weight: 700;
}
.faq-item[open] summary::before { content: '−'; }
.faq-item p { margin: 10px 0 0 20px; color: var(--text-muted); line-height: 1.5; }

h1 { font-size: 1.9rem; margin: 0 0 8px; }
h2 { font-size: 1.3rem; margin: 0 0 16px; }
p.subtitle { color: var(--text-muted); margin-top: 0; }

.badge {
    display: inline-block;
    background: #eef2ff;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.98); }
.btn.full { width: 100%; text-align: center; }
.btn.secondary { background: #f3f4f6; color: var(--text-main); }
.btn.secondary:hover { background: #e5e7eb; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.whatsapp { background: #25d366; }
.btn.whatsapp:hover { background: #1ebe57; }

.share-preview {
    margin: 8px 0 20px;
    display: flex;
    justify-content: center;
}
.share-preview canvas {
    width: 100%;
    max-width: 300px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: block;
}

.timer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.question-counter {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent);
}
.timer {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 999px;
}

.progress-bar {
    background: #e5e7eb;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}
.progress-bar-fill {
    background: var(--accent);
    height: 100%;
    transition: width 0.3s ease;
}

.question-category {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.question-text { font-size: 1.25rem; margin: 0 0 24px; line-height: 1.4; }

.memory-prompt {
    text-align: center;
    background: #f5f6ff;
    border: 2px dashed var(--accent);
    border-radius: 12px;
    padding: 32px 20px;
    margin-bottom: 20px;
}
.memory-instruction { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 14px; }
.memory-sequence { font-size: 1.8rem; font-weight: 800; letter-spacing: 0.02em; color: var(--text-main); }
.memory-countdown { margin-top: 16px; font-size: 0.85rem; color: var(--accent); font-weight: 600; }

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

.option {
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.option:hover { border-color: var(--accent); background: #f5f6ff; }
.option.selected { border-color: var(--accent); background: #eef2ff; }
.option input { accent-color: var(--accent); }

.option-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.option.selected .option-letter { background: var(--accent); color: #fff; }

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 28px;
    gap: 12px;
}

.feature-list { list-style: none; padding: 0; margin: 24px 0; }
.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 10px;
    color: var(--text-main);
}
.feature-list li:last-child { border-bottom: none; }

.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}
.amount-option {
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
}
.amount-option:hover { border-color: var(--accent); }
.amount-option.selected { border-color: var(--accent); background: #eef2ff; color: var(--accent); }

.custom-amount {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 20px;
}
.custom-amount span { font-weight: 700; margin-right: 8px; color: var(--text-muted); }
.custom-amount input {
    border: none;
    outline: none;
    font-size: 1.05rem;
    width: 100%;
    font-weight: 600;
}

.iq-score-display {
    text-align: center;
    padding: 20px 0 30px;
}
.iq-score-display .score {
    font-size: 4rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}
.iq-score-display .label { color: var(--text-muted); margin-top: 6px; }
.iq-score-display .classification {
    display: inline-block;
    margin-top: 14px;
    background: #eef2ff;
    color: var(--accent);
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 999px;
}

.category-row {
    margin-bottom: 14px;
}
.category-row .cat-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.category-row .cat-header span:last-child { font-weight: 700; }
.bar-track {
    background: #e5e7eb;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}
.bar-fill { background: var(--accent); height: 100%; }

.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.92rem;
}
.alert.info { background: #eff6ff; color: #1d4ed8; }
.alert.warning { background: #fffbeb; color: #b45309; }
.alert.error { background: #fef2f2; color: #b91c1c; }

.footer-note {
    text-align: center;
    color: rgba(255,255,255,0.75);
    font-size: 0.8rem;
    padding: 16px;
}

@media (max-width: 480px) {
    .card { padding: 26px 20px; }
    .amount-grid { grid-template-columns: repeat(3, 1fr); }
    .iq-score-display .score { font-size: 3rem; }
}
