/* ==========================================================================
   RUSSIAN GUN CARD - DESIGN SYSTEM & STYLESHEET (SPLIT SCREEN LAYOUT)
   Aesthetics: Cyberpunk Industrial Gothic, Neon Glow, Glassmorphism
   ========================================================================== */

/* --- Custom Variables & Tokens --- */
:root {
  --bg-darker: #060709;
  --bg-dark: #0c0e12;
  --bg-panel: #12151b;
  --border-steel: #20252f;
  --border-glow: #323d4e;
  
  /* Neon Colors */
  --neon-red: #ff3344;
  --neon-blue: #00d2ff;
  --neon-amber: #ffaa00;
  --neon-green: #00ff88;
  --neon-purple: #bd00ff;
  
  /* Text Colors */
  --text-main: #e2e8f0;
  --text-muted: #5e6d82;
  --text-dark: #0b0f19;

  /* Font Families */
  --font-hud: 'Orbitron', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --font-sans: 'Outfit', sans-serif;
}

/* --- Base & Reset --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background-color: var(--bg-darker);
  color: var(--text-main);
  font-family: var(--font-sans);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Background grid overlay */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(18, 22, 28, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 22, 28, 0.45) 1px, transparent 1px);
  background-size: 35px 35px;
  pointer-events: none;
  z-index: 0;
}

/* Ambient shadow vignette */
body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 35%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
  z-index: 1;
}

/* --- Global Utility Classes --- */
.hidden {
  display: none !important;
}

.live-color { color: var(--neon-red); text-shadow: 0 0 8px rgba(255, 51, 68, 0.6); }
.blank-color { color: var(--neon-blue); text-shadow: 0 0 8px rgba(0, 210, 255, 0.6); }
.amber-color { color: var(--neon-amber); text-shadow: 0 0 8px rgba(255, 170, 0, 0.6); }
.green-color { color: var(--neon-green); text-shadow: 0 0 8px rgba(0, 255, 136, 0.6); }
.purple-color { color: var(--neon-purple); text-shadow: 0 0 8px rgba(189, 0, 255, 0.6); }

/* --- Screen Flash Effects --- */
.flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.05s ease-out;
}
.flash.red {
  background-color: rgba(255, 51, 68, 0.7);
  animation: flash-out 0.4s ease-out forwards;
}
.flash.blue {
  background-color: rgba(0, 210, 255, 0.5);
  animation: flash-out 0.4s ease-out forwards;
}

@keyframes flash-out {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Screen shake for damage */
.shake {
  animation: screen-shake 0.35s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes screen-shake {
  10%, 90% { transform: translate3d(-1.5px, -1px, 0); }
  20%, 80% { transform: translate3d(3px, 2px, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, -3px, 0); }
  40%, 60% { transform: translate3d(4px, 3px, 0); }
}

/* --- Overlays (Start/Game Over/Peek/Steal) --- */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(3, 4, 5, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.overlay-content {
  background: linear-gradient(135deg, var(--bg-panel) 0%, var(--bg-dark) 100%);
  border: 2px solid var(--border-steel);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.85), inset 0 0 15px rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 35px;
  width: 90%;
  text-align: center;
  position: relative;
  z-index: 110;
  animation: modal-enter 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

@keyframes modal-enter {
  0% { transform: scale(0.92) translateY(15px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.start-box { border-color: var(--neon-blue); }
.end-box { border-color: var(--neon-red); }

h1.glitch {
  font-family: var(--font-hud);
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 3px;
  margin-bottom: 6px;
  position: relative;
  text-shadow: 0.05em 0 0 rgba(255,51,68,0.75), -0.025em -0.05em 0 rgba(0,210,255,0.75), 0.025em 0.05em 0 rgba(0,255,136,0.75);
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}

.game-rules-preview {
  background: rgba(5, 6, 8, 0.7);
  border: 1px dashed var(--border-steel);
  padding: 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  text-align: left;
}

.game-rules-preview h3 {
  font-family: var(--font-hud);
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--text-main);
  letter-spacing: 1px;
}

.game-rules-preview ul {
  list-style: none;
}

.game-rules-preview li {
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: #a0aec0;
  position: relative;
  padding-left: 15px;
  line-height: 1.35;
}

.game-rules-preview li::before {
  content: "•";
  color: var(--neon-blue);
  position: absolute;
  left: 4px;
  font-weight: bold;
}

.stats-summary {
  background: rgba(5, 6, 8, 0.7);
  border: 1px dashed var(--border-steel);
  padding: 12px;
  border-radius: 6px;
  margin: 15px 0 25px;
  display: flex;
  justify-content: space-around;
}

.stats-summary p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.highlight-val {
  display: block;
  font-family: var(--font-hud);
  font-size: 1.3rem;
  color: var(--text-main);
  margin-top: 4px;
}

.end-message {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: #cbd5e1;
}

/* --- Buttons --- */
.btn {
  font-family: var(--font-hud);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 25px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  outline: none;
}

.btn-primary {
  background: linear-gradient(90deg, #161a22 0%, #242c38 100%);
  color: var(--text-main);
  border: 1px solid var(--border-glow);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.35);
}

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

/* --- Main Layout Container --- */
.game-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  max-width: 1350px;
  padding: 15px;
  z-index: 2;
}

/* --- Header Section --- */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(18, 21, 27, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-steel);
  border-radius: 6px;
  margin-bottom: 12px;
  height: 55px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 1.25rem;
}

.logo-text {
  font-family: var(--font-hud);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 1.5px;
  background: linear-gradient(90deg, var(--text-main) 40%, var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hud-box {
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  color: var(--neon-amber);
  background: rgba(0,0,0,0.3);
  padding: 4px 14px;
  border-radius: 3px;
  border: 1px solid rgba(255, 170, 0, 0.15);
  text-shadow: 0 0 6px rgba(255, 170, 0, 0.25);
}

.header-controls {
  display: flex;
  gap: 10px;
}

.hud-btn {
  background: rgba(25, 30, 40, 0.55);
  border: 1px solid var(--border-steel);
  color: var(--text-main);
  width: 34px;
  height: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-btn:hover {
  background: rgba(25, 30, 40, 0.85);
  border-color: var(--neon-blue);
  color: var(--neon-blue);
  box-shadow: 0 0 8px rgba(0, 210, 255, 0.25);
}

/* ==========================================================================
   NEW 3-COLUMN SPLIT SCREEN GRID
   ========================================================================== */
.game-split-grid {
  display: grid;
  grid-template-columns: 1fr 340px 1fr;
  gap: 15px;
  flex: 1;
  min-height: 0;
}

/* --- Player & Dealer Columns --- */
.player-column {
  background: linear-gradient(180deg, var(--bg-panel) 0%, rgba(18, 21, 27, 0.75) 100%);
  border: 1px solid var(--border-steel);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

/* Glow indicators on turns */
.player-column.active-turn {
  border-color: var(--neon-blue);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.15);
}

.player-column.P2-theme.active-turn {
  border-color: var(--neon-purple);
  box-shadow: 0 0 20px rgba(189, 0, 255, 0.15);
}

.player-column.P2-theme.vs-ai-mode.active-turn {
  border-color: var(--neon-red);
  box-shadow: 0 0 20px rgba(255, 51, 68, 0.15);
}

/* Header elements within column */
.panel-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
}

.status-avatar-container {
  position: relative;
  width: 64px;
  height: 64px;
}

.avatar-glow {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 210, 255, 0.15) 0%, transparent 70%);
  z-index: 1;
}

.dealer-glow {
  background: radial-gradient(circle, rgba(255, 51, 68, 0.15) 0%, transparent 70%);
}

.player-avatar {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 64px;
  background-color: #121620;
  border: 1.5px solid var(--border-steel);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-hud);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 1px;
  color: var(--text-main);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.03);
}

.player-avatar.dealer-avatar {
  background: linear-gradient(135deg, #0e0505 0%, #170708 100%);
  border-color: rgba(255, 51, 68, 0.25);
}

.dealer-eyes {
  width: 44px;
  height: 44px;
}

.eye-glow {
  filter: drop-shadow(0 0 3px var(--neon-red));
  animation: blink-eyes 4s infinite;
}

@keyframes blink-eyes {
  0%, 45%, 55%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.1); }
}

.player-info {
  flex: 1;
}

.player-name {
  font-family: var(--font-hud);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.P1-theme .player-name { color: var(--neon-blue); }
.P2-theme .player-name { color: var(--neon-purple); }
.P2-theme.vs-ai-mode .player-name { color: var(--neon-red); }

.handcuff-status {
  font-size: 0.75rem;
  color: var(--neon-purple);
  margin-top: 3px;
  font-family: var(--font-hud);
  text-shadow: 0 0 6px rgba(189, 0, 255, 0.3);
  animation: pulse-purple 1.5s infinite;
}

@keyframes pulse-purple {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* --- Battery Life Indicator --- */
.battery-life-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  background-color: rgba(0,0,0,0.15);
  border-radius: 4px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.battery-label {
  font-family: var(--font-hud);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.battery-body {
  width: 100%;
  height: 28px;
  background-color: #08090b;
  border: 1.5px solid var(--border-steel);
  border-radius: 4px;
  padding: 2.5px;
  display: flex;
  gap: 2.5px;
  position: relative;
}

.battery-body::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 7px;
  width: 3px;
  height: 11px;
  background-color: var(--border-steel);
  border-radius: 0 2px 2px 0;
}

.battery-cell {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Glow cells */
.P1-theme .battery-cell.active {
  background-color: var(--neon-blue);
  border-color: var(--neon-blue);
  box-shadow: 0 0 6px rgba(0, 210, 255, 0.6);
}

.P2-theme .battery-cell.active {
  background-color: var(--neon-purple);
  border-color: var(--neon-purple);
  box-shadow: 0 0 6px rgba(189, 0, 255, 0.6);
}

.P2-theme.vs-ai-mode .battery-cell.active {
  background-color: var(--neon-red);
  border-color: var(--neon-red);
  box-shadow: 0 0 6px rgba(255, 51, 68, 0.6);
}

.life-text {
  font-family: var(--font-hud);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* --- Hand Cards Section within Column --- */
.hand-section {
  display: flex;
  flex-direction: column;
  margin-top: 15px;
  flex: 1;
  min-height: 160px;
  justify-content: flex-start;
}

.cards-area-wrapper {
  position: relative;
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-steel);
  border-radius: 6px;
  padding: 8px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 120px;
}

/* Shroud blur filter for secrets */
.hand-shroud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 10, 14, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border-radius: 6px;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.hand-shroud.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hand-shroud span {
  font-family: var(--font-hud);
  font-size: 0.8rem;
  color: var(--neon-amber);
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 170, 0, 0.3);
}

.cards-wrapper {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  width: 100%;
  height: 100%;
  align-items: center;
  padding: 2px;
}

.cards-wrapper::-webkit-scrollbar {
  height: 3px;
}
.cards-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-steel);
  border-radius: 1px;
}

/* Hand cards spacing inside grid columns */
.item-card {
  flex: 1;
  min-width: 72px;
  max-width: 90px;
  height: 100px;
  background: linear-gradient(135deg, rgba(25, 30, 40, 0.95) 0%, rgba(15, 18, 23, 0.95) 100%);
  border: 1.2px solid var(--border-steel);
  border-radius: 4px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.item-card:hover {
  transform: translateY(-5px);
  border-color: var(--neon-amber);
  box-shadow: 0 6px 15px rgba(255, 170, 0, 0.22);
}

.item-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-icon {
  font-size: 1.15rem;
}

.item-title {
  font-family: var(--font-hud);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.item-desc {
  font-size: 0.6rem;
  color: var(--text-muted);
  line-height: 1.25;
  margin-top: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Hover glow categories */
.item-card[data-type="saw"]:hover { border-color: var(--neon-red); }
.item-card[data-type="cigarette"]:hover { border-color: var(--neon-green); }
.item-card[data-type="handcuffs"]:hover { border-color: var(--neon-purple); }
.item-card[data-type="adrenaline"]:hover { border-color: var(--neon-purple); }
.item-card[data-type="medicine"]:hover { border-color: var(--neon-green); }
.item-card[data-type="inverter"]:hover { border-color: var(--neon-blue); }
.item-card[data-type="phone"]:hover { border-color: var(--neon-amber); }

/* Card backs visual (Dealer hands) */
.item-card.card-back {
  background: linear-gradient(135deg, #1c0a0b 0%, #0e0505 100%);
  border-color: rgba(255, 51, 68, 0.15);
  cursor: default;
  align-items: center;
  justify-content: center;
}
.item-card.card-back:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 51, 68, 0.15);
}
.card-back-icon {
  font-size: 1.5rem;
  color: rgba(255, 51, 68, 0.25);
  text-shadow: 0 0 10px rgba(255, 51, 68, 0.15);
  animation: eye-pulse 3s infinite;
}
@keyframes eye-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* --- Action Section within Column --- */
.actions-section {
  margin-top: 15px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.015);
}

.turn-announcement {
  text-align: center;
  font-family: var(--font-hud);
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.action-buttons-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
  border: 1px solid var(--border-steel);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 8px 4px;
  outline: none;
  background: rgba(25, 30, 40, 0.45);
  color: var(--text-main);
  min-height: 52px;
}

.btn-action:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  transform: none !important;
  border-color: var(--border-steel) !important;
  box-shadow: none !important;
  color: var(--text-muted) !important;
}

.btn-action .btn-icon {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

.btn-action .btn-text-main {
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* Hover overrides */
.self-action:not(:disabled):hover {
  transform: translateY(-3px);
  border-color: var(--neon-blue);
  box-shadow: 0 3px 10px rgba(0, 210, 255, 0.25);
  color: var(--neon-blue);
}

.opponent-action:not(:disabled):hover {
  transform: translateY(-3px);
  border-color: var(--neon-red);
  box-shadow: 0 3px 10px rgba(255, 51, 68, 0.25);
  color: var(--neon-red);
}

.self-action:not(:disabled):active,
.opponent-action:not(:disabled):active {
  transform: translateY(-1px);
}

/* ==========================================================================
   CENTER COLUMN: BATTLEFIELD
   ========================================================================== */
.center-shaft {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(10, 12, 16, 0.35);
  border: 1px dashed rgba(56, 66, 82, 0.2);
  border-radius: 8px;
  padding: 12px;
  height: 100%;
}

/* Bullet Chamber HUD */
.chamber-hud {
  background-color: rgba(8, 9, 11, 0.75);
  border: 1px solid var(--border-steel);
  border-radius: 5px;
  padding: 10px;
}

.bullets-ratio {
  display: flex;
  justify-content: space-around;
  margin-bottom: 8px;
}

.bullet-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
}

.bullet-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.live-dot {
  background-color: var(--neon-red);
  box-shadow: 0 0 5px var(--neon-red);
}

.blank-dot {
  background-color: var(--neon-blue);
  box-shadow: 0 0 5px var(--neon-blue);
}

.bullet-stat .label {
  color: #8a99ad;
  font-family: var(--font-hud);
}

.bullet-stat .count {
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 0.9rem;
}

.chamber-card-display {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  align-items: center;
  background: rgba(0,0,0,0.3);
  border-radius: 3px;
  padding: 4px;
}

/* Bullet shells nodes */
.bullet-shell-node {
  width: 12px;
  height: 28px;
  background-color: #1b202a;
  border: 1px solid #2d3748;
  border-radius: 2px;
  position: relative;
  transition: all 0.3s ease;
}

.bullet-shell-node.loaded {
  background: linear-gradient(180deg, #ffd700 0%, #b8860b 100%);
  border-color: #ffd700;
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.bullet-shell-node::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 1px;
  width: 8px;
  height: 5px;
  background-color: #666;
  border-radius: 0 0 1px 1px;
}

.bullet-shell-node.loaded::after {
  background-color: #ca9f1d;
}

/* Gun visual stage */
.gun-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  position: relative;
}

.gun-axis {
  position: relative;
  transition: transform 0.6s cubic-bezier(0.25, 1.25, 0.5, 1.25);
  transform-origin: 65px 20px;
}

/* Rotation targets */
.gun-point-self {
  transform: rotate(180deg);
}

.gun-point-dealer {
  transform: rotate(0deg);
}

.saw-effect {
  position: absolute;
  right: 0px;
  top: -15px;
  font-size: 1.3rem;
  animation: saw-cut 0.4s linear infinite;
}

/* Gun sawn barrel */
.gun-sawn-off #shotgun-barrel { width: 35px; }
.gun-sawn-off #shotgun-mag-tube { width: 25px; }

/* Terminal logs */
.log-console {
  background-color: #050608;
  border: 1px solid var(--border-steel);
  border-radius: 5px;
  height: 120px;
  display: flex;
  flex-direction: column;
}

.console-header {
  background-color: #0c0e12;
  padding: 4px 10px;
  border-bottom: 1px solid var(--border-steel);
  display: flex;
  align-items: center;
  gap: 5px;
}

.console-header .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.console-header .dot.red { background-color: var(--neon-red); }
.console-header .dot.yellow { background-color: var(--neon-amber); }
.console-header .dot.green { background-color: var(--neon-green); }

.console-title {
  font-family: var(--font-hud);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-left: 4px;
}

.console-body {
  padding: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.35;
  overflow-y: auto;
  flex: 1;
}

.console-body::-webkit-scrollbar {
  width: 3px;
}
.console-body::-webkit-scrollbar-thumb {
  background: var(--border-steel);
}

.log-line {
  margin-bottom: 4px;
  color: #a0aec0;
}
.log-line.system-line { color: var(--text-muted); }
.log-line.player-line { color: var(--neon-blue); }
.log-line.dealer-line { color: var(--neon-purple); }
.log-line.vs-ai-dealer-line { color: var(--neon-red); }
.log-line.damage-line { color: var(--neon-amber); font-weight: bold; }

/* Shell Tray */
.discharged-tray-container {
  margin-top: 8px;
  background-color: rgba(0,0,0,0.15);
  border-radius: 4px;
  padding: 6px 10px;
}

.tray-label {
  display: block;
  font-family: var(--font-hud);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.discharged-tray {
  display: flex;
  gap: 6px;
  min-height: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.empty-shell {
  width: 7px;
  height: 17px;
  border-radius: 1px;
  background: #3e4856;
  border: 1px solid #202731;
  opacity: 0.75;
  transform: rotate(15deg);
  animation: drop-shell 0.3s ease-out forwards;
}

.empty-shell.live-discharge { background: #9b2c2c; border-color: #742a2a; }
.empty-shell.blank-discharge { background: #2b5c8f; border-color: #20446a; }

/* Pointer Blocker */
.turn-blocked .game-split-grid {
  pointer-events: none !important;
}

/* --- Media Queries / Responsive --- */
@media (max-width: 1024px) {
  body {
    overflow-y: auto;
    height: auto;
    padding: 10px 0;
  }
  .game-container {
    height: auto;
    padding: 5px;
  }
  .game-split-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    height: auto;
  }
  .player-column {
    height: auto;
    min-height: 480px;
  }
  .center-shaft {
    height: auto;
    min-height: 380px;
  }
}
