/* ==========================================================================
   UnoGamesLy — Retro Pixel Art Stylesheet
   Palette: Deep Dark Green (#0A291B, #113D29), Pitch Black (#090909, #141414),
            Crisp White (#FFFFFF, #EEF2EF)
   ========================================================================== */

:root {
  --bg-dark-green: #0A291B;
  --bg-mid-green: #113D29;
  --bg-pitch-black: #090909;
  --bg-panel-black: #141414;
  --text-white: #FFFFFF;
  --text-soft: #EEF2EF;
  --text-muted: #9DB8AA;

  /* Pixel UNO Card Colors */
  --uno-red: #E63946;
  --uno-blue: #2A6F97;
  --uno-green: #2D936C;
  --uno-yellow: #F4A261;

  --font-pixel: 'Press Start 2P', monospace;
  --font-body: 'VT323', monospace;

  --header-h: 58px;
  --footer-h: 34px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  background-color: var(--bg-dark-green);
  /* Subtle Dark-Green & Pitch-Black Pixel Checkerboard Pattern */
  background-image:
    linear-gradient(45deg, var(--bg-pitch-black) 25%, transparent 25%),
    linear-gradient(-45deg, var(--bg-pitch-black) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--bg-pitch-black) 75%),
    linear-gradient(-45deg, transparent 75%, var(--bg-pitch-black) 75%);
  background-size: 32px 32px;
  background-position: 0 0, 0 16px, 16px -16px, -16px 0;
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.3;
  user-select: none;
}

body {
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h);
}

button, input {
  font-family: inherit;
  color: inherit;
  outline: none;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   TOP NAVIGATION BAR
   ========================================================================== */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--bg-pitch-black);
  border-bottom: 4px solid var(--text-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 900;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 4px 0;
}

.logo-card-icon {
  display: inline-flex;
  width: 24px;
  height: 34px;
}

.logo-card-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.logo-text {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--text-white);
  text-shadow: 2px 2px 0 var(--bg-mid-green);
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-pixel-btn {
  background: var(--bg-mid-green);
  border: 3px solid var(--text-white);
  box-shadow: 3px 3px 0 var(--bg-pitch-black);
  padding: 6px 10px;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-white);
  transition: transform 0.06s steps(1);
}

.icon-pixel-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--bg-pitch-black);
}

/* Long 3-Line Hamburger Button */
.hamburger-btn {
  width: 44px;
  height: 38px;
  background: var(--bg-panel-black);
  border: 3px solid var(--text-white);
  padding: 7px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  transition: background 0.1s steps(1), transform 0.06s steps(1);
}

.hamburger-btn:hover {
  background: var(--bg-mid-green);
}

.hamburger-btn:active {
  transform: translate(2px, 2px);
}

.ham-line {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text-white);
}

/* ==========================================================================
   MAIN VIEWPORT & LOBBY
   ========================================================================== */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 14px;
}

.lobby-view {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lobby-card {
  width: 100%;
  max-width: 580px;
  background: var(--bg-panel-black);
  border: 4px solid var(--text-white);
  box-shadow: 8px 8px 0 var(--bg-pitch-black);
  padding: 20px 18px;
}

.lobby-banner {
  text-align: center;
  border-bottom: 3px dashed var(--bg-mid-green);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.pixel-badge {
  display: inline-block;
  background: var(--bg-mid-green);
  border: 2px solid var(--text-white);
  padding: 4px 10px;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.lobby-title {
  font-family: var(--font-pixel);
  font-size: clamp(20px, 5vw, 28px);
  color: var(--text-white);
  text-shadow: 4px 4px 0 var(--bg-mid-green);
  margin-bottom: 8px;
}

.lobby-subtitle {
  font-size: 20px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* Mode Tabs */
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.mode-tab {
  background: var(--bg-pitch-black);
  border: 3px solid var(--text-muted);
  padding: 11px 8px;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--text-muted);
}

.mode-tab.active {
  background: var(--bg-mid-green);
  border-color: var(--text-white);
  color: var(--text-white);
  box-shadow: 4px 4px 0 var(--bg-pitch-black);
}

.panel-block {
  margin-bottom: 16px;
}

.pixel-label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.diff-btn {
  background: var(--bg-pitch-black);
  border: 3px solid var(--text-muted);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: transform 0.06s steps(1);
}

.diff-btn.active {
  background: var(--bg-dark-green);
  border-color: var(--text-white);
  box-shadow: 3px 3px 0 var(--text-white);
}

.diff-name {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--text-white);
}

.diff-desc {
  font-size: 16px;
  color: var(--text-muted);
}

.player-preview-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-pitch-black);
  border: 2px solid var(--bg-mid-green);
  padding: 8px 12px;
  margin-bottom: 16px;
  font-size: 19px;
}

.player-preview-strip strong {
  color: var(--uno-yellow);
  font-weight: normal;
}

/* Primary & Mini Pixel Buttons */
.primary-pixel-btn {
  width: 100%;
  background: var(--bg-mid-green);
  border: 4px solid var(--text-white);
  box-shadow: 5px 5px 0 var(--bg-pitch-black);
  padding: 14px 12px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--text-white);
  text-align: center;
  transition: transform 0.06s steps(1), background 0.1s steps(1);
}

.primary-pixel-btn:hover {
  background: #175237;
}

.primary-pixel-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--bg-pitch-black);
}

.primary-pixel-btn.small-btn {
  padding: 10px 10px;
  font-size: 10px;
  border-width: 3px;
  box-shadow: 3px 3px 0 var(--bg-pitch-black);
}

.mini-pixel-btn {
  background: var(--bg-pitch-black);
  border: 3px solid var(--text-white);
  box-shadow: 3px 3px 0 var(--bg-pitch-black);
  padding: 7px 10px;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-white);
  white-space: nowrap;
}

.mini-pixel-btn:hover:not(:disabled) {
  background: var(--bg-mid-green);
}

.mini-pixel-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mini-pixel-btn.danger-btn {
  border-color: var(--uno-red);
  color: var(--uno-red);
  margin-top: 14px;
}

/* Multiplayer Panel */
.multi-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.multi-box {
  background: var(--bg-pitch-black);
  border: 3px solid var(--bg-mid-green);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.box-title {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--text-white);
}

.box-desc {
  font-size: 17px;
  color: var(--text-muted);
}

.room-id-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: var(--bg-dark-green);
  border: 3px solid var(--text-white);
  padding: 8px 10px;
}

#generatedRoomId {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--uno-yellow);
  letter-spacing: 1px;
}

.multi-btn-row {
  display: flex;
  gap: 6px;
}

.join-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pixel-input {
  width: 100%;
  background: var(--bg-dark-green);
  border: 3px solid var(--text-white);
  padding: 9px 10px;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--text-white);
  text-transform: uppercase;
}

.pixel-input::placeholder {
  color: var(--text-muted);
  font-size: 9px;
}

.status-pill {
  background: var(--bg-panel-black);
  border: 2px solid var(--bg-mid-green);
  padding: 6px 8px;
  font-size: 16px;
  color: var(--text-soft);
  word-break: break-word;
}

/* ==========================================================================
   MINIMALIST 1V1 GAMEPLAY ARENA (NO HEAVY TABLE FRAME)
   ========================================================================== */
.arena-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - var(--header-h) - var(--footer-h) - 28px);
  position: relative;
}

/* TOP: OPPONENT ZONE */
.opponent-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.opponent-card-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-pitch-black);
  border: 3px solid var(--text-white);
  box-shadow: 4px 4px 0 var(--bg-pitch-black);
  padding: 7px 12px;
}

.pixel-avatar {
  width: 34px;
  height: 34px;
  border: 2px solid var(--text-white);
  background: var(--bg-mid-green);
  flex-shrink: 0;
}

.pixel-avatar svg {
  width: 100%;
  height: 100%;
  display: block;
}

.opponent-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.opponent-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-tag {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--text-white);
}

.uno-flag {
  background: var(--uno-red);
  border: 2px solid var(--text-white);
  padding: 2px 5px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-white);
  animation: pulseBlink 0.6s steps(1) infinite;
}

.opponent-count-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.count-badge {
  display: inline-block;
  background: var(--bg-mid-green);
  border: 2px solid var(--text-white);
  padding: 2px 8px;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-white);
}

.count-badge.highlight {
  background: var(--bg-pitch-black);
  color: var(--uno-yellow);
}

.conn-badge {
  background: var(--uno-green);
  border: 2px solid var(--text-white);
  padding: 2px 6px;
  font-family: var(--font-pixel);
  font-size: 8px;
}

.opponent-mini-cards {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 24px;
}

.mini-back-pip {
  width: 16px;
  height: 22px;
  background: var(--bg-pitch-black);
  border: 2px solid var(--text-white);
  margin-left: -6px;
  box-shadow: inset 0 0 0 2px var(--bg-mid-green);
}

.mini-back-pip:first-child {
  margin-left: 0;
}

/* CENTER: PLAY ZONE */
.center-play-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  my: auto;
  padding: 8px 0;
}

.turn-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.turn-badge {
  padding: 6px 12px;
  font-family: var(--font-pixel);
  font-size: 10px;
  border: 3px solid var(--text-white);
  box-shadow: 4px 4px 0 var(--bg-pitch-black);
}

.turn-badge.your-turn {
  background: var(--bg-mid-green);
  color: var(--text-white);
}

.turn-badge.opp-turn {
  background: var(--bg-pitch-black);
  color: var(--text-muted);
  border-color: var(--text-muted);
}

.active-color-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-pitch-black);
  border: 3px solid var(--text-white);
  padding: 5px 10px;
  font-family: var(--font-pixel);
  font-size: 9px;
}

.color-swatch {
  width: 14px;
  height: 14px;
  border: 2px solid var(--text-white);
  display: inline-block;
}

.color-swatch.red { background: var(--uno-red); }
.color-swatch.blue { background: var(--uno-blue); }
.color-swatch.green { background: var(--uno-green); }
.color-swatch.yellow { background: var(--uno-yellow); }

.piles-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.pile-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.draw-pile-btn {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  transition: transform 0.08s steps(1);
}

.draw-pile-btn:hover {
  transform: translateY(-4px);
}

.draw-pile-btn:active {
  transform: translateY(1px);
}

.pile-card-slot, .discard-pile-slot {
  width: 96px;
  height: 136px;
  box-shadow: 6px 6px 0 var(--bg-pitch-black);
}

.pile-card-slot svg, .discard-pile-slot svg {
  width: 100%;
  height: 100%;
  display: block;
}

.deck-count-pill {
  position: absolute;
  bottom: -8px;
  right: -8px;
  background: var(--bg-pitch-black);
  border: 2px solid var(--text-white);
  padding: 2px 6px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--uno-yellow);
}

.pile-caption {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-soft);
  text-shadow: 2px 2px 0 var(--bg-pitch-black);
}

.arena-toast {
  background: var(--bg-pitch-black);
  border: 2px solid var(--bg-mid-green);
  padding: 5px 12px;
  font-size: 18px;
  color: var(--text-soft);
  text-align: center;
  max-width: 92vw;
}

/* BOTTOM: STACK-TO-PICK HAND */
.player-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 6px;
}

.stack-controls-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  width: 100%;
  z-index: 20;
}

.quit-btn {
  margin-bottom: 18px;
}

.player-stack-btn {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px;
  transition: transform 0.08s steps(1);
}

.player-stack-btn:hover {
  transform: translateY(-4px);
}

.stack-layers {
  position: relative;
  width: 96px;
  height: 136px;
}

.stack-shadow {
  position: absolute;
  inset: 0;
  background: var(--bg-pitch-black);
  border: 3px solid var(--text-white);
}

.stack-shadow.layer-2 {
  transform: translate(-8px, -6px);
  background: var(--bg-mid-green);
}

.stack-shadow.layer-1 {
  transform: translate(-4px, -3px);
  background: var(--bg-pitch-black);
}

.stack-top-card {
  position: relative;
  width: 96px;
  height: 136px;
  box-shadow: 5px 5px 0 var(--bg-pitch-black);
  z-index: 2;
}

.stack-top-card svg {
  width: 100%;
  height: 100%;
  display: block;
}

.stack-top-card.has-playable {
  outline: 3px solid var(--text-white);
  outline-offset: 2px;
}

.stack-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tap-hint {
  background: var(--bg-pitch-black);
  border: 2px solid var(--text-white);
  padding: 2px 6px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-white);
}

/* UNO! Callout Button */
.uno-call-btn {
  margin-bottom: 18px;
  background: var(--uno-red);
  border: 4px solid var(--text-white);
  box-shadow: 4px 4px 0 var(--bg-pitch-black);
  padding: 12px 14px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--text-white);
  animation: pulseBlink 0.55s steps(1) infinite;
}

.uno-call-btn.called {
  background: var(--uno-green);
  animation: none;
}

@keyframes pulseBlink {
  0%, 49% { transform: scale(1); }
  50%, 100% { transform: scale(1.06); }
}

/* Expanded Card Selector Panel */
.hand-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 9, 0.72);
  z-index: 600;
}

.expanded-hand-panel {
  position: fixed;
  left: 50%;
  bottom: calc(var(--footer-h) + 10px);
  transform: translateX(-50%);
  width: min(94vw, 760px);
  max-height: 62vh;
  background: var(--bg-panel-black);
  border: 4px solid var(--text-white);
  box-shadow: 8px 8px 0 var(--bg-pitch-black);
  padding: 12px;
  z-index: 650;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.expanded-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--bg-mid-green);
  padding-bottom: 8px;
}

.expanded-title {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--uno-yellow);
}

.expanded-cards-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  overflow-y: auto;
  padding: 8px 4px;
}

.hand-card-item {
  width: 84px;
  height: 119px;
  background: transparent;
  border: 3px solid transparent;
  padding: 0;
  position: relative;
  transition: transform 0.08s steps(1);
}

.hand-card-item svg {
  width: 100%;
  height: 100%;
  display: block;
}

.hand-card-item.playable {
  border-color: var(--text-white);
  box-shadow: 0 0 0 2px var(--bg-pitch-black), 4px 4px 0 var(--text-white);
  transform: translateY(-4px);
}

.hand-card-item.playable:hover {
  transform: translateY(-9px);
}

.hand-card-item.unplayable {
  opacity: 0.48;
  cursor: not-allowed;
}

/* ==========================================================================
   MODALS (COLOR PICKER & VICTORY/DEFEAT)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 9, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1100;
}

.pixel-modal {
  width: 100%;
  max-width: 420px;
  background: var(--bg-panel-black);
  border: 4px solid var(--text-white);
  box-shadow: 8px 8px 0 var(--bg-pitch-black);
  padding: 20px 18px;
  text-align: center;
}

.modal-title {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--text-white);
  margin-bottom: 8px;
}

.modal-title.large {
  font-size: 18px;
  color: var(--uno-yellow);
  margin-top: 6px;
}

.modal-sub {
  font-size: 19px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.color-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.color-choice-btn {
  border: 3px solid var(--text-white);
  box-shadow: 4px 4px 0 var(--bg-pitch-black);
  padding: 14px 8px;
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--text-white);
  text-shadow: 2px 2px 0 var(--bg-pitch-black);
}

.color-choice-btn.c-red { background: var(--uno-red); }
.color-choice-btn.c-blue { background: var(--uno-blue); }
.color-choice-btn.c-green { background: var(--uno-green); }
.color-choice-btn.c-yellow { background: var(--uno-yellow); }

.color-choice-btn:active {
  transform: translate(2px, 2px);
}

.result-stats-box {
  background: var(--bg-pitch-black);
  border: 3px solid var(--bg-mid-green);
  padding: 10px 12px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.res-row {
  display: flex;
  justify-content: space-between;
  font-size: 19px;
}

.res-row strong {
  color: var(--uno-yellow);
  font-weight: normal;
}

.modal-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ==========================================================================
   SLIDE-OVER HAMBURGER DRAWER
   ========================================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 9, 0.78);
  z-index: 950;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(92vw, 440px);
  background: var(--bg-panel-black);
  border-left: 4px solid var(--text-white);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.16s steps(4);
}

.nav-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  height: var(--header-h);
  background: var(--bg-pitch-black);
  border-bottom: 4px solid var(--text-white);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-brand {
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--uno-yellow);
}

.drawer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--bg-pitch-black);
  border-bottom: 3px solid var(--bg-mid-green);
  padding: 8px;
}

.drawer-tab-btn {
  background: var(--bg-panel-black);
  border: 2px solid var(--text-muted);
  padding: 6px 8px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-muted);
}

.drawer-tab-btn.active {
  background: var(--bg-mid-green);
  border-color: var(--text-white);
  color: var(--text-white);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.sec-heading {
  font-family: var(--font-pixel);
  font-size: 11px;
  color: var(--uno-yellow);
  margin-bottom: 10px;
}

.sec-desc {
  font-size: 19px;
  color: var(--text-soft);
  margin-bottom: 12px;
}

.pixel-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.pixel-list li {
  background: var(--bg-pitch-black);
  border-left: 4px solid var(--bg-mid-green);
  padding: 7px 10px;
  font-size: 18px;
}

.pixel-list strong {
  color: var(--text-white);
}

.special-cards-guide {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-pitch-black);
  border: 2px solid var(--bg-mid-green);
  padding: 8px;
}

.guide-card-mini {
  width: 48px;
  height: 68px;
  flex-shrink: 0;
}

.guide-card-mini svg {
  width: 100%;
  height: 100%;
  display: block;
}

.guide-item strong {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-white);
  display: block;
  margin-bottom: 4px;
}

.guide-item p {
  font-size: 17px;
  color: var(--text-muted);
}

/* Gallery */
.gallery-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.gal-filter {
  background: var(--bg-pitch-black);
  border: 2px solid var(--text-muted);
  padding: 5px 8px;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-muted);
}

.gal-filter.active {
  background: var(--bg-mid-green);
  border-color: var(--text-white);
  color: var(--text-white);
}

.card-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery-card-cell {
  background: var(--bg-pitch-black);
  border: 2px solid var(--bg-mid-green);
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.gallery-card-cell svg {
  width: 64px;
  height: 90px;
  display: block;
}

.gallery-card-cell span {
  font-family: var(--font-pixel);
  font-size: 7px;
  color: var(--text-soft);
  text-align: center;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat-card {
  background: var(--bg-pitch-black);
  border: 3px solid var(--text-white);
  padding: 12px 8px;
  text-align: center;
}

.stat-val {
  display: block;
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--uno-yellow);
  margin-bottom: 6px;
}

.stat-lbl {
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--text-soft);
}

/* Settings */
.setting-group {
  margin-bottom: 18px;
}

.nickname-row {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   FIXED PIXEL FOOTER
   ========================================================================== */
.pixel-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-h);
  background: var(--bg-pitch-black);
  border-top: 3px solid var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--text-soft);
  z-index: 850;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (MOBILE PORTRAIT & LANDSCAPE)
   ========================================================================== */
@media (max-width: 600px) {
  .multi-columns {
    grid-template-columns: 1fr;
  }

  .pile-card-slot, .discard-pile-slot,
  .stack-layers, .stack-top-card {
    width: 82px;
    height: 116px;
  }

  .piles-row {
    gap: 20px;
  }

  .stack-controls-row {
    gap: 10px;
  }

  .hand-card-item {
    width: 74px;
    height: 105px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .arena-view {
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 4px 10px;
  }

  .pile-card-slot, .discard-pile-slot,
  .stack-layers, .stack-top-card {
    width: 72px;
    height: 102px;
  }

  .opponent-mini-cards {
    display: none;
  }
}
