/* 
   Basic Land Game — Styles
   Modern Dark Glassmorphic Theme
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  --panel-bg: rgba(30, 41, 59, 0.7);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-purple: #818cf8;
  --accent-green: #34d399;
  --accent-red: #f87171;
  --accent-yellow: #fbbf24;
  --accent-blue: #60a5fa;
  --shadow-main: 0 10px 30px rgba(0, 0, 0, 0.5);
  --glass-glow: 0 0 20px rgba(129, 140, 248, 0.15);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Glassmorphism Panel Base */
.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: var(--shadow-main);
}

/* ==========================================
   LOBBY SCREEN
   ========================================== */
#lobby-screen {
  width: 100%;
  max-width: 480px;
  padding: 2.5rem;
  text-align: center;
  margin: 1.5rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#lobby-screen.hidden {
  display: none;
  opacity: 0;
  transform: scale(0.95);
}

h1.title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, #a5b4fc, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(129, 140, 248, 0.2);
  letter-spacing: 1.5px;
}

p.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.input-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25);
}

.btn-primary {
  width: 100%;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Matchmaking list */
.lobby-container {
  margin-top: 1.5rem;
  text-align: left;
}

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

.lobby-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.waiting-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  list-style: none;
}

.waiting-list::-webkit-scrollbar {
  width: 6px;
}

.waiting-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.waiting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: rgba(15, 23, 42, 0.3);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.waiting-name {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.waiting-name::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
}

.empty-lobby {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  padding: 1.5rem 0;
}

/* ==========================================
   GAME SCREEN LAYOUT
   ========================================== */
#game-screen {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;

  width: 100vw;
  height: 100vh;

  margin: 0;
  padding: 0.5rem;
  gap: 0.5rem;

  align-items: stretch;
}

#game-screen.hidden {
  display: none !important;
  opacity: 0;
}

/* Canvas Area */
#game-canvas-container {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
}

/* Sidebar Area */
#game-sidebar {
  flex: 0 0 clamp(200px, 28vw, 280px);
  width: clamp(200px, 28vw, 280px);
}

@media (max-height: 500px) {
  #game-screen {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  #game-sidebar {
    width: 240px;
    padding: 0.75rem;
  }

  .event-log-container {
    min-height: 100px;
  }

  .btn-action {
    padding: 0.45rem;
    font-size: 0.8rem;
  }
}

/* Sidebar Sections */
.sidebar-section {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.85rem;
}

/* Turn Indicator Banner */
#turn-banner {
  text-align: center;
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.75rem;
  border-radius: 10px;
  margin-bottom: 0.25rem;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.turn-mine {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

.turn-opp {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}

.turn-over {
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid var(--accent-purple);
  color: var(--accent-purple);
  text-shadow: 0 0 10px rgba(129, 140, 248, 0.3);
}

/* Phase and Info Box */
.info-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
}

.info-label {
  color: var(--text-secondary);
}

.info-value {
  font-weight: 600;
}

#phase-indicator {
  color: var(--accent-yellow);
}

/* Counter Settings Panel */
.strategy-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.radio-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.radio-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--text-secondary);
  border-radius: 50%;
  outline: none;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
}

.radio-option input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--accent-purple);
}

.radio-option input[type="radio"]:checked::before {
  transform: scale(1);
}

.radio-option input[type="radio"]:checked {
  border-color: var(--accent-purple);
}

.radio-option.selected {
  background: rgba(129, 140, 248, 0.1);
  border-color: rgba(129, 140, 248, 0.2);
}

/* Action Controls Panel */
.controls-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-action {
  width: 100%;
  padding: 0.65rem;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.1s, background 0.2s;
}

.btn-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

#btn-pass-turn {
  background: var(--accent-red);
  color: #0b0f19;
}

.btn-action:active:not(:disabled) {
  transform: scale(0.98);
}

/* Event log */
.event-log-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  max-height: 240px;
}

.event-log-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.25rem;
}

.event-log-list {
  list-style: none;
  font-size: 0.75rem;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.event-log-list::-webkit-scrollbar {
  width: 4px;
}

.event-log-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.log-entry {
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.01);
  line-height: 1.3;
  word-break: break-word;
}

.log-turn {
  color: var(--accent-purple);
  font-weight: 600;
}

.log-countered {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.05);
  border-left: 2px solid var(--accent-red);
}

.log-played {
  color: var(--text-primary);
}

.log-win {
  color: var(--accent-yellow);
  font-weight: bold;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid var(--accent-yellow);
}

/* Utility to exit game */
.btn-danger-outline {
  background: transparent;
  color: var(--accent-red);
  border: 1px solid rgba(248, 113, 113, 0.3);
  padding: 0.5rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-danger-outline:hover {
  background: rgba(248, 113, 113, 0.15);
  border-color: var(--accent-red);
}

/* Toast Notifications */
.toast-msg {
  opacity: 0;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);

  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--accent-purple);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5),
              0 0 10px rgba(129, 140, 248, 0.2);

  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;

  font-size: 0.9rem;
  font-weight: 500;

  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;

  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.toast-msg.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.toast-success {
  border-color: var(--accent-green);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(52, 211, 153, 0.2);
}

.toast-error {
  border-color: var(--accent-red);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(248, 113, 113, 0.2);
}

/* ==========================================
   CARD HOVER TOOLTIP
   ========================================== */

#card-tooltip {
  position: fixed;
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.97);
  transition: opacity 0.15s ease, transform 0.15s ease;
  width: 200px;
}

#card-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tooltip-inner {
  background: rgba(10, 14, 28, 0.96);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--tooltip-accent, rgba(129, 140, 248, 0.4));
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 16px var(--tooltip-glow, rgba(129, 140, 248, 0.12));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tooltip-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tooltip-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.tooltip-name {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--tooltip-color, var(--accent-purple));
}

.tooltip-body {
  font-size: 0.78rem;
  color: rgba(248, 250, 252, 0.7);
  line-height: 1.55;
}

.tooltip-body strong {
  color: rgba(248, 250, 252, 0.95);
  font-weight: 600;
}

/* Notch / arrow pointing down toward the card */
.tooltip-inner::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid rgba(10, 14, 28, 0.96);
}

/* Per-land accent colours */
#card-tooltip[data-land="forest"]   { --tooltip-color: #34d399; --tooltip-accent: rgba(52, 211, 153, 0.4); --tooltip-glow: rgba(52, 211, 153, 0.12); }
#card-tooltip[data-land="island"]   { --tooltip-color: #60a5fa; --tooltip-accent: rgba(96, 165, 250, 0.4);  --tooltip-glow: rgba(96, 165, 250, 0.12); }
#card-tooltip[data-land="mountain"] { --tooltip-color: #f87171; --tooltip-accent: rgba(248, 113, 113, 0.4); --tooltip-glow: rgba(248, 113, 113, 0.12); }
#card-tooltip[data-land="plains"]   { --tooltip-color: #fbbf24; --tooltip-accent: rgba(251, 191, 36, 0.4);  --tooltip-glow: rgba(251, 191, 36, 0.12); }
#card-tooltip[data-land="swamp"]    { --tooltip-color: #c084fc; --tooltip-accent: rgba(192, 132, 252, 0.4); --tooltip-glow: rgba(192, 132, 252, 0.12); }

/* ==========================================
   GAME OVER OVERLAY
   ========================================== */

/* Full-screen dimmed backdrop rendered behind the panel */
#game-over-overlay {
  animation: overlayPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

#game-over-overlay::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: -1;
}

@keyframes overlayPop {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ==========================================
   RULES ACCORDION
   ========================================== */

.rules-accordion {
  margin-top: 1.5rem;
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.4);
  transition: box-shadow 0.3s ease;
}

.rules-accordion:has(#rules-body:not([hidden])) {
  box-shadow: 0 0 20px rgba(129, 140, 248, 0.1);
}

/* Toggle Button */
.rules-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.1rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.rules-toggle:hover {
  background: rgba(129, 140, 248, 0.08);
  color: var(--accent-purple);
}

.rules-toggle[aria-expanded="true"] {
  color: var(--accent-purple);
  border-bottom: 1px solid rgba(129, 140, 248, 0.2);
  background: rgba(129, 140, 248, 0.06);
}

/* Animated Chevron */
.rules-chevron {
  display: inline-block;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--accent-purple);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.rules-toggle[aria-expanded="true"] .rules-chevron {
  transform: rotate(180deg);
}

/* Accordion Body */
.rules-body {
  /* Hidden via [hidden] attr but we animate via max-height trick when shown */
  overflow: hidden;
}

.rules-body:not([hidden]) {
  animation: accordionOpen 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes accordionOpen {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rules-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Intro paragraph */
.rules-intro {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  border-left: 2px solid var(--accent-purple);
  padding-left: 0.85rem;
}

.rules-intro strong {
  color: var(--text-primary);
}

.rules-intro em {
  color: var(--accent-yellow);
  font-style: normal;
  font-weight: 600;
}

/* Land Cards Grid */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.rules-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.8rem;
  line-height: 1.4;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rules-card:hover {
  transform: translateY(-2px);
}

.rules-card .rules-emoji {
  font-size: 1.3rem;
  line-height: 1;
}

.rules-card strong {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.rules-card p {
  color: rgba(248, 250, 252, 0.65);
  font-size: 0.78rem;
}

/* Land-type color themes */
.rules-forest {
  background: rgba(52, 211, 153, 0.06);
  border-color: rgba(52, 211, 153, 0.25);
  color: var(--accent-green);
}
.rules-forest:hover {
  box-shadow: 0 4px 14px rgba(52, 211, 153, 0.15);
}

.rules-island {
  background: rgba(96, 165, 250, 0.06);
  border-color: rgba(96, 165, 250, 0.25);
  color: var(--accent-blue);
}
.rules-island:hover {
  box-shadow: 0 4px 14px rgba(96, 165, 250, 0.15);
}

.rules-mountain {
  background: rgba(248, 113, 113, 0.06);
  border-color: rgba(248, 113, 113, 0.25);
  color: var(--accent-red);
}
.rules-mountain:hover {
  box-shadow: 0 4px 14px rgba(248, 113, 113, 0.15);
}

.rules-plains {
  background: rgba(251, 191, 36, 0.06);
  border-color: rgba(251, 191, 36, 0.25);
  color: var(--accent-yellow);
}
.rules-plains:hover {
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.15);
}

.rules-swamp {
  background: rgba(168, 85, 247, 0.06);
  border-color: rgba(168, 85, 247, 0.25);
  color: #c084fc;
}
.rules-swamp:hover {
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.15);
}

/* Counter Note */
.rules-counter-note {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0.65rem 0.85rem;
  background: rgba(248, 113, 113, 0.05);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 8px;
}

.rules-counter-note strong {
  color: var(--accent-red);
}

/* Blog Link */
.rules-blog-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-purple);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color 0.2s, gap 0.2s;
  align-self: flex-start;
  opacity: 0.85;
}

.rules-blog-link:hover {
  color: #a5b4fc;
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#orientation-overlay {
  position: fixed;
  inset: 0;
  z-index: 50000;
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;

  background: rgba(5, 10, 20, 0.96);
  backdrop-filter: blur(8px);
}

.orientation-content {
  max-width: 320px;
  padding: 2rem;
}

.orientation-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

/* ==========================================
   JOIN FORM — reservation input hint
   ========================================== */

.input-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  opacity: 0.8;
}

.input-error {
  font-size: 0.8rem;
  color: var(--accent-red);
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  animation: errorShake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes errorShake {
  10%, 90%  { transform: translateX(-2px); }
  20%, 80%  { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60%  { transform: translateX(4px); }
}

/* ==========================================
   LOBBY — reservation banner & badge
   ========================================== */

.reservation-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: rgba(129, 140, 248, 0.08);
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--accent-purple);
  margin-bottom: 1rem;
}

.reservation-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.reservation-banner strong {
  color: var(--text-primary);
}

.reserved-badge {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(129, 140, 248, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: var(--accent-purple);
  vertical-align: middle;
  letter-spacing: 0.3px;
}
/* ==========================================
   MODE TABS (vs Human / vs AI)
   ========================================== */

.mode-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  padding: 0.35rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.mode-tab {
  flex: 1;
  padding: 0.6rem 1rem;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.mode-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.mode-tab.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(79, 70, 229, 0.2));
  border-color: rgba(129, 140, 248, 0.45);
  color: var(--accent-purple);
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.15);
}

/* Tab panels */
.tab-panel {
  animation: tabFadeIn 0.2s ease both;
}

.tab-panel.hidden {
  display: none;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* AI panel content */
.ai-panel {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(129, 140, 248, 0.18);
  border-radius: 12px;
  text-align: center;
}

.ai-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.ai-lands {
  font-size: 1.75rem;
  letter-spacing: 0.4rem;
  filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.3));
}

/* AI button variant — green accent */
.btn-ai {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-ai:hover {
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.45);
}

/* ==========================================
   SITE FOOTER
   ========================================== */

#site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  padding: 0.4rem 1rem;
  background: rgba(10, 14, 28, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

#site-footer a {
  color: var(--accent-purple);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.15s, color 0.15s;
}

#site-footer a:hover {
  opacity: 1;
  color: #a5b4fc;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-divider {
  opacity: 0.35;
}

/* Give the lobby panel a little bottom breathing room */
#lobby-screen {
  margin-bottom: 2.5rem;
}

/* Keep the game sidebar's exit button clear of the footer */
#game-sidebar {
  padding-bottom: 3rem;
}