/* ==========================================================================
   MULTITRO LAYOUT & VIEWS STYLING
   ========================================================================== */

/* Top Navigation / Status Header */
.top-header {
  height: 52px;
  background: rgba(10, 13, 20, 0.85);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #38bdf8, #f43f5e, #eab308);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Turn Timer Center Bar */
.turn-timer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 220px;
}

.turn-status-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.turn-status-text.your-turn {
  color: #22c55e;
  animation: pulse-turn 1.5s infinite;
}

.turn-status-text.opp-turn {
  color: #94a3b8;
}

@keyframes pulse-turn {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.timer-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.timer-bar {
  height: 100%;
  width: 100%;
  background: var(--chip-blue);
  transition: width 1s linear, background-color 0.3s ease;
  border-radius: 3px;
}

.timer-bar.warning {
  background: #f59e0b;
}

.timer-bar.danger {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

.timer-countdown-text {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
}

/* Header Utilities */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   VIEW CONTAINERS
   ========================================================================== */

.view-container {
  flex: 1;
  position: relative;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.view-container.active {
  display: flex;
}

/* ==========================================================================
   LOBBY / MAIN MENU VIEW
   ========================================================================== */

.menu-view {
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.menu-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--panel-shadow);
  padding: 32px;
  max-width: 580px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  backdrop-filter: blur(12px);
}

.menu-header {
  text-align: center;
}

.menu-header h1 {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.menu-header p {
  color: var(--text-muted);
  font-size: 13px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input, .form-select {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus, .form-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.menu-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.btn-large {
  padding: 14px;
  font-size: 14px;
  border-radius: 10px;
}

/* Matchmaking Queue Banner */
.queue-status-box {
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid var(--chip-blue);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--chip-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   GAMEPLAY BOARD VIEW
   ========================================================================== */

.game-view {
  padding: 12px 20px;
  justify-content: space-between;
}

/* Opponent Top Section */
.opponent-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 8px 16px;
  backdrop-filter: blur(4px);
}

.player-info-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-name-badge {
  font-weight: 800;
  font-size: 14px;
}

.player-stat-pill {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
}

.opponent-cards-strip {
  display: flex;
  gap: -20px; /* Overlap facedown cards */
}

/* Center Battlefield / Scoring Evaluation Area */
.center-battlefield {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 140px;
}

/* Hand Live Prediction Banner */
.hand-prediction-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.hand-prediction-name {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #f8fafc;
}

.hand-prediction-calc {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
}

.calc-chips { color: var(--chip-blue); }
.calc-mult { color: var(--mult-red); }
.calc-total { color: var(--gold-coin); font-size: 16px; }

/* Score Sequence Pop-Up Announcement */
.score-toast-overlay {
  position: absolute;
  top: -20px;
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid var(--gold-coin);
  box-shadow: 0 0 24px rgba(234, 179, 8, 0.6);
  border-radius: 12px;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 100;
  pointer-events: none;
  animation: pop-toast 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes pop-toast {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Bottom Player Dock */
.player-dock {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Jokers & Consumables Row */
.modifiers-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.jokers-slot, .consumables-slot {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
}

.slot-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-right: 4px;
}

/* Player Hand Cards Strip */
.hand-cards-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 164px;
  gap: 10px;
  padding: 30px 16px 12px 16px;
  overflow-x: auto;
  overflow-y: visible;
}


/* Action Controls Toolbar */
.action-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 8px 16px;
  backdrop-filter: blur(8px);
}

.actions-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-cluster {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-weight: 800;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   SHOP VIEW
   ========================================================================== */

.shop-view {
  padding: 24px;
  align-items: center;
  justify-content: center;
}

.shop-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--panel-shadow);
  padding: 24px;
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 12px;
}

.shop-inventory-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  min-height: 160px;
  flex-wrap: wrap;
}

.shop-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--panel-border);
  padding-top: 16px;
}
