/* ==========================================================================
   TOP BAR, FELT TABLE, ACTION BANNER, TURN ARROW & CENTER DECK
   ========================================================================== */

/* 1. Compact Top Bar (~40px) */
.top-bar {
  position: relative;
  z-index: 25;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
}

.gold-circle-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #4b382a, #211712);
  border: 2px solid #e6ab3d;
  box-shadow: 0 2px 0 #7a4b0b, 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 1px 2px rgba(255, 235, 160, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd66b;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.gold-circle-btn:active {
  transform: translateY(1px) scale(0.94);
}

.gold-circle-btn:hover {
  filter: brightness(1.12);
}

.match-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(20, 29, 50, 0.85);
  border: 1px solid rgba(240, 180, 58, 0.35);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.08);
  font-family: 'Fredoka', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #fef3c7;
  letter-spacing: 0.3px;
}

/* 2. Spacious Emerald Felt Table Stage */
.table-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 2px 10px 4px;
}

.felt-rail-outer {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 64px;
  background: linear-gradient(180deg, #435174 0%, #2c3652 55%, #232b42 100%);
  padding: 8px;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.16),
    inset 0 -5px 9px rgba(0, 0, 0, 0.45),
    0 10px 24px rgba(0, 0, 0, 0.55);
  display: flex;
}

.felt-rail-inner {
  position: relative;
  flex: 1;
  border-radius: 56px;
  background: linear-gradient(180deg, #1b2337 0%, #232d46 100%);
  padding: 6px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.65);
  display: flex;
}

.felt-surface {
  position: relative;
  flex: 1;
  border-radius: 50px;
  background: radial-gradient(ellipse at 50% 48%, #216152 0%, #16493e 58%, #0f352c 100%);
  box-shadow:
    inset 0 0 32px rgba(0, 0, 0, 0.45),
    inset 0 2px 4px rgba(130, 255, 220, 0.1);
  overflow: hidden;
}

.felt-surface::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 38px;
  border: 1px solid rgba(255, 232, 160, 0.09);
  pointer-events: none;
}

/* 3. Rock-Solid Stationary Action & Phase Info Banner (Zero Horizontal Shift) */
#action-info-banner {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 248px;
  min-height: 42px;
  box-sizing: border-box;
  z-index: 24;
  border-radius: 12px;
  background: rgba(11, 17, 30, 0.92);
  border: 1.5px solid rgba(240, 180, 58, 0.48);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.48), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  padding: 4px 8px 4px 7px;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

#action-info-banner.visible {
  opacity: 1;
}

#action-info-banner.tone-income { border-color: #eab308; }
#action-info-banner.tone-aid { border-color: #22c55e; }
#action-info-banner.tone-tax { border-color: #3b82f6; }
#action-info-banner.tone-steal { border-color: #ef4444; }
#action-info-banner.tone-assassinate { border-color: #10b981; }
#action-info-banner.tone-exchange { border-color: #a855f7; }
#action-info-banner.tone-raid { border-color: #f97316; }
#action-info-banner.tone-block { border-color: #38bdf8; }
#action-info-banner.tone-challenge { border-color: #fb7185; }
#action-info-banner.tone-neutral { border-color: rgba(240, 180, 58, 0.4); }

.banner-icon-slot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.banner-text-slot {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.banner-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.banner-phase-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #fde68a;
  font-family: 'Fredoka', sans-serif;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.banner-line-main {
  font-family: 'Fredoka', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.banner-line-sub {
  font-size: 10px;
  font-weight: 800;
  color: #cbd5e1;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Curved Glowing Turn Indicator Arrow */
#turn-arrow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9;
  overflow: visible;
}

.turn-arrow-glow {
  fill: none;
  stroke: #4ade80;
  stroke-width: 8;
  stroke-linecap: round;
  opacity: 0.24;
  filter: blur(2px);
}

.turn-arrow-path {
  fill: none;
  stroke: url(#arrowGrad);
  stroke-width: 3.6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(105, 255, 165, 0.75));
}

.turn-origin-dot {
  fill: #86efac;
  opacity: 0.55;
  filter: drop-shadow(0 0 4px rgba(134, 239, 172, 0.8));
}

.turn-tip-orb {
  fill: rgba(134, 239, 172, 0.38);
  filter: blur(1.5px);
}

.turn-tip-head {
  fill: #ffffff;
  stroke: #4ade80;
  stroke-width: 1;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(134, 239, 172, 0.95));
}

.turn-arrow-settled {
  animation: arrowBreathe 2.6s ease-in-out infinite;
}

@keyframes arrowBreathe {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 0.42; }
}

/* Compact Center Deck (~38x54px) & Small Gold Coin Pile */
.center-hub {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 8;
  pointer-events: none;
}

.deck-stack {
  position: relative;
  width: 38px;
  height: 54px;
}

.deck-stack.shuffling {
  animation: deckShuffle 0.95s ease-in-out;
}

@keyframes deckShuffle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-5deg) scale(1.04); }
  55% { transform: rotate(5deg) scale(1.04); }
  80% { transform: rotate(-2deg) scale(1.01); }
}

.deck-layer {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  background: linear-gradient(155deg, #c22869 0%, #801342 100%);
  border: 1.8px solid #f0b949;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.42);
}

.deck-top {
  position: absolute;
  inset: 0;
  border-radius: 7px;
  background: linear-gradient(155deg, #c9286d 0%, #891547 100%);
  border: 1.8px solid #f5c156;
  box-shadow: inset 0 0 0 1.5px rgba(255, 220, 130, 0.25), 0 3px 8px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.deck-count-pill {
  margin-top: 6px;
  min-width: 24px;
  padding: 0 6px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 999px;
  background: rgba(11, 17, 30, 0.65);
  border: 1px solid rgba(240, 180, 58, 0.4);
  font-family: 'Fredoka', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #fef3c7;
}

.coin-pile-wrap {
  margin-top: 6px;
  width: 48px;
  height: 24px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.45));
}

/* Center Room Code & Copy Invite Card (Replaces deck/coins before match starts) */
.lobby-center-card {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(172px, calc(100% - 176px));
  min-width: 148px;
  padding: 9px 10px;
  border-radius: 16px;
  background: rgba(11, 17, 30, 0.92);
  border: 1.5px solid rgba(240, 180, 58, 0.65);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.58), 0 0 22px rgba(250, 204, 21, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  z-index: 22;
}

.lobby-center-card.hidden {
  display: none;
}

.lobby-center-label {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #94a3b8;
}

.lobby-center-code {
  font-family: 'Fredoka', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: #fde047;
  line-height: 1.05;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-center-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  margin-top: 2px;
}

.lobby-copy-btn {
  width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  font-family: 'Fredoka', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: filter 0.12s ease, transform 0.1s ease;
}

.lobby-copy-btn:active {
  transform: scale(0.95);
}

.lobby-copy-code {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(240, 180, 58, 0.5);
  color: #fef3c7;
}

.lobby-copy-link {
  background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
  border: 1px solid #bae6fd;
  color: #ffffff;
}

/* Quick Play Center Countdown Card */
.quickplay-countdown-num {
  font-family: 'Fredoka', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #fde047;
  line-height: 1.05;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.quickplay-bar-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.3);
  overflow: hidden;
  margin: 2px 0;
}

.quickplay-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #fde047);
  transition: width 0.15s linear;
}

.quickplay-bar-done {
  background: linear-gradient(90deg, #4ade80, #22c55e);
}

.quickplay-status-text {
  font-size: 10px;
  font-weight: 800;
  color: #cbd5e1;
  line-height: 1.25;
}
