/* ── Base ─────────────────────────────── */
:root {
    --pink: #FF6B9D;
    --blue: #5B9BD5;
    --purple: #9B72CF;
    --orange: #FF8C42;
    --green: #52C99C;
    --yellow: #FBBF24;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #fdf0f8 0%, #eef4ff 50%, #f0edff 100%);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

/* ── Section System ───────────────────── */
.section {
    display: none;
    position: relative;
    z-index: 1;
}

.section.active {
    display: block;
    animation: fadeSlideIn 0.45s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Background Blobs ─────────────────── */
.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
    animation: blobFloat 8s ease-in-out infinite alternate;
}

.blob1 { width: 420px; height: 420px; background: var(--pink); top: -100px; left: -120px; }
.blob2 { width: 380px; height: 380px; background: var(--blue); bottom: -80px; right: -100px; animation-delay: 3s; }
.blob3 { width: 280px; height: 280px; background: var(--purple); top: 40%; left: 50%; animation-delay: 5s; }

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, 30px) scale(1.08); }
}

/* ── Buttons ──────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
    color: white;
    border: none;
    border-radius: 99px;
    padding: 16px 44px;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.34, 1.56, .64, 1);
    box-shadow: 0 6px 28px rgba(255, 107, 157, 0.38);
    display: inline-block;
}

.btn-primary:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 14px 36px rgba(255, 107, 157, 0.5); }

.btn-secondary {
    background: white;
    color: var(--purple);
    border: 2.5px solid var(--purple);
    border-radius: 99px;
    padding: 13px 36px;
    font-size: 1rem;
    font-weight: 800;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(.34, 1.56, .64, 1);
}

.btn-secondary:hover { background: var(--purple); color: white; transform: translateY(-3px); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.7);
    color: #555;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 99px;
    padding: 10px 28px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.btn-ghost:hover { background: white; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); }

/* ── Category Cards ───────────────────── */
.cat-card {
    cursor: pointer;
    border-radius: 22px;
    padding: 22px 14px 18px;
    text-align: center;
    transition: transform 0.25s cubic-bezier(.34, 1.56, .64, 1), box-shadow 0.25s ease, border-color 0.2s;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.cat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.25);
    opacity: 0;
    transition: opacity 0.2s;
}

.cat-card:hover { transform: translateY(-8px) scale(1.05); box-shadow: 0 20px 48px rgba(0, 0, 0, 0.16); }
.cat-card:hover::before { opacity: 1; }

/* ── Choice Cards ─────────────────────── */
.choice-card {
    cursor: pointer;
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    transition: transform 0.28s cubic-bezier(.34, 1.56, .64, 1), box-shadow 0.28s ease, opacity 0.3s;
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.5);
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.choice-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 22px;
}

.choice-card:hover { transform: translateY(-8px) scale(1.04); box-shadow: 0 24px 52px rgba(0, 0, 0, 0.22); }
.choice-card:hover::after { opacity: 1; }
.choice-card.selected { transform: scale(1.06); box-shadow: 0 28px 56px rgba(0, 0, 0, 0.25); border-color: rgba(255, 255, 255, 0.9); }
.choice-card.dimmed { opacity: 0.42; transform: scale(0.96); }

.choice-a { background: linear-gradient(135deg, #FF6B9D 0%, #ff8fab 100%); }
.choice-b { background: linear-gradient(135deg, #5B9BD5 0%, #7bbce8 100%); }

/* ── OR Badge ─────────────────────────── */
.or-badge {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #FBBF24, #FF8C42);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1rem;
    color: white;
    box-shadow: 0 4px 18px rgba(255, 140, 66, 0.45);
    flex-shrink: 0;
    z-index: 2;
    position: relative;
    animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ── Progress Bar ─────────────────────── */
.progress-track { background: rgba(255, 255, 255, 0.5); border-radius: 99px; height: 10px; overflow: hidden; backdrop-filter: blur(4px); }

.progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--pink), var(--purple));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4%;
}

/* ── Stat Cards ───────────────────────── */
.stat-card { background: white; border-radius: 20px; padding: 20px 18px; text-align: center; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07); transition: transform 0.2s ease; }
.stat-card:hover { transform: translateY(-4px); }

/* ── Choice History ───────────────────── */
.history-item { background: white; border-radius: 16px; padding: 14px 18px; margin-bottom: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); display: flex; align-items: flex-start; gap: 12px; animation: fadeSlideIn 0.35s ease; }

.history-badge { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 900; color: white; margin-top: 1px; }
.badge-a { background: linear-gradient(135deg, var(--pink), #ff8fab); }
.badge-b { background: linear-gradient(135deg, var(--blue), #7bbce8); }

/* ── Next Transition ─────────────────── */
.question-transition { animation: questionIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes questionIn {
    from { opacity: 0; transform: scale(0.92) translateY(16px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Confetti ─────────────────────────── */
.confetti-piece { position: fixed; opacity: 0; z-index: 9999; animation: confettiFall linear forwards; }

@keyframes confettiFall {
    0% { opacity: 1; transform: translateY(-20px) rotate(0deg); }
    100% { opacity: 0; transform: translateY(110vh) rotate(720deg); }
}

/* ── Floating Emoji ───────────────────── */
.float-emoji { animation: floatUp 3s ease-in-out infinite; }

@keyframes floatUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ── Mobile tweaks ─────────────────────── */
@media (max-width: 640px) {
    .choice-card { min-height: 140px; padding: 24px 16px; }
    .btn-primary { padding: 14px 32px; font-size: 1rem; }
}
