/* 우리방 OX — 디자인 v2 (oxgame.css 위에 덮어씀) 파랑 ⭕ vs 빨강 ❌ 듀얼 테마 */
.ox-page-shell { position: relative; }
body { background: radial-gradient(1000px 520px at 15% -10%, rgba(74,222,128,.10), transparent 60%), radial-gradient(1000px 520px at 90% 0%, rgba(248,113,113,.10), transparent 60%), #0a0f1a; }

/* 카드 공통 */
.ox-entry, .ox-lobby, .ox-hud, .ox-result-card, .ox-result-box, .ox-end-wrap {
  background: linear-gradient(160deg, rgba(24,34,56,.92), rgba(14,21,34,.96));
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 12px 36px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.05);
}

/* ===== Entry ===== */
.ox-entry { position: relative; overflow: hidden; }
.ox-entry::before, .ox-entry::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; filter: blur(60px); opacity: .28; pointer-events: none; }
.ox-entry::before { background: var(--ox-o); left: -90px; top: -90px; }
.ox-entry::after { background: var(--ox-x); right: -90px; bottom: -90px; }
.ox-entry > * { position: relative; z-index: 1; }
.ox-entry-emoji { animation: oxv2-bob 2.6s ease-in-out infinite; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
@keyframes oxv2-bob { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-7px) rotate(3deg); } }
.ox-entry-title { background: linear-gradient(90deg, #4ade80, #60a5fa 45%, #f87171); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.5px; }
.ox-entry-btn { transition: transform .15s, box-shadow .2s, border-color .2s; }
.ox-entry-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.ox-entry-btn.primary { background: linear-gradient(135deg, #22c55e, #3b82f6); border-color: transparent; box-shadow: 0 8px 22px rgba(59,130,246,.35); }
.ox-btn-primary, .ox-actions button.primary { background: linear-gradient(135deg, #22c55e, #3b82f6); border: 0; box-shadow: 0 6px 18px rgba(59,130,246,.3); transition: transform .12s, filter .2s; }
.ox-btn-primary:hover, .ox-actions button.primary:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
.ox-rules-box { background: rgba(255,255,255,.03); border: 1px dashed rgba(255,255,255,.14); border-radius: 14px; }
.ox-other-game-card { transition: transform .15s, border-color .2s; }
.ox-other-game-card:hover { transform: translateY(-3px); border-color: rgba(156,108,255,.5); }

/* ===== Lobby ===== */
.ox-room-code { letter-spacing: 5px; text-shadow: 0 0 18px rgba(96,165,250,.55); }
.ox-opt { background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; }
.ox-roster-card { background: linear-gradient(160deg, rgba(36,52,84,.8), rgba(20,30,50,.9)); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; animation: oxv2-pop .35s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes oxv2-pop { from { opacity: 0; transform: scale(.82) translateY(8px); } to { opacity: 1; transform: none; } }
.ox-roster-host-badge { background: linear-gradient(135deg, #facc15, #fb923c); color: #2a1a00; box-shadow: 0 2px 8px rgba(250,204,21,.45); }
.ox-avatar, .ox-rank-avatar, .ox-predict-avatar, .ox-result-box-avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.14); }

/* ===== HUD: 링 타이머 ===== */
.ox-hud { position: relative; overflow: hidden; }
.ox-hud::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(180deg, var(--ox-o), var(--ox-x)); }
.ox-hud-round { padding-left: 6px; letter-spacing: .3px; }
.ox-hud-cat { padding-left: 6px; }
.ox-hud-timer {
  --p: 1; width: 56px; height: 56px; min-width: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #fff; position: relative;
  background: conic-gradient(var(--ox-o) calc(var(--p) * 360deg), rgba(255,255,255,.1) 0);
  -webkit-mask: none;
}
.ox-hud-timer::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #0f1726; z-index: 0; }
.ox-hud-timer { isolation: isolate; }
.ox-hud-timer { text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.ox-hud-timer.urgent { background: conic-gradient(var(--ox-x) calc(var(--p) * 360deg), rgba(255,255,255,.1) 0); }
/* 숫자는 ::before 위로 */
.ox-hud-timer { z-index: 0; }
.ox-hud-timer::before { z-index: -1; }

/* ===== 질문 카드 ===== */
.ox-question-card {
  position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(160deg, #1d2a4a, #121a2e 70%);
  box-shadow: 0 14px 38px rgba(0,0,0,.5);
  animation: oxv2-qin .5s cubic-bezier(.2,1.2,.4,1) both;
}
.ox-question-card::before { content: "Q"; position: absolute; right: 10px; top: -22px; font-size: 120px; font-weight: 900; color: rgba(255,255,255,.045); line-height: 1; pointer-events: none; }
.ox-question-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--ox-o), var(--ox-info) 50%, var(--ox-x)); }
@keyframes oxv2-qin { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.ox-question-cat { background: rgba(156,108,255,.18); border: 1px solid rgba(156,108,255,.4); }
.ox-question-text { text-shadow: 0 2px 10px rgba(0,0,0,.4); }

/* ===== 내 답 ⭕❌ 큰 버튼 ===== */
.ox-my-buttons { gap: 12px; }
.ox-my-btn {
  position: relative; overflow: hidden; border-radius: 20px; font-size: 56px; min-height: 104px;
  transition: transform .15s cubic-bezier(.2,1.5,.4,1), box-shadow .2s, filter .2s;
  border-width: 2px;
}
.ox-my-btn.o { background: linear-gradient(160deg, rgba(34,197,94,.22), rgba(34,197,94,.06)); border-color: rgba(74,222,128,.45); }
.ox-my-btn.x { background: linear-gradient(160deg, rgba(239,68,68,.22), rgba(239,68,68,.06)); border-color: rgba(248,113,113,.45); }
.ox-my-btn:hover:not(:disabled) { transform: translateY(-4px) scale(1.03); }
.ox-my-btn:active:not(:disabled) { transform: scale(.96); }
.ox-my-btn.o.selected { background: linear-gradient(160deg, #22c55e, #15803d); box-shadow: 0 0 0 3px rgba(74,222,128,.35), 0 14px 34px rgba(34,197,94,.45); transform: scale(1.04); }
.ox-my-btn.x.selected { background: linear-gradient(160deg, #ef4444, #b91c1c); box-shadow: 0 0 0 3px rgba(248,113,113,.35), 0 14px 34px rgba(239,68,68,.45); transform: scale(1.04); }
.ox-my-btn.selected::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 120%, rgba(255,255,255,.28), transparent 60%); animation: oxv2-sheen 1.8s ease-in-out infinite; }
@keyframes oxv2-sheen { 0%,100% { opacity: .4; } 50% { opacity: 1; } }

/* ===== 예측 ===== */
.ox-predict-section, .ox-my-section { background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.07); border-radius: 16px; padding: 12px; }
.ox-predict-row { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; transition: border-color .2s, background .2s; }
.ox-predict-row:hover { border-color: rgba(156,108,255,.4); }
.ox-predict-btn { transition: transform .12s, background .2s; }
.ox-predict-btn:active { transform: scale(.92); }
.ox-submit-btn { background: linear-gradient(135deg, #a855f7, #ec4899); border: 0; box-shadow: 0 8px 22px rgba(168,85,247,.4); }
.ox-submit-btn:disabled { background: #2a3447; box-shadow: none; }
.ox-submit-btn:not(:disabled) { animation: oxv2-pulse 1.6s ease-in-out infinite; }
@keyframes oxv2-pulse { 0%,100% { box-shadow: 0 8px 22px rgba(168,85,247,.4); } 50% { box-shadow: 0 8px 30px rgba(236,72,153,.7); } }

/* ===== 결과 ===== */
.ox-result-card { animation: oxv2-qin .45s cubic-bezier(.2,1.2,.4,1) both; }
.ox-ratio-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; margin: 10px 0 4px; background: rgba(248,113,113,.9); box-shadow: inset 0 2px 5px rgba(0,0,0,.4); }
.ox-ratio-bar i { display: block; height: 100%; }
.ox-ratio-bar i.o { background: linear-gradient(90deg, #16a34a, #4ade80); transform-origin: left; animation: oxv2-grow .9s .25s cubic-bezier(.2,.9,.3,1) both; }
.ox-ratio-bar i.x { display: none; }
@keyframes oxv2-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ox-result-count { border-radius: 16px; }
.ox-result-count.o { background: linear-gradient(160deg, rgba(34,197,94,.2), rgba(34,197,94,.04)); border-color: rgba(74,222,128,.4); }
.ox-result-count.x { background: linear-gradient(160deg, rgba(239,68,68,.2), rgba(239,68,68,.04)); border-color: rgba(248,113,113,.4); }
.ox-result-count-emoji { animation: oxv2-count .6s .3s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes oxv2-count { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.ox-result-highlight-line { animation: oxv2-slide .45s both; }
.ox-result-highlight-line:nth-child(2) { animation-delay: .12s; }
.ox-result-highlight-line:nth-child(3) { animation-delay: .24s; }
@keyframes oxv2-slide { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.ox-result-box { animation: oxv2-pop .4s cubic-bezier(.2,1.3,.4,1) both; }
.ox-result-grid > .ox-result-box:nth-child(2) { animation-delay: .06s; }
.ox-result-grid > .ox-result-box:nth-child(3) { animation-delay: .12s; }
.ox-result-grid > .ox-result-box:nth-child(4) { animation-delay: .18s; }
.ox-result-grid > .ox-result-box:nth-child(5) { animation-delay: .24s; }
.ox-result-grid > .ox-result-box:nth-child(n+6) { animation-delay: .3s; }
.ox-result-box.me { border-color: rgba(156,108,255,.7); box-shadow: 0 0 0 1px rgba(156,108,255,.4), 0 12px 32px rgba(156,108,255,.2); }
.ox-result-box.surprise { border-color: rgba(250,204,21,.6); box-shadow: 0 0 0 1px rgba(250,204,21,.35), 0 12px 32px rgba(250,204,21,.15); }
.ox-result-box-score { background: linear-gradient(135deg, #facc15, #fb923c); color: #2a1a00; border-radius: 999px; padding: 2px 10px; font-weight: 900; box-shadow: 0 3px 10px rgba(250,204,21,.4); animation: oxv2-count .5s .5s cubic-bezier(.2,1.8,.4,1) both; }
.ox-result-box-myans { font-size: 44px; }
.ox-result-next-btn { background: linear-gradient(135deg, #22c55e, #3b82f6); border: 0; box-shadow: 0 8px 22px rgba(59,130,246,.35); }
.ox-result-next-btn.last { background: linear-gradient(135deg, #facc15, #fb923c); color: #2a1a00; }

/* ===== 최종 순위 ===== */
.ox-end-title { background: linear-gradient(90deg, #facc15, #fb923c, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 30px; }
.ox-rank-card { background: linear-gradient(160deg, rgba(30,42,68,.9), rgba(16,24,40,.95)); border: 1px solid rgba(255,255,255,.09); animation: oxv2-slide .5s both; }
.ox-rank-card.r2 { animation-delay: .1s; }
.ox-rank-card.r3 { animation-delay: .2s; }
.ox-rank-card.r4, .ox-rank-card.r5, .ox-rank-card.r6, .ox-rank-card.r7, .ox-rank-card.r8 { animation-delay: .3s; }
.ox-rank-card.first { background: linear-gradient(135deg, rgba(250,204,21,.22), rgba(251,146,60,.1) 60%, rgba(16,24,40,.95)); border-color: rgba(250,204,21,.6); box-shadow: 0 0 0 1px rgba(250,204,21,.3), 0 14px 38px rgba(250,204,21,.22); position: relative; overflow: hidden; }
.ox-rank-card.first::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent); animation: oxv2-shine 3s 1s ease-in-out infinite; }
@keyframes oxv2-shine { 0% { left: -80px; } 60%,100% { left: 110%; } }
.ox-rank-num { font-size: 26px; }
.ox-rank-card.first .ox-rank-score { color: #facc15; font-size: 22px; text-shadow: 0 0 14px rgba(250,204,21,.55); }

.ox-toast { backdrop-filter: blur(8px); }

@media (max-width: 480px) {
  .ox-my-btn { font-size: 46px; min-height: 88px; }
  .ox-hud-timer { width: 50px; height: 50px; min-width: 50px; font-size: 19px; }
  .ox-end-title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .ox-entry-emoji, .ox-submit-btn:not(:disabled), .ox-rank-card.first::after, .ox-my-btn.selected::after { animation: none !important; }
  .ox-roster-card, .ox-question-card, .ox-result-box, .ox-result-card, .ox-rank-card { animation: none !important; }
}

/* 순위 아바타 중앙정렬 + 메달 줄어듦 방지 */
.ox-rank-avatar, .ox-result-box-avatar, .ox-predict-avatar, .ox-avatar { display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; }
.ox-rank-num { flex-shrink: 0; }
.ox-rank-card { gap: 10px; }
