* {
    font-family: 'Nunito', sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #003d3d 0%, #005f5f 45%, #00895a 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* ── Sections ─────────────────────────────────── */
.section {
    display: none;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.section.active {
    display: flex;
    flex-direction: column;
    animation: fadeSlideIn 0.4s ease;
}

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

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

.blob1 {
    width: 440px; height: 440px;
    background: #ff6b6b;
    top: -130px; left: -130px;
}

.blob2 {
    width: 380px; height: 380px;
    background: #ffd32a;
    bottom: -100px; right: -100px;
    animation-delay: 3s;
}

.blob3 {
    width: 280px; height: 280px;
    background: #0be881;
    top: 45%; left: 55%;
    animation-delay: 6s;
}

@keyframes blobFloat {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(24px, 34px) scale(1.1); }
}

/* ── Buttons ──────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, #ff6348 0%, #ff9f43 100%);
    color: white;
    border: none;
    border-radius: 99px;
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    transition: all 0.22s cubic-bezier(.34, 1.56, .64, 1);
    box-shadow: 0 6px 24px rgba(255, 99, 72, 0.5);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 14px 36px rgba(255, 99, 72, 0.6);
}

.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 99px;
    padding: 13px 34px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    transition: all 0.22s cubic-bezier(.34, 1.56, .64, 1);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-2px); }

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 99px;
    padding: 8px 18px;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(.34, 1.56, .64, 1);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(239, 68, 68, 0.55); }

.btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    border: none;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s;
    padding: 8px 16px;
}

.btn-ghost:hover { color: white; }

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

.mode-card:hover { transform: translateY(-6px) scale(1.03); box-shadow: 0 20px 48px rgba(0,0,0,0.25); }
.mode-card.selected { border-color: rgba(255,255,255,0.85); transform: translateY(-4px) scale(1.04); box-shadow: 0 18px 44px rgba(0,0,0,0.28); }

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

.cat-card:hover { transform: translateY(-7px) scale(1.04); box-shadow: 0 22px 52px rgba(0,0,0,0.25); }
.cat-card.selected { border-color: rgba(255,255,255,0.85); transform: translateY(-5px) scale(1.05); box-shadow: 0 18px 44px rgba(0,0,0,0.28); }

.cat-badge {
    position: absolute;
    top: 9px; right: 9px;
    background: rgba(0,0,0,0.25);
    border-radius: 99px;
    padding: 2px 9px;
    font-size: 0.6rem;
    font-weight: 800;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.5px;
}

/* ── Player Buttons ───────────────────────────── */
.player-btn {
    width: 50px; height: 50px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 900;
    color: white;
    transition: all 0.24s cubic-bezier(.34, 1.56, .64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.player-btn:hover { transform: scale(1.14); }
.player-btn.selected { border-color: white; transform: scale(1.18); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }

/* ── Flip Card ────────────────────────────────── */
.flip-card {
    perspective: 1200px;
    cursor: pointer;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    padding-top: 148%;
    transform-style: preserve-3d;
    transition: transform 0.72s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-card:not(.flipped):not(.no-hover):hover .flip-card-inner { transform: rotateY(14deg) translateY(-8px); }
.flip-card.flipped, .flip-card.no-hover { cursor: default; }

.flip-card-front, .flip-card-back {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px;
    text-align: center;
}

.flip-card-back { transform: rotateY(180deg); flex-direction: column; }

.flip-card-front { box-shadow: 0 20px 56px rgba(0,0,0,0.35); }
.front-anak { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%); }
.front-remaja { background: linear-gradient(135deg, #1cb5e0 0%, #00a8cc 100%); }
.front-dewasa { background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%); }
.front-extreme { background: linear-gradient(135deg, #e55039 0%, #f77f00 100%); }

.back-truth { background: linear-gradient(145deg, #0984e3 0%, #00cec9 100%); box-shadow: 0 20px 56px rgba(9,132,227,0.5); }
.back-dare { background: linear-gradient(145deg, #d63031 0%, #fd79a8 100%); box-shadow: 0 20px 56px rgba(214,48,49,0.5); }

.card-type-badge {
    background: rgba(255,255,255,0.22);
    color: white;
    border-radius: 99px;
    padding: 6px 22px;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 14px;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.35);
}

.card-content-text { color: white; font-size: 1rem; font-weight: 700; line-height: 1.6; }

.tap-hint { animation: pulseBounce 1.6s ease-in-out infinite; }

@keyframes pulseBounce {
    0%, 100% { transform: scale(1) rotate(-3deg); }
    50% { transform: scale(1.1) rotate(3deg); }
}

.card-shine {
    position: absolute;
    inset: 0;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
    pointer-events: none;
}

/* ── Choice Buttons ──────────────────────────── */
.choice-btn {
    flex: 1;
    border: none;
    border-radius: 22px;
    padding: 22px 10px;
    font-size: 1.1rem;
    font-weight: 900;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.22s cubic-bezier(.34, 1.56, .64, 1);
}

.choice-btn:hover:not(:disabled) { transform: translateY(-6px) scale(1.05); }
.choice-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.choice-truth { background: linear-gradient(145deg, #0984e3 0%, #00cec9 100%); box-shadow: 0 8px 28px rgba(9,132,227,0.45); }
.choice-dare { background: linear-gradient(145deg, #d63031 0%, #fd79a8 100%); box-shadow: 0 8px 28px rgba(214,48,49,0.45); }
.choice-truth:hover:not(:disabled) { box-shadow: 0 16px 40px rgba(9,132,227,0.6); }
.choice-dare:hover:not(:disabled) { box-shadow: 0 16px 40px rgba(214,48,49,0.6); }

/* ── Glass ────────────────────────────────────── */
.glass {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
}

/* ── Timer / Stat pills ───────────────────────── */
.timer-pill {
    background: rgba(0,0,0,0.28);
    backdrop-filter: blur(8px);
    border-radius: 99px;
    padding: 6px 16px;
    color: white;
    font-weight: 800;
    font-size: 0.88rem;
    border: 1px solid rgba(255,255,255,0.15);
}

.stat-pill {
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(8px);
    border-radius: 99px;
    padding: 5px 14px;
    color: white;
    font-weight: 800;
    font-size: 0.78rem;
    border: 1px solid rgba(255,255,255,0.15);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ── Player turn box ──────────────────────────── */
.turn-box {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255,255,255,0.28);
    border-radius: 18px;
    padding: 12px 22px;
    text-align: center;
}

/* ── Summary stat cards ───────────────────────── */
.sum-stat {
    background: white;
    border-radius: 20px;
    padding: 18px 12px;
    text-align: center;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}

/* ── Name input ───────────────────────────────── */
.name-input {
    background: rgba(255,255,255,0.14);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.28);
    border-radius: 12px;
    padding: 9px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.name-input::placeholder { color: rgba(255,255,255,0.4); }
.name-input:focus { border-color: rgba(255,255,255,0.7); }

/* ── Logo animation ───────────────────────────── */
.logo-spin {
    animation: logoFloat 2.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-12px) rotate(4deg); }
}

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

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

/* ── Empty card box ───────────────────────────── */
.empty-card-box {
    background: rgba(255,255,255,0.1);
    border: 2px dashed rgba(255,255,255,0.3);
    border-radius: 26px;
    padding: 48px 28px;
    text-align: center;
    max-width: 300px;
    margin: 0 auto;
}

/* ── Mode badge ───────────────────────────────── */
.mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.18);
    border-radius: 99px;
    padding: 4px 13px;
    font-size: 0.68rem;
    font-weight: 900;
    color: white;
    border: 1px solid rgba(255,255,255,0.28);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.25); border-radius: 99px; }

@media (max-width: 400px) {
    .flip-card { max-width: 260px; }
    .card-content-text { font-size: 0.9rem; }
    .choice-btn { font-size: 0.95rem; padding: 16px 8px; }
}
