/* ============================================================
   몸으로 말해요 (Charades) - HelloDrink
   ============================================================ */
:root {
    --swb-bg1: #2b1055;
    --swb-bg2: #7597de;
    --swb-card: #ffffff;
    --swb-ink: #1f2430;
    --swb-muted: #6b7280;
    --swb-accent: #ff5f8f;
    --swb-accent2: #7c5cff;
    --swb-ok: #16b981;
    --swb-pass: #f59e0b;
    --swb-radius: 22px;
}

* { box-sizing: border-box; }

body.swb {
    margin: 0;
    min-height: 100vh;
    font-family: 'Nunito', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #fff;
    background: linear-gradient(160deg, var(--swb-bg1) 0%, #4c2a85 45%, var(--swb-bg2) 100%);
    background-attachment: fixed;
    -webkit-tap-highlight-color: transparent;
}

.swb-home {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(15, 16, 28, 0.6);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.swb-lang {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 60;
    display: flex;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(15, 16, 28, 0.6);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.lang-chip {
    border: 0;
    background: transparent;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.lang-chip.on {
    background: #fff;
    color: var(--swb-ink);
}

.swb-wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: 72px 18px 48px;
}

/* ── 헤더 ───────────────────────────────────────────────── */
.swb-head {
    text-align: center;
    margin-bottom: 26px;
}

.swb-emoji {
    font-size: 54px;
    line-height: 1;
    display: block;
    margin-bottom: 8px;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35));
}

.swb-head h1 {
    margin: 0 0 6px;
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -.5px;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .3);
}

.swb-head p {
    margin: 0;
    font-size: .96rem;
    color: rgba(255, 255, 255, .82);
}

/* ── 패널 ───────────────────────────────────────────────── */
.panel {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--swb-radius);
    padding: 18px 16px;
    margin-bottom: 16px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.panel h2 {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 800;
    color: rgba(255, 255, 255, .95);
}

/* ── 주제 칩 ────────────────────────────────────────────── */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-chip,
.time-chip {
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    padding: 9px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: transform .15s, background .2s, border-color .2s;
}

.cat-chip:active,
.time-chip:active { transform: scale(.95); }

.cat-chip.on,
.time-chip.on {
    background: #fff;
    color: var(--swb-ink);
    border-color: #fff;
}

.cat-chip em {
    font-style: normal;
    opacity: .6;
    font-size: .78rem;
    margin-left: 4px;
}

.cat-emoji { margin-right: 5px; }

/* ── 시작 버튼 ──────────────────────────────────────────── */
.btn-main {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 18px;
    padding: 17px;
    font-size: 1.12rem;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, var(--swb-accent) 0%, var(--swb-accent2) 100%);
    box-shadow: 0 12px 28px rgba(124, 92, 255, .38);
    cursor: pointer;
    transition: transform .15s, box-shadow .2s;
}

.btn-main:active {
    transform: translateY(2px);
    box-shadow: 0 6px 16px rgba(124, 92, 255, .3);
}

.note {
    margin-top: 10px;
    text-align: center;
    font-weight: 700;
    color: #ffd166;
    opacity: 0;
    transition: opacity .25s;
    min-height: 1.2em;
}

.note.show { opacity: 1; }

/* ── 게임 화면 ──────────────────────────────────────────── */
.scoreline {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin-bottom: 12px;
    font-weight: 800;
}

.scoreline b { font-size: 1.5rem; }
.scoreline .ok { color: #8ef7cf; }
.scoreline .ps { color: #ffd58a; }
.scoreline span { display: block; font-size: .78rem; opacity: .75; font-weight: 700; }

.timer-bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    overflow: hidden;
    margin-bottom: 8px;
}

.timer-bar i {
    display: block;
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8ef7cf, #7c5cff);
    transition: width 1s linear;
}

.timer-bar.warn i { background: linear-gradient(90deg, #ff8a8a, #ff3b3b); }

.timer-text {
    text-align: center;
    font-weight: 900;
    font-size: 1.35rem;
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
}

.word-card {
    background: var(--swb-card);
    color: var(--swb-ink);
    border-radius: 26px;
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px 18px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .35);
    margin-bottom: 18px;
}

.word-card.flip { animation: swbFlip .45s ease-out; }

@keyframes swbFlip {
    from { transform: rotateX(80deg) scale(.9); opacity: 0; }
    to   { transform: rotateX(0)     scale(1);  opacity: 1; }
}

#wordText {
    font-size: clamp(1.9rem, 9vw, 3rem);
    font-weight: 900;
    line-height: 1.25;
    word-break: keep-all;
}

.play-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.btn-ok,
.btn-pass {
    border: 0;
    border-radius: 18px;
    padding: 20px 10px;
    font-size: 1.1rem;
    font-weight: 900;
    color: #fff;
    cursor: pointer;
    transition: transform .12s;
}

.btn-ok { background: linear-gradient(135deg, #16b981, #0e9f6e); box-shadow: 0 10px 24px rgba(22, 185, 129, .35); }
.btn-pass { background: linear-gradient(135deg, #f59e0b, #ea7c0b); box-shadow: 0 10px 24px rgba(245, 158, 11, .32); }
.btn-ok:active, .btn-pass:active { transform: translateY(2px); }

.btn-ghost {
    display: block;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-radius: 14px;
    padding: 12px;
    font-weight: 800;
    cursor: pointer;
}

.card-hint {
    text-align: center;
    font-size: .85rem;
    color: rgba(255, 255, 255, .7);
    margin-top: 6px;
}

/* ── 결과 화면 ──────────────────────────────────────────── */
.result-nums {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.result-nums div {
    background: rgba(255, 255, 255, .12);
    border-radius: 18px;
    padding: 18px 10px;
    text-align: center;
}

.result-nums span { display: block; font-size: .82rem; opacity: .8; font-weight: 700; margin-bottom: 4px; }
.result-nums b { font-size: 1.9rem; font-weight: 900; }

.wordlist {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 6px;
}

.wordlist span {
    background: rgba(255, 255, 255, .16);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: .86rem;
    font-weight: 700;
}

.wordlist em { opacity: .55; font-style: normal; }

.result-btns { display: grid; gap: 10px; margin-top: 18px; }

/* ── 규칙 / 팁 ──────────────────────────────────────────── */
.rules-list,
.tip-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.75;
    font-size: .93rem;
    color: rgba(255, 255, 255, .9);
}

.rules-list li,
.tip-list li { margin-bottom: 6px; }

.swb-foot {
    text-align: center;
    padding: 20px 0 8px;
    font-size: .82rem;
    color: rgba(255, 255, 255, .6);
}

@media (min-width: 600px) {
    .word-card { min-height: 260px; }
}
