/* BRUTALIST RAW RETRO ARCADE STYLES */

.arcade-body {
  background-color: #0d0f12;
  color: #d1d5db;
  font-family: 'Fira Code', monospace;
  overflow-x: hidden;
}

.scanlines {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 99;
  opacity: 0.6;
}

.raw-arcade {
  max-width: 1020px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* Header */
.raw-header {
  border: 2px solid #2a2e39;
  background: #14171f;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  box-shadow: 4px 4px 0px #000;
}

.raw-back {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}
.raw-back:hover {
  text-decoration: underline;
}

.raw-title-block {
  text-align: center;
}

.raw-badge {
  font-size: 0.65rem;
  color: #f59e0b;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 0.2rem;
}

.raw-logo {
  font-size: 1.3rem;
  font-weight: 900;
  color: #f3f4f6;
  letter-spacing: -0.5px;
}

.raw-status {
  font-size: 0.75rem;
  color: #ef4444;
  font-weight: 700;
}

/* Raw Tabs */
.raw-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.raw-tab {
  flex: 1;
  background: #181c26;
  border: 2px solid #2e3440;
  color: #94a3b8;
  padding: 0.8rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.1s;
}

.raw-tab:hover {
  background: #232838;
  color: #fff;
}

.raw-tab.active {
  background: #2e1065;
  border-color: #a855f7;
  color: #f5d0fe;
  box-shadow: 3px 3px 0px #000;
}

/* Game Frame */
.raw-game {
  border: 2px solid #2d3342;
  background: #12151c;
  padding: 1.5rem;
  box-shadow: 6px 6px 0px #000;
}
.raw-game.hidden { display: none; }

.game-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px dashed #262b37;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.raw-h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
}

.raw-sub {
  font-size: 0.8rem;
  color: #8b949e;
}

.raw-btns {
  display: flex;
  gap: 0.5rem;
}

.raw-btn {
  background: #1f2430;
  color: #f3f4f6;
  border: 2px solid #3b4252;
  padding: 0.5rem 0.9rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0px #000;
}
.raw-btn:hover {
  background: #2d3446;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px #000;
}
.raw-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #000;
}

.trigger-poker {
  background: #7c2d12;
  border-color: #f97316;
  color: #ffedd5;
}
.trigger-poker:hover {
  background: #9a3412;
}

/* Poker Banner */
.poker-banner {
  background: #2b1111;
  border: 2px solid #ef4444;
  padding: 1rem;
  margin-bottom: 1.5rem;
  animation: pokerPulse 1.5s infinite alternate;
}
.poker-banner.hidden { display: none; }

@keyframes pokerPulse {
  0% { border-color: #ef4444; }
  100% { border-color: #eab308; }
}

.poker-alert {
  font-weight: 900;
  font-size: 0.95rem;
  color: #fef08a;
  margin-bottom: 0.8rem;
  text-align: center;
}

.poker-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.poker-card {
  background: #18181b;
  border: 2px solid #eab308;
  padding: 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: all 0.15s;
  box-shadow: 3px 3px 0px #000;
}
.poker-card:hover {
  transform: translateY(-4px);
  background: #27272a;
  border-color: #38bdf8;
  box-shadow: 5px 5px 0px #000;
}

.p-card-icon { font-size: 1.8rem; }
.p-card-title { font-weight: 800; font-size: 0.85rem; color: #fff; }
.p-card-desc { font-size: 0.75rem; color: #a1a1aa; line-height: 1.4; }

/* Playfield & Board */
.raw-playfield {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
}

.board-frame {
  display: inline-block;
  background: #1e222d;
  padding: 8px;
  border: 3px solid #333a4a;
  box-shadow: 5px 5px 0px #000;
}

.col-coords {
  display: grid;
  grid-template-columns: repeat(8, 48px);
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
  margin-left: 20px;
  margin-bottom: 4px;
}

.board-row-wrapper {
  display: flex;
}

.row-coords {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  font-size: 0.75rem;
  color: #64748b;
  width: 20px;
  text-align: center;
}

.raw-board {
  display: grid;
  grid-template-columns: repeat(8, 48px);
  grid-template-rows: repeat(8, 48px);
  border: 2px solid #000;
}

.raw-cell {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: default;
}

.raw-cell.c-light {
  background-color: #4b5563;
}
.raw-cell.c-dark {
  background-color: #1f2937;
}

.raw-cell.valid-move {
  background-color: #065f46 !important;
  cursor: pointer;
}
.raw-cell.valid-move::after {
  content: '▼';
  font-size: 10px;
  color: #34d399;
}

/* Chess-Checkers pieces with smooth transition */
.r-piece {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
  box-shadow: 2px 2px 0px #000;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.r-piece.white-p {
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  color: #0f172a;
}

.r-piece.red-p {
  background: #dc2626;
  border: 2px solid #991b1b;
  color: #fff;
}

.r-piece.selected {
  outline: 3px solid #38bdf8;
  transform: scale(1.15);
}

.r-piece.is-king {
  border-width: 3px;
  border-color: #facc15;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
}

/* Sidebar */
.raw-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.terminal-box {
  background: #000;
  border: 2px solid #27272a;
  padding: 0.8rem;
  font-size: 0.8rem;
  box-shadow: 3px 3px 0px #000;
  min-height: 140px;
}

.terminal-bar {
  border-bottom: 1px dashed #3f3f46;
  padding-bottom: 0.3rem;
  margin-bottom: 0.6rem;
  color: #a1a1aa;
  font-size: 0.7rem;
}

.terminal-text {
  color: #4ade80;
  line-height: 1.5;
}

.rule-reminder {
  background: #18181b;
  border: 2px solid #3f3f46;
  padding: 0.8rem;
}

.rule-title {
  font-size: 0.7rem;
  color: #a1a1aa;
  margin-bottom: 0.2rem;
}

.rule-val {
  font-weight: 800;
  color: #eab308;
  font-size: 0.9rem;
}

/* Falling Dice */
.dice-box {
  background: #3b0764;
  border: 2px solid #c084fc;
  padding: 1rem;
  text-align: center;
  box-shadow: 4px 4px 0px #000;
  animation: diceWiggle 0.4s infinite alternate;
}
.dice-box.hidden { display: none; }

@keyframes diceWiggle {
  0% { transform: rotate(-2deg); }
  100% { transform: rotate(2deg); }
}

.dice-display {
  font-size: 3rem;
  font-weight: 900;
  margin: 0.3rem 0;
  color: #fdf4ff;
}

.dice-desc {
  font-size: 0.75rem;
  color: #e9d5ff;
}

/* Snake Arena */
.snake-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#snakeCanvas {
  background: #000;
  border: 3px solid #2a2e39;
  box-shadow: 4px 4px 0px #000;
}

.raw-score {
  font-weight: 800;
  color: #f59e0b;
}

@media (max-width: 820px) {
  .raw-playfield {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}
