/* ==========================================================================
 * WINNING STREAK (연승게임 / 连胜游戏) — Studio Gauntlet Runway & RPS Duel
 * ========================================================================== */

.ws-arena {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Dual Streak & Momentum Header */
.ws-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--tg-radius-md);
  background: linear-gradient(145deg, rgba(16, 19, 32, 0.94), rgba(8, 10, 17, 0.98));
  border: 1px solid var(--tg-border);
  box-shadow: var(--tg-shadow-card);
}

@media (max-width: 720px) {
  .ws-scoreboard {
    grid-template-columns: 1fr;
  }
}

.ws-player-gauge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--tg-border-subtle);
}

.ws-player-gauge.is-me {
  border-color: rgba(228, 185, 91, 0.42);
  background: linear-gradient(135deg, rgba(228, 185, 91, 0.1), rgba(217, 27, 58, 0.05));
}

.ws-player-gauge.is-leading {
  box-shadow: 0 0 22px rgba(228, 185, 91, 0.2);
}

.ws-player-gauge.is-right {
  flex-direction: row-reverse;
  text-align: right;
}

.ws-p-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ws-p-name {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--tg-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-p-sub {
  font-family: var(--tg-font-mono);
  font-size: 11px;
  color: var(--tg-ink-muted);
}

.ws-streak-pair {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ws-metric-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 10px;
  border-radius: 9px;
  background: rgba(8, 10, 18, 0.85);
  border: 1px solid var(--tg-border-subtle);
  min-width: 60px;
}

.ws-metric-box.is-flame {
  border-color: rgba(255, 59, 92, 0.55);
  background: linear-gradient(180deg, rgba(217, 27, 58, 0.25), rgba(14, 10, 18, 0.9));
}

.ws-metric-box.is-best {
  border-color: rgba(228, 185, 91, 0.58);
  background: linear-gradient(180deg, rgba(228, 185, 91, 0.2), rgba(14, 12, 16, 0.9));
}

.ws-metric-val {
  font-family: var(--tg-font-mono);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--tg-gold-bright);
}

.ws-metric-box.is-flame .ws-metric-val {
  color: #ff7a93;
  text-shadow: 0 0 12px rgba(255, 46, 84, 0.65);
}

.ws-metric-lbl {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tg-ink-muted);
}

.ws-center-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

/* 9-Guest Neon Gauntlet Runway */
.ws-runway-wrap {
  padding: 14px;
  border-radius: var(--tg-radius-md);
  background: linear-gradient(180deg, rgba(16, 20, 34, 0.92), rgba(9, 11, 18, 0.96));
  border: 1px solid var(--tg-border);
  box-shadow: var(--tg-shadow-card);
}

.ws-runway-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.ws-runway-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(84px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.ws-guest-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 9px 6px;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(24, 30, 48, 0.92), rgba(12, 15, 25, 0.96));
  border: 1px solid var(--tg-border-subtle);
  text-align: center;
  transition: transform 0.18s var(--tg-ease), border-color 0.18s, box-shadow 0.18s;
}

.ws-guest-card.is-clickable {
  cursor: pointer;
}

.ws-guest-card.is-clickable:hover {
  transform: translateY(-3px);
  border-color: var(--tg-gold);
  box-shadow: 0 8px 20px rgba(228, 185, 91, 0.22);
}

.ws-guest-card.is-current {
  border-color: var(--tg-garnet-bright);
  background: linear-gradient(165deg, rgba(64, 16, 30, 0.94), rgba(16, 12, 22, 0.98));
  box-shadow: 0 0 26px rgba(255, 46, 84, 0.42), inset 0 0 18px rgba(255, 46, 84, 0.18);
  transform: translateY(-2px);
}

.ws-guest-card.is-done {
  opacity: 0.72;
}

.ws-guest-card.is-lobbied {
  border-color: var(--tg-gold-bright);
  box-shadow: 0 0 18px rgba(228, 185, 91, 0.26);
}

.ws-guest-num {
  position: absolute;
  top: 5px;
  left: 6px;
  font-family: var(--tg-font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--tg-ink-faint);
}

.ws-guest-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: radial-gradient(circle at 35% 30%, rgba(228, 185, 91, 0.26), rgba(10, 12, 20, 0.9));
  border: 1px solid var(--tg-border);
}

.ws-guest-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--tg-ink);
  line-height: 1.2;
}

.ws-arch-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.ws-arch-loyal { background: rgba(34, 197, 94, 0.16); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.4); }
.ws-arch-mercenary { background: rgba(228, 185, 91, 0.16); color: #fff0c2; border: 1px solid rgba(228, 185, 91, 0.42); }
.ws-arch-contrarian { background: rgba(217, 27, 58, 0.18); color: #ff8ba0; border: 1px solid rgba(255, 46, 84, 0.45); }
.ws-arch-patterned { background: rgba(34, 211, 238, 0.14); color: #67e8f9; border: 1px solid rgba(34, 211, 238, 0.42); }

.ws-lobby-gems {
  display: inline-flex;
  gap: 3px;
  margin-top: 2px;
}

.ws-res-row {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.ws-res-dot {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--tg-font-mono);
  font-size: 10px;
  font-weight: 800;
}

.ws-res-dot.is-win { background: rgba(34, 197, 94, 0.25); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.6); }
.ws-res-dot.is-draw { background: rgba(245, 158, 11, 0.22); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.55); }
.ws-res-dot.is-loss { background: rgba(217, 27, 58, 0.22); color: #ff8ba0; border: 1px solid rgba(255, 46, 84, 0.55); }

/* Center Duel Stage */
.ws-stage-card {
  padding: 20px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 68% 52% at 50% 0%, rgba(255, 59, 92, 0.16), transparent 62%),
    linear-gradient(165deg, rgba(18, 22, 36, 0.95), rgba(8, 10, 17, 0.99));
  border: 1.5px solid var(--tg-border-strong);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ws-guest-spotlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(10, 12, 20, 0.85);
  border: 1px solid var(--tg-border);
}

.ws-spotlight-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ws-spotlight-orb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: radial-gradient(circle at 30% 25%, rgba(255, 46, 84, 0.35), rgba(14, 17, 28, 0.95));
  border: 2px solid var(--tg-garnet-bright);
  box-shadow: 0 0 24px rgba(255, 46, 84, 0.42);
}

.ws-intel-box {
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(228, 185, 91, 0.14), rgba(34, 211, 238, 0.08));
  border: 1px solid rgba(228, 185, 91, 0.46);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--tg-gold-bright);
}

.ws-intel-box.is-none {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--tg-border-subtle);
  color: var(--tg-ink-muted);
}

/* Tactile Glowing RPS Sigil Cards */
.ws-rps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 540px) {
  .ws-rps-grid {
    gap: 9px;
  }
}

.ws-rps-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 12px;
  border-radius: 16px;
  background: linear-gradient(160deg, #1d2338 0%, #0e111d 100%);
  border: 1.5px solid var(--tg-border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.2s var(--tg-ease), border-color 0.2s, box-shadow 0.2s;
}

.ws-rps-card:hover:not(:disabled) {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--tg-gold-bright);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.65), 0 0 28px var(--tg-gold-glow);
}

.ws-rps-card.is-rock:hover:not(:disabled) { border-color: #ff4769; box-shadow: 0 16px 34px rgba(255, 46, 84, 0.4); }
.ws-rps-card.is-paper:hover:not(:disabled) { border-color: #38bdf8; box-shadow: 0 16px 34px rgba(56, 189, 248, 0.38); }
.ws-rps-card.is-scissors:hover:not(:disabled) { border-color: #f5c451; box-shadow: 0 16px 34px rgba(245, 196, 81, 0.4); }

.ws-rps-sigil {
  width: 72px;
  height: 72px;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

.ws-rps-title {
  font-family: var(--tg-font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--tg-ink);
}

.ws-rps-beats {
  font-size: 11px;
  color: var(--tg-ink-muted);
}

/* Clash Reveal Arena */
.ws-clash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 680px) {
  .ws-clash-grid {
    grid-template-columns: 1fr;
  }
}

.ws-clash-lane {
  padding: 16px;
  border-radius: 14px;
  background: rgba(10, 12, 21, 0.9);
  border: 1px solid var(--tg-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: ws-clash-in 0.35s var(--tg-ease);
}

.ws-clash-lane.is-win {
  border-color: rgba(34, 197, 94, 0.65);
  box-shadow: 0 0 26px rgba(34, 197, 94, 0.22);
}

.ws-clash-lane.is-loss {
  border-color: rgba(255, 46, 84, 0.58);
  box-shadow: 0 0 22px rgba(217, 27, 58, 0.2);
}

.ws-clash-lane.is-draw {
  border-color: rgba(245, 158, 11, 0.58);
}

@keyframes ws-clash-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.ws-clash-versus {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
}

.ws-clash-hand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.ws-spark-vs {
  font-family: var(--tg-font-display);
  font-size: 20px;
  font-weight: 900;
  color: var(--tg-gold-bright);
  text-shadow: 0 0 18px var(--tg-gold-glow);
}

/* Pre-Match Lobby Controls */
.ws-lobby-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--tg-border-subtle);
}
