/* ================================================================== */
/*  FuryBee Arcade — Retro Arcade Theme                               */
/* ================================================================== */

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  background: #0a0e1a;
  color: #e0e0e0;
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Subtle grid background */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(0,255,245,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,245,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.05) 2px,
    rgba(0,0,0,0.05) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ---- Neon Utility Classes ---- */
.neon-cyan {
  color: #00fff5;
  text-shadow: 0 0 7px #00fff5, 0 0 20px #00fff5, 0 0 40px #00b3b3;
}

.neon-pink {
  color: #ff00ff;
  text-shadow: 0 0 7px #ff00ff, 0 0 20px #ff00ff, 0 0 40px #b300b3;
}

.neon-yellow {
  color: #ffe600;
  text-shadow: 0 0 7px #ffe600, 0 0 20px #ffe600, 0 0 40px #b3a100;
}

/* ---- Layout ---- */
.container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

/* ---- Arcade Title ---- */
.arcade-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #00fff5;
  text-shadow:
    0 0 10px #00fff5,
    0 0 30px #00fff5,
    0 0 60px #00b3b3,
    0 0 100px #007a7a;
  margin-bottom: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.arcade-subtitle {
  text-align: center;
  color: #ff00ff;
  text-shadow: 0 0 10px #ff00ff;
  font-size: 0.9rem;
  margin-bottom: 40px;
  letter-spacing: 2px;
}

/* ---- Navigation ---- */
.nav-back {
  display: inline-block;
  color: #00fff5;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 20px;
  padding: 6px 12px;
  border: 1px solid #00fff5;
  border-radius: 4px;
  transition: all 0.3s;
}

.nav-back:hover {
  background: rgba(0,255,245,0.1);
  box-shadow: 0 0 10px rgba(0,255,245,0.3);
}

/* ---- Game Cards (Landing Page) ---- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.game-card {
  background: rgba(15, 20, 40, 0.9);
  border: 1px solid rgba(0,255,245,0.2);
  border-radius: 12px;
  padding: 28px 24px;
  text-decoration: none;
  color: #e0e0e0;
  transition: all 0.3s;
  display: block;
}

.game-card:hover {
  border-color: #00fff5;
  box-shadow: 0 0 20px rgba(0,255,245,0.2), 0 0 40px rgba(0,255,245,0.1);
  transform: translateY(-3px);
}

.game-card-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.game-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #00fff5;
  text-shadow: 0 0 7px rgba(0,255,245,0.5);
  margin-bottom: 8px;
}

.game-card-desc {
  font-size: 0.8rem;
  color: #8890a0;
  line-height: 1.5;
}

/* ---- Room UI ---- */
.room-ui {
  background: rgba(15, 20, 40, 0.95);
  border: 1px solid rgba(255,0,255,0.3);
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  margin: 0 auto 30px;
  text-align: center;
}

.room-ui h2 {
  color: #ff00ff;
  text-shadow: 0 0 10px #ff00ff;
  font-size: 1.2rem;
  margin-bottom: 20px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.room-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 24px;
  border: 2px solid;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
  background: transparent;
}

.btn-cyan {
  color: #00fff5;
  border-color: #00fff5;
}
.btn-cyan:hover {
  background: rgba(0,255,245,0.15);
  box-shadow: 0 0 15px rgba(0,255,245,0.4);
}

.btn-pink {
  color: #ff00ff;
  border-color: #ff00ff;
}
.btn-pink:hover {
  background: rgba(255,0,255,0.15);
  box-shadow: 0 0 15px rgba(255,0,255,0.4);
}

.btn-yellow {
  color: #ffe600;
  border-color: #ffe600;
}
.btn-yellow:hover {
  background: rgba(255,230,0,0.15);
  box-shadow: 0 0 15px rgba(255,230,0,0.4);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.room-code-display {
  font-size: 2rem;
  font-weight: 700;
  color: #ffe600;
  text-shadow: 0 0 10px #ffe600, 0 0 20px #b3a100;
  letter-spacing: 8px;
  margin: 16px 0;
}

.room-input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 10px 16px;
  background: rgba(0,0,0,0.5);
  border: 2px solid rgba(255,0,255,0.4);
  border-radius: 6px;
  color: #ffe600;
  text-align: center;
  letter-spacing: 6px;
  text-transform: uppercase;
  width: 180px;
  outline: none;
}

.room-input:focus {
  border-color: #ff00ff;
  box-shadow: 0 0 10px rgba(255,0,255,0.3);
}

.room-input::placeholder {
  color: #555;
  letter-spacing: 2px;
}

.room-status {
  font-size: 0.8rem;
  margin-top: 12px;
  min-height: 1.5em;
}

.status-waiting { color: #ffe600; }
.status-connected { color: #00ff88; }
.status-error { color: #ff4444; }
.status-disconnected { color: #ff4444; }

/* ---- Game Area ---- */
.game-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #00fff5;
  text-shadow: 0 0 10px #00fff5, 0 0 30px #00b3b3;
  margin-bottom: 8px;
  letter-spacing: 3px;
}

.game-status {
  text-align: center;
  font-size: 1rem;
  margin-bottom: 20px;
  min-height: 1.5em;
}

.game-board-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

/* ---- Boards ---- */

/* Generic grid board */
.board-grid {
  display: grid;
  gap: 4px;
  background: rgba(0,255,245,0.1);
  padding: 4px;
  border-radius: 8px;
  border: 2px solid rgba(0,255,245,0.2);
}

.board-cell {
  background: rgba(10, 14, 26, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 700;
  border-radius: 4px;
}

.board-cell:hover {
  background: rgba(0,255,245,0.08);
}

.board-cell.highlight {
  background: rgba(0,255,245,0.15);
  box-shadow: inset 0 0 10px rgba(0,255,245,0.2);
}

.board-cell.last-move {
  background: rgba(255,230,0,0.1);
}

.board-cell.selected {
  background: rgba(255,0,255,0.2);
  box-shadow: inset 0 0 15px rgba(255,0,255,0.3);
}

/* ---- Game Over Overlay ---- */
.game-over {
  text-align: center;
  margin-top: 20px;
}

.game-over-message {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ---- Score Display ---- */
.score-display {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.score-player {
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
}

.score-player.active {
  border-color: #00fff5;
  box-shadow: 0 0 10px rgba(0,255,245,0.3);
}

/* ---- Captured Pieces / Info Bar ---- */
.info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 500px;
  margin: 0 auto 16px;
  font-size: 0.8rem;
  color: #8890a0;
}

/* ---- Hidden ---- */
.hidden {
  display: none !important;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .arcade-title {
    font-size: 1.6rem;
    letter-spacing: 2px;
  }

  .container {
    padding: 12px;
  }

  .room-ui {
    padding: 20px 16px;
  }

  .games-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .game-title {
    font-size: 1.3rem;
  }

  .room-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* ---- Pulse Animation ---- */
@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.pulse {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ---- Fade In ---- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

/* ---- Footer ---- */
.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 11px;
  color: #444;
}
.footer a {
  color: #555;
  text-decoration: none;
}
.footer a:hover {
  color: #00fff5;
}

/* ---- FAQ Section ---- */
.faq-section { margin-top: 30px; border-top: 1px dashed #333; padding-top: 20px; }
.faq-section h2 { color: #ffe600; font-size: 14px; margin-bottom: 12px; }
details { background: #0d1117; border: 1px solid #222; margin-bottom: 8px; padding: 0; }
details summary { padding: 10px 14px; cursor: pointer; color: #00fff5; font-size: 13px; }
details summary:hover { background: rgba(0,255,245,0.05); }
details[open] summary { border-bottom: 1px solid #222; }
details p { padding: 10px 14px; color: #aaa; font-size: 12px; line-height: 1.6; margin: 0; }
