/* =========================================================================
 *  게임 모음집 - 화사하고 재미있는 파티 테마 ✨
 * ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Jua&family=Gaegu:wght@700&display=swap');

:root {
  --pink: #ff4d8d;
  --purple: #7c4dff;
  --cyan: #22c8ff;
  --yellow: #ffcf33;
  --green: #22d37a;
  --orange: #ff7a45;
  --red: #ff5169;
  --ink: #2c2350;      /* 어두운 글씨 (밝은 카드 위) */
  --ink-soft: #6b6392;
  --white: #ffffff;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 14px 34px rgba(120, 60, 170, 0.28);
  --shadow-lg: 0 22px 50px rgba(120, 60, 170, 0.35);
  --ring: 0 0 0 4px rgba(255, 255, 255, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(120deg, #ff9ec7, #ffd59e, #a0f0d8, #a9c9ff, #d7a9ff, #ff9ec7);
  background-size: 300% 300%;
  animation: bgShift 18s ease infinite;
}
@keyframes bgShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 둥둥 떠다니는 배경 방울 */
body::before, body::after {
  content: "";
  position: fixed; z-index: 0; border-radius: 50%;
  filter: blur(30px); opacity: 0.55; pointer-events: none;
}
body::before {
  width: 340px; height: 340px; top: -80px; left: -60px;
  background: radial-gradient(circle, #fff6a9, #ff8fc7 70%);
  animation: float1 12s ease-in-out infinite;
}
body::after {
  width: 300px; height: 300px; bottom: -70px; right: -50px;
  background: radial-gradient(circle, #9be7ff, #7c4dff 70%);
  animation: float2 14s ease-in-out infinite;
}
@keyframes float1 { 50% { transform: translate(40px, 60px) scale(1.15); } }
@keyframes float2 { 50% { transform: translate(-50px, -40px) scale(1.12); } }

#app {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 30px 20px 70px;
}

/* ---- 화면 전환 ---- */
.screen { display: none; width: 100%; max-width: 1040px; }
.screen.active { display: block; animation: popScreen .5s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes popScreen {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* ---- 상단 바 ---- */
.topbar {
  width: 100%; max-width: 1040px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px; min-height: 46px;
}
.topbar .spacer { flex: 1; }
.crumb {
  color: var(--ink); font-weight: 800; font-size: 15px;
  background: rgba(255,255,255,0.7); padding: 8px 16px; border-radius: 999px;
  box-shadow: var(--shadow);
}
.crumb b { color: var(--pink); }

/* ---- 타이틀 ---- */
.hero { text-align: center; margin: 14px 0 40px; }
.hero h1 {
  font-family: "Jua", sans-serif;
  font-size: clamp(40px, 7vw, 74px);
  line-height: 1.1; letter-spacing: 1px;
  background: linear-gradient(90deg, #ff4d8d, #ff7a45, #ffcf33, #22d37a, #22c8ff, #7c4dff, #ff4d8d);
  background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow 6s linear infinite, bob 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(255,255,255,0.6));
}
@keyframes rainbow { to { background-position: 250% center; } }
@keyframes bob { 50% { transform: translateY(-8px); } }
.hero p {
  color: var(--ink); font-weight: 700; margin-top: 14px; font-size: 18px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}

/* ---- 버튼 ---- */
.btn {
  position: relative; overflow: hidden;
  font: inherit; font-weight: 800; cursor: pointer;
  border: none; border-radius: 16px;
  padding: 13px 22px; color: #fff;
  background: linear-gradient(180deg, var(--purple), #5a2fd6);
  box-shadow: var(--shadow), inset 0 2px 0 rgba(255,255,255,0.35);
  transition: transform .14s cubic-bezier(.2,.9,.3,1.4), box-shadow .14s, filter .14s;
}
/* 버튼 위로 지나가는 반짝이 */
.btn::after {
  content: ""; position: absolute; top: 0; left: -80%;
  width: 60%; height: 100%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
}
.btn:hover { transform: translateY(-3px) scale(1.04); filter: brightness(1.06); box-shadow: var(--shadow-lg); }
.btn:hover::after { animation: shine .7s ease; }
@keyframes shine { to { left: 130%; } }
.btn:active { transform: translateY(0) scale(.97); }
.btn.ghost { background: rgba(255,255,255,0.85); color: var(--purple); }
.btn.gold { background: linear-gradient(180deg, #ffdf5e, var(--yellow)); color: #6a4b00; }
.btn.green { background: linear-gradient(180deg, #4be79a, var(--green)); }
.btn.red { background: linear-gradient(180deg, #ff7a8c, var(--red)); }
.btn.big { padding: 17px 30px; font-size: 19px; border-radius: 20px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; filter: grayscale(.3); }
.btn:disabled::after { display: none; }

/* ====================================================================== */
/*  허브 (게임 선택)                                                        */
/* ====================================================================== */
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.game-card {
  position: relative; cursor: pointer;
  border-radius: 28px; padding: 42px 34px; min-height: 250px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; box-shadow: var(--shadow-lg);
  border: 3px solid rgba(255,255,255,0.6);
  transition: transform .18s cubic-bezier(.2,.9,.3,1.4), box-shadow .18s;
  overflow: hidden;
}
.game-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 15%, rgba(255,255,255,0.5), transparent 45%);
}
.game-card:hover { transform: translateY(-8px) rotate(-1deg) scale(1.02); box-shadow: 0 30px 60px rgba(90,40,140,0.45); }
.game-card .emoji {
  font-size: 68px; position: absolute; top: 24px; right: 28px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
  animation: wobble 3s ease-in-out infinite;
}
@keyframes wobble { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) scale(1.08); } }
.game-card h2 { font-family: "Jua", sans-serif; font-size: 34px; margin-bottom: 8px; text-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.game-card p { color: rgba(255,255,255,0.95); font-weight: 600; }
.game-card.feud { background: linear-gradient(150deg, #ff7ac1, #ff4d8d 55%, #c0308f); }
.game-card.quiz { background: linear-gradient(150deg, #6ae0ff, #7c4dff 60%, #5a2fd6); }
.game-card.balance { background: linear-gradient(150deg, #ffd36b, #ff9d3c 55%, #ff6a3d); }

/* ====================================================================== */
/*  게임 소개 화면                                                          */
/* ====================================================================== */
.intro-card {
  position: relative; max-width: 620px; margin: 10px auto 0;
  background: #fff; border: 1px solid rgba(124,77,255,0.12);
  border-radius: 26px; padding: 40px 40px 32px; box-shadow: var(--shadow-lg);
  text-align: center; overflow: hidden;
}
.intro-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px;
  background: linear-gradient(90deg, var(--pink), var(--orange), var(--yellow), var(--green), var(--cyan), var(--purple));
}
.intro-emoji { font-size: 64px; line-height: 1; animation: wobble 3s ease-in-out infinite; }
.intro-card h2 { font-family: "Jua", sans-serif; font-size: 38px; margin: 10px 0 4px; letter-spacing: .5px; }
.intro-card.quiz h2 { color: var(--purple); }
.intro-card.feud h2 { color: var(--pink); }
.intro-tag {
  font-weight: 600; color: var(--ink-soft); font-size: 16px; margin-bottom: 26px;
  word-break: keep-all;
}
.intro-tag b { color: var(--ink); }
.intro-rules {
  text-align: left; margin: 0 0 28px; padding: 0;
  list-style: none; counter-reset: step;
}
.intro-rules li {
  position: relative; padding: 14px 18px 14px 54px; margin-bottom: 10px;
  background: #f7f5ff; border-radius: 14px; font-weight: 500; color: var(--ink);
  font-size: 15.5px; line-height: 1.55; word-break: keep-all;
}
.intro-rules li b { font-weight: 800; }
.intro-rules li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 14px; top: 13px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-family: "Jua", sans-serif; font-size: 15px; color: #fff;
  background: linear-gradient(180deg, var(--purple), #5a2fd6);
}
.intro-card.feud .intro-rules li::before { background: linear-gradient(180deg, var(--pink), #c0308f); }
.intro-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }

/* ====================================================================== */
/*  스피드 퀴즈                                                            */
/* ====================================================================== */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-btn {
  cursor: pointer; border: 3px solid rgba(255,255,255,0.7); border-radius: 20px;
  padding: 26px 10px; text-align: center; font-family: "Jua", sans-serif; font-size: 20px; color: #fff;
  box-shadow: var(--shadow);
  transition: transform .14s cubic-bezier(.2,.9,.3,1.4), filter .14s, box-shadow .14s;
}
/* 카테고리마다 알록달록 색을 돌려가며 */
.cat-btn:nth-child(8n+1) { background: linear-gradient(160deg, #ff85b3, var(--pink)); }
.cat-btn:nth-child(8n+2) { background: linear-gradient(160deg, #9a7bff, var(--purple)); }
.cat-btn:nth-child(8n+3) { background: linear-gradient(160deg, #63d8ff, var(--cyan)); }
.cat-btn:nth-child(8n+4) { background: linear-gradient(160deg, #ffdd6b, #ffb020); color: #6a4b00; }
.cat-btn:nth-child(8n+5) { background: linear-gradient(160deg, #55e6a0, var(--green)); }
.cat-btn:nth-child(8n+6) { background: linear-gradient(160deg, #ff9d70, var(--orange)); }
.cat-btn:nth-child(8n+7) { background: linear-gradient(160deg, #ff8095, var(--red)); }
.cat-btn:nth-child(8n+8) { background: linear-gradient(160deg, #7fd0ff, #3f8bff); }
.cat-btn:hover { transform: translateY(-5px) rotate(-1.5deg) scale(1.04); filter: brightness(1.08); box-shadow: var(--shadow-lg); }
.cat-btn small { display: block; font-family: "Pretendard", sans-serif; font-weight: 700; opacity: .95; margin-top: 6px; font-size: 12px; }

/* 라운드(플레이) 화면 */
.play-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.pill {
  background: rgba(255,255,255,0.9); color: var(--ink); border: 2px solid rgba(255,255,255,0.9);
  padding: 11px 18px; border-radius: 999px; font-weight: 800; box-shadow: var(--shadow);
}
.pill.score { background: linear-gradient(180deg, #4be79a, var(--green)); color: #fff; }
.timer {
  margin-left: auto; font-family: "Jua", sans-serif; font-size: 34px; color: var(--purple);
  background: #fff; border: 3px solid rgba(255,255,255,0.9); padding: 6px 24px; border-radius: 18px;
  box-shadow: var(--shadow); font-variant-numeric: tabular-nums;
}
.timer.warn { color: #fff; background: linear-gradient(180deg, #ff7a8c, var(--red)); animation: pulse .55s infinite alternate; }
@keyframes pulse { to { transform: scale(1.1); box-shadow: 0 0 24px rgba(255,81,105,0.7); } }

.qcard {
  position: relative; background: var(--card);
  border: 4px solid rgba(255,255,255,0.85); border-radius: 30px; box-shadow: var(--shadow-lg);
  padding: 54px 36px; text-align: center; min-height: 300px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  overflow: hidden;
}
.qcard::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,207,51,0.18), transparent 55%);
}
.qcard .qnum {
  font-family: "Jua", sans-serif; color: #fff; font-size: 20px; letter-spacing: 1px;
  background: linear-gradient(90deg, var(--pink), var(--orange)); padding: 6px 20px; border-radius: 999px;
  box-shadow: var(--shadow);
}
.qcard .qtext { font-size: clamp(24px, 4vw, 40px); font-weight: 800; line-height: 1.4; color: var(--ink); }
.qcard .qtext.word {
  font-family: "Jua", sans-serif; font-size: clamp(44px, 8.5vw, 84px); line-height: 1.15;
  background: linear-gradient(90deg, var(--purple), var(--pink), var(--orange));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 8px rgba(124,77,255,0.25));
  animation: popWord .4s cubic-bezier(.2,.9,.3,1.5);
}
@keyframes popWord { from { transform: scale(.6) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
.qcard .describe-hint { color: var(--ink-soft); font-weight: 700; font-size: 15px; }
.play-controls { display: flex; gap: 16px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

/* 결과 화면 */
.result-card {
  position: relative; text-align: center; background: var(--card);
  border: 4px solid rgba(255,255,255,0.85); border-radius: 30px; padding: 54px; box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.result-card::before {
  content: "🎉"; position: absolute; top: 14px; left: 24px; font-size: 40px; animation: wobble 3s ease-in-out infinite;
}
.result-card::after {
  content: "🎊"; position: absolute; top: 14px; right: 24px; font-size: 40px; animation: wobble 3.4s ease-in-out infinite reverse;
}
.result-card .qnum {
  font-family: "Jua", sans-serif; display: inline-block; color: #fff;
  background: linear-gradient(90deg, var(--purple), var(--pink)); padding: 6px 22px; border-radius: 999px;
}
.result-card .big-score {
  font-family: "Jua", sans-serif; font-size: 86px;
  background: linear-gradient(90deg, var(--pink), var(--orange), var(--yellow));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: bob 2.4s ease-in-out infinite;
}

/* ====================================================================== */
/*  Family Feud                                                            */
/* ====================================================================== */
.feud-question {
  font-family: "Jua", sans-serif; text-align: center; font-size: clamp(24px, 4vw, 36px);
  color: var(--ink); margin-bottom: 8px; text-shadow: 0 2px 0 rgba(255,255,255,0.6);
}
.feud-sub {
  text-align: center; color: var(--ink); font-weight: 800; margin: 0 auto 20px;
  background: rgba(255,255,255,0.7); width: fit-content; padding: 6px 18px; border-radius: 999px;
  box-shadow: var(--shadow);
}
.feud-board { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.feud-slot {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: linear-gradient(180deg, #ffffff, #eef0ff);
  border: 3px solid rgba(255,255,255,0.9); border-radius: 18px; padding: 16px 18px;
  min-height: 66px; box-shadow: var(--shadow); transition: transform .12s cubic-bezier(.2,.9,.3,1.4);
}
.feud-slot:hover { transform: translateY(-3px) scale(1.01); }
.feud-slot .num {
  width: 38px; height: 38px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-family: "Jua", sans-serif; font-size: 18px;
  background: linear-gradient(180deg, #ffdf5e, var(--yellow)); color: #6a4b00;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.5);
}
.feud-slot .label { flex: 1; font-size: 20px; font-weight: 800; color: var(--ink); }
.feud-slot .pts { font-family: "Jua", sans-serif; font-size: 24px; color: var(--pink); }
.feud-slot.closed { justify-content: center; background: linear-gradient(180deg, #a18cff, var(--purple)); border-color: rgba(255,255,255,0.5); }
.feud-slot.closed .label, .feud-slot.closed .pts { display: none; }
.feud-slot.closed .num { background: rgba(255,255,255,0.28); color: #fff; font-size: 20px; }
.feud-slot.open {
  background: linear-gradient(180deg, #4be79a, var(--green)); border-color: rgba(255,255,255,0.7);
  transform-origin: bottom center;
  animation: riseReveal .55s cubic-bezier(.2,.85,.25,1.15);
}
.feud-slot.open .label { color: #fff; }
.feud-slot.open .pts { color: #fff; }
.feud-slot.open .num { background: #fff; color: var(--green); animation: numPop .55s cubic-bezier(.2,.85,.25,1.4); }
/* 정답판이 아래를 축으로 위로 올라오며 열림 */
@keyframes riseReveal {
  0%   { transform: perspective(800px) rotateX(90deg); opacity: 0; }
  55%  { transform: perspective(800px) rotateX(-13deg); opacity: 1; box-shadow: 0 0 26px rgba(255,255,255,0.65), var(--shadow); }
  100% { transform: perspective(800px) rotateX(0deg); }
}
@keyframes numPop { from { transform: translateY(12px) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* 효과음 음소거 토글 (우측 상단 고정) */
.sfx-toggle {
  position: fixed; top: 14px; right: 14px; z-index: 50;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(255,255,255,0.8); font-size: 22px; line-height: 1;
  background: rgba(255,255,255,0.85); box-shadow: var(--shadow);
  transition: transform .12s, filter .12s;
}
.sfx-toggle:hover { transform: scale(1.1); }
.sfx-toggle:active { transform: scale(.92); }
.sfx-toggle.off { filter: grayscale(1); opacity: .7; }

.feud-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; }
.team {
  background: var(--card); border: 4px solid transparent; border-radius: 22px; padding: 20px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.team.a { border-color: var(--cyan); }
.team.b { border-color: var(--pink); }
.team .tname {
  font-family: "Jua", sans-serif; font-size: 20px; background: transparent; border: none; color: var(--ink);
  text-align: center; width: 100%; outline: none;
}
.team .tscore {
  font-family: "Jua", sans-serif; font-size: 54px; margin: 4px 0;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.team .team-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.feud-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-width: 170px; }
.pot { text-align: center; background: var(--card); padding: 12px 22px; border-radius: 20px; box-shadow: var(--shadow); border: 3px solid rgba(255,255,255,0.8); }
.pot .pot-label { color: var(--ink-soft); font-weight: 800; font-size: 13px; }
.pot .pot-val {
  font-family: "Jua", sans-serif; font-size: 44px;
  background: linear-gradient(90deg, var(--orange), var(--yellow));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.strikes { display: flex; gap: 8px; }
.strike {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-family: "Jua", sans-serif; font-size: 26px; color: var(--red);
  background: rgba(255,255,255,0.85); border: 3px solid rgba(255,255,255,0.8); box-shadow: var(--shadow);
}
.strike.on { background: linear-gradient(180deg, #ff7a8c, var(--red)); color: #fff; animation: pop .3s cubic-bezier(.2,.9,.3,1.6); }
@keyframes pop { from { transform: scale(.3) rotate(-20deg); } to { transform: none; } }

.feud-controls { display: flex; gap: 12px; justify-content: center; margin: 22px 0 6px; flex-wrap: wrap; }

/* ====================================================================== */
/*  밸런스 게임                                                            */
/* ====================================================================== */
.balance-arena {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 0;
  margin-bottom: 20px; position: relative;
}
.bal-side {
  cursor: pointer; position: relative; overflow: hidden;
  min-height: 260px; padding: 34px 26px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; color: #fff; box-shadow: var(--shadow-lg);
  border: 4px solid rgba(255,255,255,0.75);
  transition: transform .14s cubic-bezier(.2,.9,.3,1.4), filter .14s;
}
.bal-side.a { border-radius: 28px 0 0 28px; background: linear-gradient(150deg, #6ae0ff, #3f8bff 60%, #3a6df0); }
.bal-side.b { border-radius: 0 28px 28px 0; background: linear-gradient(150deg, #ff85b3, #ff4d8d 60%, #d6318f); }
.bal-side:hover { filter: brightness(1.07); transform: translateY(-2px); }
.bal-side:active { transform: scale(.98); }
.bal-side.winning { animation: winGlow 1.2s ease-in-out infinite; }
@keyframes winGlow { 50% { box-shadow: 0 0 34px rgba(255,255,255,0.85), var(--shadow-lg); } }
.bal-votes {
  font-family: "Jua", sans-serif; font-size: 52px; line-height: 1;
  text-shadow: 0 3px 8px rgba(0,0,0,0.25);
}
.bal-text { font-family: "Jua", sans-serif; font-size: clamp(22px, 3.4vw, 32px); line-height: 1.25; word-break: keep-all; }
.bal-tap { font-size: 13px; font-weight: 700; opacity: .85; background: rgba(255,255,255,0.22); padding: 4px 12px; border-radius: 999px; }

.bal-vs {
  z-index: 2; align-self: center; margin: 0 -22px;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; font-family: "Jua", sans-serif; font-size: 22px; color: var(--ink);
  background: #fff; box-shadow: var(--shadow-lg); border: 4px solid rgba(255,255,255,0.9);
}

.bal-bar {
  height: 26px; border-radius: 999px; overflow: hidden;
  background: linear-gradient(90deg, #ff4d8d, #d6318f); /* B쪽 색이 바탕 */
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.15); border: 3px solid rgba(255,255,255,0.85);
}
.bal-bar-fill {
  height: 100%; width: 50%;
  background: linear-gradient(90deg, #6ae0ff, #3f8bff); /* A쪽 색 */
  transition: width .4s cubic-bezier(.2,.9,.3,1.2);
}
.bal-percent {
  display: flex; justify-content: space-between; margin-top: 8px; padding: 0 6px;
  font-family: "Jua", sans-serif; font-size: 20px; color: var(--ink);
}
.bal-percent span:first-child { color: #2f6fe0; }
.bal-percent span:last-child { color: var(--pink); }

@media (max-width: 640px) {
  .balance-arena { grid-template-columns: 1fr; gap: 0; }
  .bal-side.a { border-radius: 28px 28px 0 0; }
  .bal-side.b { border-radius: 0 0 28px 28px; }
  .bal-vs { margin: -22px 0; }
}

/* 실시간 투표 패널 (호스트 화면) */
.bal-live-panel {
  display: flex; gap: 22px; align-items: center; flex-wrap: wrap; justify-content: center;
  background: var(--card); border: 3px solid rgba(255,255,255,0.85); border-radius: 22px;
  padding: 18px 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.bal-qr { width: 168px; height: 168px; background: #fff; border-radius: 14px; padding: 8px; box-shadow: var(--shadow); display: grid; place-items: center; }
.bal-qr img, .bal-qr canvas { display: block; }
.bal-live-info { text-align: left; }
.bal-live-title { font-family: "Jua", sans-serif; font-size: 20px; color: var(--ink); margin-bottom: 8px; }
.bal-room { font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.bal-room b { font-family: "Jua", sans-serif; font-size: 26px; color: var(--purple); letter-spacing: 3px; }
.bal-live-url { font-size: 12px; color: var(--ink-soft); word-break: break-all; margin-bottom: 8px; }
.bal-join { font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.bal-join b { color: var(--pink); }

/* ====================================================================== */
/*  참가자 투표 페이지 (vote.html)                                          */
/* ====================================================================== */
.voter {
  max-width: 480px; margin: 0 auto; min-height: 84vh;
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
}
.voter-head {
  text-align: center; font-family: "Jua", sans-serif; font-size: 22px; color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.voter-room { font-size: 15px; opacity: .9; }
.voter-q {
  text-align: center; background: var(--card); border-radius: 20px; padding: 20px;
  font-weight: 800; font-size: 20px; color: var(--ink); box-shadow: var(--shadow); word-break: keep-all;
}
.voter-opts { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.voter-opt {
  width: 100%; cursor: pointer; border: 4px solid rgba(255,255,255,0.8); border-radius: 22px;
  padding: 32px 20px; font-family: "Jua", sans-serif; font-size: 26px; color: #fff; line-height: 1.3;
  box-shadow: var(--shadow-lg); word-break: keep-all;
  transition: transform .12s cubic-bezier(.2,.9,.3,1.4), filter .12s;
}
.voter-opt.a { background: linear-gradient(150deg, #6ae0ff, #3f8bff 60%, #3a6df0); }
.voter-opt.b { background: linear-gradient(150deg, #ff85b3, #ff4d8d 60%, #d6318f); }
.voter-opt:active { transform: scale(.97); }
.voter-opt:disabled { opacity: .55; filter: grayscale(.3); cursor: default; }
.voter-opt.chosen { outline: 5px solid #fff; transform: scale(1.02); filter: brightness(1.08); }
.voter-vs { font-family: "Jua", sans-serif; color: #fff; font-size: 18px; opacity: .9; }
.voter-status { text-align: center; color: #fff; font-weight: 800; min-height: 24px; text-shadow: 0 1px 4px rgba(0,0,0,0.2); }

/* 반응형 */
@media (max-width: 760px) {
  .hub-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .feud-board { grid-template-columns: 1fr; }
  .feud-teams { grid-template-columns: 1fr; }
}
