/* Import Rajdhani font (used in Cyberpunk 2077) */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;700&display=swap');

/* === CYBERPUNK 2077 THEME VARIABLES === */
:root {
  /* Core colors */
  --bg-dark: #0C0C14;
  --bg-darker: #06070D;
  --bg-accent: #151525;
  
  /* Night City neon colors */
  --neon-blue: #05D9E8;
  --neon-yellow: #FDFE03;
  --neon-magenta: #FF2A6D;
  --neon-red: #FF003C;
  --neon-violet: #8B54FF;
  
  /* Interface colors */
  --text: #FFFFFF;
  --text-dim: rgba(255, 255, 255, 0.7);
  --text-cyber: #D6EDF0;
  --border-light: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(5, 217, 232, 0.4);
  --shadow-blue: rgba(5, 217, 232, 0.3);
  --shadow-yellow: rgba(253, 254, 3, 0.3);
  --shadow-red: rgba(255, 0, 60, 0.3);
  
  /* Animation speeds */
  --speed-fast: 0.2s;
  --speed-normal: 0.4s;
  --speed-slow: 0.8s;
  
  /* UI Dimensions */
  --border-width: 2px;
  --corner-size: 10px;
  --frame-padding: 15px;
  --card-radius: 4px;
}

/* === RESET & BASE STYLES === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 400;
  background-color: var(--bg-dark);
  color: var(--text);
  text-align: center;
  margin: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* === MAIN CONTAINER === */
.cyberpunk-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === TYPOGRAPHY === */
h1 {
  font-weight: 700;
  font-size: 38px;
  text-transform: uppercase;
  color: var(--neon-blue);
  text-shadow: 0 0 10px rgba(5, 217, 232, 0.5);
  letter-spacing: 1px;
  margin: 0;
  line-height: 1;
}

.subtitle {
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--neon-yellow);
  letter-spacing: 3px;
  margin-top: 5px;
}

/* === BACKGROUND EFFECTS === */
/* Ambient background */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  filter: brightness(0.7) contrast(1.1);
  opacity: 1;
}

/* Digital grid */
.digital-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.6;
}

/* Scanner lines effect */
.scanner-lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 0.5%,
    transparent 1%
  );
  opacity: 0.2;
  pointer-events: none;
}

/* Glitch overlay effect - initially hidden, shown on events */
.glitch-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
  background: 
    linear-gradient(45deg, rgba(255, 0, 60, 0.1), transparent 70%),
    linear-gradient(-45deg, rgba(5, 217, 232, 0.1), transparent 70%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity 0.3s ease;
}

/* Circuit lines */
.circuit-lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.1;
  pointer-events: none;
  overflow: hidden;
}

.circuit-line {
  position: absolute;
  background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
  height: 1px;
  width: 150px;
  opacity: 0;
}

/* === CYBER FRAMES & CORNERS === */
/* Header Frame */
.game-header {
  margin: 20px auto 30px;
  position: relative;
}

.header-frame {
  position: relative;
  padding: var(--frame-padding);
  overflow: hidden;
}

.header-corner {
  position: absolute;
  width: var(--corner-size);
  height: var(--corner-size);
  background-color: var(--neon-blue);
  z-index: 1;
}

.header-corner.tl {
  top: 0;
  left: 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.header-corner.tr {
  top: 0;
  right: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.header-corner.bl {
  bottom: 0;
  left: 0;
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.header-corner.br {
  bottom: 0;
  right: 0;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

/* Cyber Frame for UI elements */
.cyber-frame {
  position: relative;
  padding: 15px;
  border: var(--border-width) solid var(--border-accent);
  background-color: rgba(12, 12, 20, 0.8);
  box-shadow: 0 0 15px var(--shadow-blue);
  margin: 10px 0;
}

.frame-corner {
  position: absolute;
  width: var(--corner-size);
  height: var(--corner-size);
  background-color: var(--neon-blue);
  z-index: 1;
}

.frame-corner.tl {
  top: -1px;
  left: -1px;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.frame-corner.tr {
  top: -1px;
  right: -1px;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.frame-corner.bl {
  bottom: -1px;
  left: -1px;
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.frame-corner.br {
  bottom: -1px;
  right: -1px;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

/* Scoreboard with cyber styling */
.scoreboard-container {
  display: none; /* Hide the top scoreboard */
}

.score-panel {
  flex: 1;
  position: relative;
  padding: 15px;
  border: var(--border-width) solid var(--border-accent);
  background-color: rgba(12, 12, 20, 0.8);
  box-shadow: 0 0 15px var(--shadow-blue);
}

.score-panel.player1 {
  border-color: var(--neon-blue);
  box-shadow: 0 0 15px var(--shadow-blue);
}

.score-panel.player2 {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 15px var(--shadow-yellow);
}

.versus-divider {
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-magenta);
  text-shadow: 0 0 8px var(--neon-magenta);
}

/* Player avatar display in scoreboard */
.score-avatar-container {
  width: 60px;
  height: 60px;
  margin: 0 auto 10px;
  position: relative;
  border: 2px solid var(--border-accent);
  overflow: hidden;
}

.score-avatar-container.player1 {
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px var(--shadow-blue);
}

.score-avatar-container.player2 {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 10px var(--shadow-yellow);
}

.score-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.score-marker {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  color: var(--neon-blue);
  font-size: 16px;
  padding: 2px 6px;
  font-weight: bold;
}

.player1 .score-marker {
  color: var(--neon-blue);
  text-shadow: 0 0 5px var(--neon-blue);
}

.player2 .score-marker {
  color: var(--neon-yellow);
  text-shadow: 0 0 5px var(--neon-yellow);
}

.score-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
  text-align: center;
  color: var(--text);
}

.score-value {
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  margin-top: 5px;
}

.score-record {
  font-size: 16px;
  text-align: center;
  opacity: 0.8;
  margin-top: 5px;
}

/* === PLAYER SETUP === */
.players-container {
  display: flex;
  justify-content: space-around;
  padding: 20px 0;
  margin-bottom: 30px;
  position: relative;
  flex-wrap: wrap;
  gap: 20px;
}

.player-setup {
  position: relative;
  width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
}

/* Cyber card for player setup */
.cyber-card {
  width: 100%;
  position: relative;
  background: linear-gradient(135deg, var(--bg-accent), var(--bg-darker));
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  border: var(--border-width) solid var(--border-light);
  transition: all 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.card-corner {
  position: absolute;
  width: var(--corner-size);
  height: var(--corner-size);
  background-color: var(--neon-blue);
  z-index: 1;
}

.card-corner.tl {
  top: -1px;
  left: -1px;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.card-corner.tr {
  top: -1px;
  right: -1px;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.card-corner.bl {
  bottom: -1px;
  left: -1px;
  clip-path: polygon(0 0, 0 100%, 100% 100%);
}

.card-corner.br {
  bottom: -1px;
  right: -1px;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.card-top {
  height: 140px;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(5, 217, 232, 0.2), rgba(139, 84, 255, 0.2));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.player-image {
  position: relative;
  display: flex;
  margin: 0 auto;
  justify-content: center;
  align-items: center;
  width: 80%;
  height: 150px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.player-image.selected {
  box-shadow: 0 0 25px var(--neon-pink);
  animation: selection-flash 0.5s ease;
}

@keyframes selection-flash {
  0% { box-shadow: 0 0 5px var(--neon-pink); }
  50% { box-shadow: 0 0 30px var(--neon-pink); }
  100% { box-shadow: 0 0 5px var(--neon-pink); }
}

.avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.marker {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  color: var(--neon-blue);
  font-size: 24px;
  padding: 2px 6px;
  font-weight: bold;
  text-shadow: 0 0 5px var(--neon-blue);
}

.player-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-150%);
}

.player-image:hover::after {
  transform: translateX(100%);
  transition: transform 0.8s ease;
}

.card-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--border-light);
}

.player-name-input {
  width: 100%;
  padding: 10px;
  background: rgba(5, 10, 20, 0.6);
  border: 1px solid var(--border-accent);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  outline: none;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.player-name-input:focus {
  box-shadow: 0 0 10px var(--shadow-blue);
  border-color: var(--neon-blue);
}

/* Character selection */
.character-select-label {
  color: var(--neon-blue);
  font-size: 14px;
  text-transform: uppercase;
  margin: 8px 0;
  text-align: center;
  letter-spacing: 1px;
  font-weight: 500;
  text-shadow: 0 0 5px rgba(0, 183, 255, 0.7);
}

.character-select {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.avatar-button {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-button:hover {
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(0, 183, 255, 0.5);
  transform: translateY(-2px);
}

.avatar-button.active {
  border-color: var(--neon-pink);
  box-shadow: 0 0 15px rgba(255, 0, 128, 0.6);
}

.avatar-button::before {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  top: -5px;
  right: -5px;
  background: transparent;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.2s ease;
}

.avatar-button.active::before {
  transform: scale(1);
  background: var(--neon-pink);
}

.character-name {
  margin-top: 5px;
  font-size: 12px;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.avatar-button:hover .character-name {
  color: var(--neon-blue);
}

.avatar-thumb {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  object-fit: cover;
}

/* Draws display */
.draws-container {
  text-align: center;
  margin-top: 10px;
  padding: 5px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border-light);
}

.draw-tag {
  color: var(--neon-magenta);
  font-size: 14px;
}

.draw-value {
  font-size: 18px;
  font-weight: bold;
  margin-left: 10px;
}

/* Corporation selection dropdown */
.corp-select {
  width: 100%;
  position: relative;
}

.corp-dropdown {
  width: 100%;
  padding: 8px 10px;
  background: rgba(5, 10, 20, 0.6);
  border: 1px solid var(--border-accent);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  outline: none;
  transition: all 0.3s ease;
  text-transform: uppercase;
  appearance: none;
  cursor: pointer;
}

.corp-select::after {
  content: '▼';
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  color: var(--neon-blue);
  pointer-events: none;
  font-size: 12px;
}

.corp-dropdown:focus {
  box-shadow: 0 0 10px var(--shadow-blue);
  border-color: var(--neon-blue);
}

/* Winner and loser states */
.winner .card-bg {
  opacity: 1;
  animation: pulse-bg 2s infinite alternate;
}

.winner .player-image {
  box-shadow: 0 0 20px var(--neon-blue), 0 0 35px rgba(5, 217, 232, 0.5);
  border-color: var(--neon-blue);
}

.loser {
  transform: scale(0.9);
  opacity: 0.5;
  filter: saturate(0.3) grayscale(0.2);
}

.loser .player-image {
  filter: grayscale(0.6);
}

@keyframes pulse-bg {
  0% { opacity: 0.3; }
  100% { opacity: 0.6; }
}

/* === BUTTONS & CONTROLS === */
.controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 25px 0;
  flex-wrap: wrap;
}

/* Mode selection buttons */
.mode-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%;
}

.main-button {
  min-width: 220px;
}

/* AI difficulty container */
.ai-difficulty-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  max-width: 350px;
  padding: 20px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-accent);
}

.difficulty-header {
  font-size: 18px;
  font-weight: 500;
  color: var(--neon-yellow);
  margin-bottom: 5px;
  text-align: center;
}

.difficulty-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.back-button {
  margin-top: 10px;
  align-self: flex-start;
}

/* Active AI difficulty button styling */
.ai-button {
  flex: 1;
  min-width: 0;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.ai-button.active {
  opacity: 1;
  box-shadow: 0 0 15px var(--shadow-red);
}

.ai-button.active::before {
  background: linear-gradient(135deg, var(--neon-red), var(--neon-blue));
  opacity: 0.8;
}

.ai-button.active .button-content {
  text-shadow: 0 0 8px var(--text);
}

/* Cyberpunk button */
.cyber-button {
  position: relative;
  padding: 0;
  height: 50px;
  min-width: 180px;
  background: transparent;
  color: var(--text);
  border: none;
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--speed-fast) ease, box-shadow var(--speed-fast) ease;
  outline: none;
  clip-path: polygon(
    0 0, 
    calc(100% - 10px) 0, 
    100% 10px, 
    100% 100%, 
    10px 100%, 
    0 calc(100% - 10px)
  );
}

.cyber-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-magenta));
  opacity: 0.7;
  z-index: 0;
}

.cyber-button::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background-color: var(--bg-dark);
  z-index: 1;
  clip-path: polygon(
    0 0, 
    calc(100% - 8px) 0, 
    100% 8px, 
    100% 100%, 
    8px 100%, 
    0 calc(100% - 8px)
  );
}

.button-content {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: text-shadow var(--speed-fast) ease;
  letter-spacing: 1px;
}

.cyber-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(5, 217, 232, 0.4);
}

.cyber-button:hover .button-content {
  text-shadow: 0 0 8px var(--neon-blue);
}

.cyber-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(5, 217, 232, 0.4);
}

/* Sound control buttons */
.sound-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 0;
  background: rgba(5, 10, 20, 0.8);
  border: 1px solid var(--border-accent);
  color: var(--neon-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  clip-path: polygon(
    0 0, 
    calc(100% - 8px) 0, 
    100% 8px, 
    100% 100%, 
    8px 100%, 
    0 calc(100% - 8px)
  );
}

.icon-button:hover {
  box-shadow: 0 0 10px var(--shadow-blue);
  color: var(--text);
}

.icon-button.muted {
  color: var(--text-dim);
  border-color: var(--border-light);
  opacity: 0.6;
}

/* Emergency reset button styling */
.emergency-button {
  border-color: var(--neon-magenta);
  color: var(--neon-magenta);
  margin-left: 10px;
  position: relative;
  overflow: hidden;
}

.emergency-button:hover {
  box-shadow: 0 0 15px var(--shadow-red);
  color: var(--text);
  animation: pulse-emergency 1.5s infinite alternate;
}

.emergency-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 0, 60, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.emergency-button:hover::after {
  opacity: 1;
}

@keyframes pulse-emergency {
  0% { border-color: var(--neon-magenta); }
  100% { border-color: var(--neon-red); }
}

.button-icon {
  font-size: 20px;
}

/* === GAME BOARD === */
.board {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px;
  justify-content: center;
  margin: 20px auto;
  max-width: 700px;
  position: relative;
}

/* Game layout with side avatars */
.game-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Player Side Styling */
.player-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 150px;
  margin-top: 10px;
}

.side-avatar {
  position: relative;
  width: 120px;
  height: 120px;
  border: 3px solid var(--neon-blue);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 183, 255, 0.7);
  transition: all 0.3s ease;
}

.side-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-avatar.active {
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.8);
  animation: pulse-active 1.5s infinite alternate;
}

@keyframes pulse-active {
  0% {
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.7);
  }
  100% {
    box-shadow: 0 0 25px rgba(255, 0, 128, 0.9);
  }
}

.side-marker {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
}

.side-marker.player1 {
  color: var(--neon-blue);
}

.side-marker.player2 {
  color: var(--neon-pink);
}

.side-name {
  margin-top: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  text-transform: uppercase;
  color: var(--text-color);
  text-shadow: 0 0 5px rgba(0, 183, 255, 0.7);
  letter-spacing: 1px;
  text-align: center;
}

/* Player record styling */
.player-record {
  display: block;
  font-size: 14px;
  color: var(--neon-yellow);
  margin-top: 3px;
  opacity: 0.8;
  font-weight: 500;
}

/* Adjust board layout for new positioning */
.board {
  margin: 0;
}

/* Add responsive design for the game layout */
@media (max-width: 900px) {
  .game-layout {
    flex-direction: column;
    gap: 10px;
  }
  
  .player-side {
    flex-direction: row;
    width: 100%;
    justify-content: center;
    gap: 15px;
  }
  
  .side-avatar {
    width: 80px;
    height: 80px;
  }
  
  .player-side.left {
    order: 1;
  }
  
  .player-side.right {
    order: 3;
  }
  
  #mainBoard {
    order: 2;
  }
}

/* Mini board styling */
.mini-board {
  display: grid;
  grid-template-columns: repeat(3, 45px);
  gap: 3px;
  padding: 6px;
  position: relative;
  background: rgba(5, 10, 20, 0.8);
  transition: all 0.3s ease;
  clip-path: polygon(
    0 0, 
    calc(100% - 10px) 0, 
    100% 10px, 
    100% 100%, 
    10px 100%, 
    0 calc(100% - 10px)
  );
  border: 2px solid var(--border-light);
}

/* Cell styling */
.cell {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-weight: 700;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.cell::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cell:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cell:hover::after {
  opacity: 1;
}

/* Colored X and O symbols */
.cell.X {
  color: var(--neon-blue);
  text-shadow: 0 0 5px var(--neon-blue);
}

.cell.O {
  color: var(--neon-yellow);
  text-shadow: 0 0 5px var(--neon-yellow);
}

/* Active board highlighting */
.mini-board.active {
  border-color: var(--neon-magenta);
  box-shadow: 0 0 15px var(--neon-magenta);
  animation: highlight-pulse 0.5s ease forwards;
}

@keyframes highlight-pulse {
  0% { 
    border-color: var(--neon-violet);
    box-shadow: 0 0 30px var(--neon-violet);
  }
  30% {
    border-color: var(--neon-violet);
    box-shadow: 0 0 15px var(--neon-violet);
  }
  100% { 
    border-color: var(--neon-magenta);
    box-shadow: 0 0 15px var(--neon-magenta);
  }
}

/* Won board styling - default styling, overridden by specific X/O classes */
.mini-board.won {
  background: rgba(5, 10, 25, 0.9);
  backdrop-filter: blur(2px);
  position: relative;
}

/* X-won board styling */
.mini-board.won-x {
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px var(--shadow-blue);
}

/* O-won board styling */
.mini-board.won-o {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 10px var(--shadow-yellow);
}

/* Make cells in won boards look faded to emphasize the giant symbol */
.mini-board.won .cell {
  opacity: 0.5;
}

/* Giant symbol styling */
.giant-symbol {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  pointer-events: none;
  z-index: 10;
  animation: appear-glitch 0.5s ease forwards;
  text-shadow: 0 0 15px currentColor;
}

.giant-symbol.X {
  color: var(--neon-blue);
  text-shadow: 0 0 10px var(--neon-blue);
  opacity: 0.7;
}

.giant-symbol.O {
  color: var(--neon-yellow);
  text-shadow: 0 0 10px var(--neon-yellow);
  opacity: 0.7;
}

@keyframes appear-glitch {
  0% {
    opacity: 0;
    transform: scale(1.5);
    filter: blur(10px);
  }
  30% {
    opacity: 0.9;
    transform: scale(0.9);
    filter: blur(0);
  }
  40% {
    opacity: 0.6;
    transform: scale(1.1);
    filter: blur(2px);
  }
  50% {
    opacity: 0.8;
    transform: scale(0.95);
    filter: blur(0);
  }
  100% {
    opacity: 0.7;
    transform: scale(1);
    filter: blur(0);
  }
}

/* === WINNER DISPLAY === */
.winner-display {
  height: 140px;
  position: relative;
  margin: 25px auto;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hologram-text {
  text-align: center;
  position: relative;
  font-size: 0;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.hologram-text.active {
  font-size: 54px;
  opacity: 1;
  transform: translateY(0);
}

.hologram-text .text-content {
  display: inline-block;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--neon-blue);
  text-shadow: 0 0 8px var(--neon-blue), 0 0 15px var(--neon-blue);
  animation: holo-flicker 4s infinite alternate;
  letter-spacing: 2px;
}

.hologram-text .highlight {
  color: var(--neon-yellow);
  text-shadow: 0 0 8px var(--neon-yellow), 0 0 15px var(--neon-yellow);
  animation: holo-flicker 3s infinite alternate-reverse;
}

@keyframes holo-flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.8; }
  94% { opacity: 1; }
  96% { opacity: 0.7; }
  97% { opacity: 1; }
}

/* Slice glitch effect */
.slice-glitch {
  position: relative;
  display: inline-block;
}

.slice-glitch .slice {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  animation: none;
}

.slice-glitch.active .slice:nth-child(1) {
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  animation: slice-animation-1 0.75s cubic-bezier(.46,.29,0,1.24) 1;
}

.slice-glitch.active .slice:nth-child(2) {
  clip-path: polygon(0 33%, 100% 33%, 100% 66%, 0 66%);
  animation: slice-animation-2 0.75s cubic-bezier(.46,.29,0,1.24) 1;
}

.slice-glitch.active .slice:nth-child(3) {
  clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%);
  animation: slice-animation-3 0.75s cubic-bezier(.46,.29,0,1.24) 1;
}

@keyframes slice-animation-1 {
  0% { transform: translateX(-100%); opacity: 0; }
  60% { transform: translateX(5%); opacity: 1; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes slice-animation-2 {
  0% { transform: translateX(100%); opacity: 0; }
  60% { transform: translateX(-5%); opacity: 1; }
  100% { transform: translateX(0); opacity: 1; }
}

@keyframes slice-animation-3 {
  0% { transform: translateY(100%); opacity: 0; }
  60% { transform: translateY(-5%); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Glitch text effect */
.glitchable-text {
  position: relative;
  display: inline-block;
}

.apply-glitch {
  position: relative;
}

.apply-glitch::before,
.apply-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  overflow: hidden;
  z-index: -1;
  font-family: 'Rajdhani', sans-serif;
  font-weight: inherit;
}

.apply-glitch::before {
  left: 2px;
  text-shadow: -1px 0 var(--neon-magenta);
  color: var(--neon-magenta);
  animation: glitch-paths 1s steps(2, end) forwards, 
             glitch-opacity 1s steps(2, end) forwards, 
             glitch-font 1s steps(2, end) forwards, 
             glitch-movement 1s steps(2, end) forwards;
  animation-iteration-count: 1;
}

.apply-glitch::after {
  left: -2px;
  text-shadow: -1px 0 var(--neon-blue), 1px 1px var(--neon-blue);
  color: var(--neon-blue);
  animation: glitch-paths 1s steps(2, end) forwards, 
             glitch-opacity 1s steps(2, end) forwards, 
             glitch-font 1s steps(2, end) forwards, 
             glitch-movement 1s steps(2, end) forwards;
  animation-iteration-count: 1;
}

/* Johnny Silverhand glitch (full screen effect) */
.johnny-glitch {
  animation: johnny-glitch-anim 0.3s ease-out;
}

@keyframes johnny-glitch-anim {
  0% {
    filter: none;
    transform: translateX(0) skewX(0);
  }
  10% {
    filter: hue-rotate(90deg) contrast(150%);
    transform: translateX(-5px) skewX(-5deg);
  }
  20% {
    filter: hue-rotate(0deg) invert(100%);
    transform: translateX(5px) skewX(5deg);
  }
  30% {
    filter: hue-rotate(270deg) saturate(200%);
    transform: translateX(-10px) skewX(-10deg);
  }
  40% {
    filter: hue-rotate(0deg) brightness(200%);
    transform: translateX(10px) skewX(-5deg);
  }
  50% {
    filter: hue-rotate(180deg) contrast(200%);
    transform: translateX(-5px) skewX(5deg);
  }
  60% {
    filter: invert(100%);
    transform: translateX(5px) skewX(-5deg);
  }
  70% {
    filter: hue-rotate(0deg);
    transform: translateX(-2px) skewX(2deg);
  }
  80% {
    filter: saturate(150%);
    transform: translateX(2px) skewX(-2deg);
  }
  90% {
    filter: none;
    transform: translateX(-1px) skewX(1deg);
  }
  100% {
    filter: none;
    transform: translateX(0) skewX(0);
  }
}

/* Dev credit animation */
#dev-credit.active {
  animation: glitch-text 0.5s linear;
}

@keyframes glitch-text {
  0% {
    text-shadow: none;
    transform: translateX(0);
  }
  10% {
    text-shadow: 
      -2px 0 #ff00ea,
      2px 2px #00fffc;
    transform: translateX(-2px);
  }
  20% {
    text-shadow: 
      2px -1px #ff00ea,
      -2px -2px #00fffc;
    transform: translateX(2px);
  }
  30% {
    text-shadow: 
      -1px 0 #ff00ea,
      1px -1px #00fffc;
    transform: translateX(-1px);
  }
  40% {
    text-shadow: 
      1px 1px #ff00ea,
      -1px 0 #00fffc;
    transform: translateX(1px);
  }
  50% {
    text-shadow: 
      -2px -1px #ff00ea,
      2px 1px #00fffc;
    transform: translateX(-1px);
  }
  60% {
    text-shadow: 
      2px 1px #ff00ea,
      -2px 0 #00fffc;
    transform: translateX(1px);
  }
  70% {
    text-shadow: 
      -1px -1px #ff00ea,
      1px 1px #00fffc;
    transform: translateX(-1px);
  }
  80% {
    text-shadow: 
      1px -1px #ff00ea,
      -1px 1px #00fffc;
    transform: translateX(1px);
  }
  90% {
    text-shadow: 
      -1px 0 #ff00ea,
      1px 0 #00fffc;
    transform: translateX(-0.5px);
  }
  100% {
    text-shadow: none;
    transform: translateX(0);
  }
}

/* Responsive Design Adjustments */
@media (max-width: 768px) {
  h1 {
    font-size: 32px;
  }
  
  .subtitle {
    font-size: 12px;
  }
  
  .controls {
    flex-direction: column;
    align-items: center;
  }
  
  .cyber-button {
    width: 80%;
    max-width: 300px;
  }
  
  .mini-board {
    grid-template-columns: repeat(3, 35px);
  }
  
  .cell {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }
  
  .hologram-text.active {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .player-setup {
    width: 100%;
    max-width: 240px;
  }
  
  .mini-board {
    grid-template-columns: repeat(3, 30px);
  }
  
  .cell {
    width: 30px;
    height: 30px;
    font-size: 18px;
  }
  
  .hologram-text.active {
    font-size: 28px;
  }
}

/* Game logo in header */
.game-logo {
  max-width: 200px;
  margin: 0 auto 10px;
  display: block;
}

/* Game notification */
.game-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(0, 0, 0, 0.8);
  color: var(--neon-blue);
  border: 1px solid var(--neon-blue);
  padding: 12px 20px;
  border-radius: 4px;
  z-index: 9999;
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  text-align: center;
  box-shadow: 0 0 15px rgba(0, 183, 255, 0.4);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.game-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@keyframes notification-pulse {
  0% { box-shadow: 0 0 15px rgba(0, 183, 255, 0.4); }
  50% { box-shadow: 0 0 25px rgba(0, 183, 255, 0.7); }
  100% { box-shadow: 0 0 15px rgba(0, 183, 255, 0.4); }
}

/* AI Selector Component */
.ai-selector {
  text-align: center;
  margin: 2rem auto;
  max-width: 600px;
}
.ai-selector h3 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 1rem;
}
.ai-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}
.ai-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(0, 255, 240, 0.4);
  border-radius: 8px;
  padding: 0.75rem;
  width: 100px;
  transition: all 0.3s ease;
  position: relative;
}

.ai-option.locked {
  filter: grayscale(0.5);
}

.ai-option.locked:hover {
  filter: grayscale(0.3);
}

.lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  pointer-events: none;
}

.lock-icon {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 0 10px rgba(255, 0, 80, 0.8);
}

.ai-option.selected,
.ai-option:hover {
  border-color: rgba(255, 0, 120, 0.8);
  box-shadow: 0 0 15px rgba(255, 0, 120, 0.4);
  transform: translateY(-2px);
}

.ai-option img {
  display: block;
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 5px;
  margin: 0 auto 0.5rem;
  border: 2px solid rgba(0, 255, 240, 0.5);
  transition: all 0.3s ease;
}

.ai-option span {
  display: block;
  margin-top: 5px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Handle the Aayush AI option unlock animation */
.ai-option.unlocking .lock-overlay {
  animation: unlock-ai-option 1.5s forwards;
}

@keyframes unlock-ai-option {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

/* Move log export dialog */
.modal-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dialog-content {
  width: 80%;
  max-width: 600px;
  background-color: #0a0a0f;
  border: 2px solid #00eaff;
  box-shadow: 0 0 15px #00eaff;
  color: #fff;
  padding: 0;
  border-radius: 5px;
  animation: glitch-in 0.4s forwards;
}

.dialog-header {
  background-color: #121225;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #00eaff;
}

.dialog-header h3 {
  margin: 0;
  font-family: 'Rajdhani', sans-serif;
  color: #00eaff;
  text-transform: uppercase;
}

.close-button {
  background: none;
  border: none;
  color: #ff3e5b;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.dialog-body {
  padding: 15px;
}

.export-options {
  display: flex;
  gap: 10px;
  margin: 15px 0;
}

.small-button {
  padding: 5px 15px;
  height: auto;
  min-width: 120px;
}

.log-preview {
  margin-top: 15px;
  border: 1px solid #303045;
  background-color: #0c0c14;
  padding: 10px;
  border-radius: 3px;
}

.log-preview h4 {
  margin-top: 0;
  color: #00eaff;
  font-family: 'Rajdhani', sans-serif;
}

.log-preview-content {
  max-height: 200px;
  overflow-y: auto;
  font-family: monospace;
  color: #b1b1cb;
  font-size: 12px;
  margin: 0;
  padding: 5px;
  background-color: rgba(0,0,0,0.3);
  white-space: pre-wrap;
}

/* Developer credit styling updated */
.developer-credit {
  position: relative;
  width: 100%;
  text-align: center;
  margin-top: 10px;
  font-family: 'Rajdhani', sans-serif;
  z-index: 10;
}

#dev-credit {
  font-size: 0.9rem;
  color: rgba(0, 255, 240, 0.7);
  text-shadow: 0 0 5px rgba(0, 255, 240, 0.5);
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: inline-block;
  animation: auto-glitch 5s infinite;
}

#dev-credit::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 240, 0.5), transparent);
  bottom: -2px;
  left: 0;
  transform-origin: 100% 0;
  transform: scaleX(0.7);
  transition: transform 0.3s ease;
}

#dev-credit:hover {
  color: rgba(0, 255, 240, 1);
  text-shadow: 0 0 8px rgba(0, 255, 240, 0.8);
}

#dev-credit:hover::before {
  transform: scaleX(1);
}

/* Automatic glitch animation every 5 seconds */
@keyframes auto-glitch {
  0%, 95%, 100% {
    opacity: 1;
    transform: translateX(0);
    text-shadow: 0 0 5px rgba(0, 255, 240, 0.5);
    letter-spacing: 0.5px;
  }
  95.1%, 95.3%, 95.5%, 95.7%, 95.9% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                -0.025em -0.05em 0 rgba(0, 255, 0, 0.75),
                0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    letter-spacing: 1px;
  }
  95.2%, 95.4%, 95.6%, 95.8% {
    text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
                0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
                -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    letter-spacing: 0px;
  }
}

/* Active state when clicked */
#dev-credit.active {
  animation: none;
  color: #ff2a6d;
  transform: scale(1.1);
  text-shadow: 0 0 10px rgba(255, 42, 109, 0.8);
}

/* Click feedback animation */
@keyframes glitch-text {
  0% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                -0.05em -0.025em 0 rgba(0, 255, 0, 0.75),
                0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    transform: translateX(0.01em);
  }
  14% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                -0.05em -0.025em 0 rgba(0, 255, 0, 0.75),
                0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    transform: translateX(-0.01em);
  }
  28% {
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                -0.05em -0.025em 0 rgba(0, 255, 0, 0.75),
                0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    transform: translateX(0.01em);
  }
  42% {
    text-shadow: -0.05em 0 0 rgba(255, 0, 0, 0.75),
                0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
                -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    transform: translateX(0);
  }
  57% {
    text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
                -0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
                -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    transform: translateX(0.02em);
  }
  71% {
    text-shadow: 0.05em 0.025em 0 rgba(255, 0, 0, 0.75),
                0.05em 0 0 rgba(0, 255, 0, 0.75),
                0 -0.05em 0 rgba(0, 0, 255, 0.75);
    transform: translateX(-0.02em);
  }
  85% {
    text-shadow: -0.05em 0 0 rgba(255, 0, 0, 0.75),
                -0.025em -0.025em 0 rgba(0, 255, 0, 0.75),
                -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    transform: translateX(0);
  }
  100% {
    text-shadow: -0.05em 0 0 rgba(255, 0, 0, 0.75),
                -0.025em -0.025em 0 rgba(0, 255, 0, 0.75),
                -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    transform: translateX(0);
  }
}

/* Responsive styles */
@media (max-width: 480px) {
  .ai-option { width: 80px; padding: 0.5rem; }
  .ai-selector h3 { font-size: 1.25rem; }
}

/* Aayush AI unlock notification */
.unlock-notification {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: unlock-background 2s ease;
}

.notification-content {
  width: 90%;
  max-width: 400px;
  background: linear-gradient(135deg, #0a0a0f 0%, #121225 100%);
  border: 2px solid var(--neon-magenta);
  box-shadow: 0 0 30px var(--neon-magenta);
  padding: 25px;
  text-align: center;
  position: relative;
  animation: unlock-glitch-in 1s ease forwards;
  overflow: hidden;
}

.notification-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 128, 0.2), transparent);
  transform: translateX(-100%);
  animation: unlock-shine 3s ease infinite;
}

.unlock-icon {
  font-size: 50px;
  margin-bottom: 15px;
  animation: unlock-pulse 2s infinite alternate;
}

.notification-content h3 {
  color: var(--neon-magenta);
  font-size: 28px;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px var(--neon-magenta);
}

.notification-content p {
  color: var(--text);
  margin-bottom: 25px;
  font-size: 16px;
  line-height: 1.4;
}

/* Animations for unlock notification */
@keyframes unlock-background {
  0% { background-color: rgba(0, 0, 0, 0); }
  30% { background-color: rgba(0, 0, 0, 0.9); }
  70% { background-color: rgba(0, 0, 0, 0.7); }
  100% { background-color: rgba(0, 0, 0, 0.8); }
}

@keyframes unlock-glitch-in {
  0% { transform: scale(0.8); opacity: 0; filter: blur(10px); }
  20% { transform: scale(1.1); opacity: 0.8; filter: blur(0px); }
  30% { transform: scale(0.95); opacity: 0.6; filter: blur(5px); }
  40% { transform: scale(1.05); opacity: 1; filter: blur(0px); }
  60% { transform: scale(0.98); opacity: 0.8; filter: blur(2px); }
  100% { transform: scale(1); opacity: 1; filter: blur(0px); }
}

@keyframes unlock-pulse {
  0% { text-shadow: 0 0 15px var(--neon-magenta); transform: scale(1); }
  100% { text-shadow: 0 0 30px var(--neon-magenta), 0 0 50px var(--neon-magenta); transform: scale(1.1); }
}

@keyframes unlock-shine {
  0% { transform: translateX(-100%); }
  20% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* Aayush AI Unlock Animation */
.unlock-sequence {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  animation: unlockBg 17s linear forwards;
}

.unlock-sequence.skippable {
  cursor: pointer;
}

.unlock-sequence .glitch-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 3em;
  color: #0ff;
  text-shadow: 2px 2px #ff0080;
  position: relative;
  animation: glitchText 0.5s infinite;
}

.unlock-sequence .progress-bar {
  width: 60%;
  height: 4px;
  background: #1a1a1a;
  margin-top: 2em;
  position: relative;
  overflow: hidden;
}

.unlock-sequence .progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #ff0080, #0ff);
  width: 0%;
  animation: fillProgress 17s linear forwards;
}

.unlock-sequence .skip-text {
  position: absolute;
  bottom: 2em;
  color: #666;
  font-size: 0.8em;
  opacity: 0;
  animation: fadeIn 0.5s 3s forwards;
}

.unlock-sequence .aayush-icon {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 2px solid #0ff;
  margin-bottom: 2em;
  position: relative;
  overflow: hidden;
}

.unlock-sequence .aayush-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: glitchImage 0.1s infinite;
}

.unlock-sequence .matrix-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  background: linear-gradient(rgba(0, 255, 255, 0.1), rgba(0, 255, 255, 0.1)),
              url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==');
}

@keyframes unlockBg {
  0% { background: rgba(0, 0, 0, 1); }
  95% { background: rgba(0, 0, 0, 0.95); }
  100% { background: rgba(0, 0, 0, 0); visibility: hidden; }
}

@keyframes glitchText {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

@keyframes glitchImage {
  0% { transform: translate(0); filter: hue-rotate(0deg); }
  10% { transform: translate(-5px, 5px); filter: hue-rotate(90deg); }
  20% { transform: translate(5px, -5px); filter: hue-rotate(180deg); }
  30% { transform: translate(-3px, 3px); filter: hue-rotate(270deg); }
  40% { transform: translate(3px, -3px); filter: hue-rotate(360deg); }
  50% { transform: translate(0); filter: hue-rotate(0deg); }
}

@keyframes fillProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   AI DIALOGUE BOX — The Architect taunts
   ═══════════════════════════════════════════════════════════════ */
.ai-dialogue {
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--neon-magenta);
  color: var(--neon-magenta);
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-style: italic;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.3px;
  max-width: 140px;
  word-break: break-word;
  box-shadow: 0 0 10px rgba(255, 42, 109, 0.3);
  position: relative;
}

.ai-dialogue::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom: 7px solid var(--neon-magenta);
  border-top: 0;
}

@keyframes dialogue-pop {
  0%   { transform: scale(0.7); opacity: 0; }
  70%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}

.ai-dialogue.pop {
  animation: dialogue-pop 0.35s ease-out forwards;
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL: HIDE SCROLLBARS EVERYWHERE
   ═══════════════════════════════════════════════════════════════ */
html {
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none;
}
* {
  scrollbar-width: none;
}

/* ═══════════════════════════════════════════════════════════════
   DESKTOP ≥ 769px — COMPACT LAYOUT, NO OVERFLOW
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 769px) {
  html, body {
    height: 100vh;
    overflow: hidden;
  }

  .cyberpunk-container {
    height: 100vh;
    overflow-y: auto;
  }

  /* Compact header */
  .game-header {
    margin: 6px auto 10px;
  }

  h1 {
    font-size: 28px;
  }

  .subtitle {
    font-size: 11px;
    letter-spacing: 2px;
    margin-top: 2px;
  }

  .developer-credit {
    margin-top: 4px;
  }

  /* Compact player setup cards */
  .players-container {
    padding: 6px 0;
    margin-bottom: 8px;
    gap: 16px;
  }

  .card-top {
    height: 100px;
  }

  .player-image {
    height: 100px;
  }

  .card-info {
    padding: 8px 14px;
    gap: 5px;
  }

  .player-name-input {
    padding: 6px;
    font-size: 15px;
  }

  .character-select-label {
    margin: 3px 0;
    font-size: 12px;
  }

  .character-select {
    gap: 5px;
    margin-top: 4px;
  }

  .avatar-thumb {
    width: 32px;
    height: 32px;
  }

  .character-name {
    font-size: 10px;
  }

  .avatar-button {
    padding: 3px;
  }

  /* Mode buttons */
  .controls {
    margin: 8px 0;
  }

  .main-button {
    min-width: 160px;
    height: 44px;
  }

  /* AI Selector compact */
  .ai-selector {
    margin: 0.7rem auto;
  }

  .ai-selector h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .ai-options {
    gap: 0.6rem;
  }

  .ai-option {
    width: 80px;
    padding: 0.45rem;
  }

  .ai-option img {
    width: 56px;
    height: 56px;
  }

  .ai-option span {
    font-size: 0.75rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE ≤ 768px — RESPONSIVE LAYOUT
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  html, body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .cyberpunk-container {
    padding: 10px 8px;
    min-height: 100svh;
    height: auto;
  }

  /* Header */
  .game-header {
    margin: 6px auto 12px;
  }

  h1 {
    font-size: 22px;
    letter-spacing: 0;
  }

  .subtitle {
    font-size: 10px;
    letter-spacing: 2px;
  }

  #dev-credit {
    font-size: 0.75rem;
  }

  /* Player setup — stack vertically */
  .players-container {
    flex-direction: column !important;
    align-items: center !important;
    padding: 8px 0 !important;
    margin-bottom: 10px !important;
    gap: 10px !important;
  }

  .player-setup {
    width: min(288px, 88vw) !important;
  }

  .card-top {
    height: 100px;
  }

  .player-image {
    height: 100px;
  }

  .card-info {
    padding: 8px 10px;
    gap: 5px;
  }

  .player-name-input {
    font-size: 15px;
    padding: 7px;
  }

  .avatar-thumb {
    width: 32px;
    height: 32px;
  }

  .character-name {
    font-size: 10px;
  }

  /* Mode buttons */
  .mode-buttons {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-button {
    min-width: 120px;
    height: 42px;
    font-size: 13px;
  }

  /* AI Selector */
  .ai-selector {
    margin: 0.7rem auto;
  }

  .ai-selector h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .ai-options {
    gap: 0.5rem;
  }

  .ai-option {
    width: 70px;
    padding: 0.4rem;
  }

  .ai-option img {
    width: 50px;
    height: 50px;
  }

  .ai-option span {
    font-size: 0.68rem;
  }

  /* Game layout */
  .game-layout {
    flex-direction: column !important;
    gap: 6px;
  }

  .player-side {
    flex-direction: row !important;
    width: 100% !important;
    justify-content: center;
    align-items: center;
    gap: 12px;
  }

  .side-avatar {
    width: 58px;
    height: 58px;
  }

  .side-name {
    font-size: 13px;
  }

  .player-side.left  { order: 1; }
  #mainBoard         { order: 2; }
  .player-side.right { order: 3; }

  /* Board */
  .board {
    gap: 5px;
    margin: 4px auto;
  }

  .mini-board {
    grid-template-columns: repeat(3, 32px);
    gap: 2px;
    padding: 4px;
  }

  .cell {
    width: 32px;
    height: 32px;
    font-size: 19px;
  }

  .giant-symbol {
    font-size: 58px;
  }

  /* Winner display */
  .hologram-text.active {
    font-size: 28px;
  }

  .winner-display {
    height: 80px;
    margin: 8px auto;
  }

  /* Controls */
  .controls {
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
    gap: 8px;
  }

  .cyber-button {
    width: 82%;
    max-width: 260px;
  }

  /* AI dialogue on mobile */
  .ai-dialogue {
    font-size: 11px;
    max-width: 115px;
    padding: 5px 7px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE ≤ 480px — EXTRA COMPACT
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  h1 {
    font-size: 18px;
  }

  .game-logo {
    max-width: 120px;
  }

  .player-setup {
    width: min(260px, 94vw) !important;
  }

  .card-top {
    height: 85px;
  }

  .player-image {
    height: 85px;
  }

  .avatar-thumb {
    width: 28px;
    height: 28px;
  }

  .character-select {
    gap: 4px;
  }

  /* Smaller board */
  .board {
    gap: 4px;
  }

  .mini-board {
    grid-template-columns: repeat(3, 26px);
    gap: 2px;
    padding: 3px;
  }

  .cell {
    width: 26px;
    height: 26px;
    font-size: 15px;
  }

  .giant-symbol {
    font-size: 46px;
  }

  .side-avatar {
    width: 48px;
    height: 48px;
  }

  .side-name {
    font-size: 12px;
  }

  .main-button {
    min-width: 108px;
    height: 38px;
    font-size: 12px;
  }

  .ai-option {
    width: 62px;
    padding: 0.3rem;
  }

  .ai-option img {
    width: 42px;
    height: 42px;
  }

  .ai-option span {
    font-size: 0.62rem;
  }
}
/* ---------------------------------------------------------------
   NEW 3-COLUMN SETUP LAYOUT  [P1] [MODE] [P2/AI]
   --------------------------------------------------------------- */

#players-setup {
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 14px !important;
  flex-wrap: nowrap !important;
  padding: 12px 0 8px !important;
  margin-bottom: 4px !important;
}

.right-slot {
  width: 240px;
  flex-shrink: 0;
}

.mode-center-panel {
  flex-shrink: 0;
  width: 148px;
  display: flex;
  align-items: stretch;
}

.mode-panel-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 8px;
  background: rgba(5, 217, 232, 0.04);
  border: 1px solid rgba(5, 217, 232, 0.18);
  border-radius: 6px;
}

.mode-vs-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--neon-blue);
  opacity: 0.7;
  text-transform: uppercase;
}

.mode-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}

.mode-btn {
  width: 100% !important;
  min-width: unset !important;
  height: 36px !important;
  font-size: 11px !important;
  letter-spacing: 1.5px;
  padding: 0 8px !important;
  /* Smaller corner cut so text isn't clipped on short buttons */
  clip-path: polygon(
    0 0,
    calc(100% - 6px) 0,
    100% 6px,
    100% 100%,
    6px 100%,
    0 calc(100% - 6px)
  ) !important;
}

.mode-btn.selected-mode {
  border-color: var(--neon-yellow) !important;
  color: var(--neon-yellow) !important;
  box-shadow: 0 0 12px rgba(253, 254, 3, 0.35) !important;
}

.jack-in-btn {
  width: 100% !important;
  min-width: unset !important;
  height: 40px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 1.5px;
  background: rgba(5, 217, 232, 0.1) !important;
  border-color: var(--neon-blue) !important;
  color: var(--neon-blue) !important;
  box-shadow: 0 0 14px rgba(5, 217, 232, 0.3) !important;
  margin-top: 4px;
}

.jack-in-btn:hover {
  background: rgba(5, 217, 232, 0.2) !important;
  box-shadow: 0 0 22px rgba(5, 217, 232, 0.6) !important;
}

.ai-name-display {
  text-align: center;
  pointer-events: none;
  background: transparent !important;
  border: none !important;
  cursor: default !important;
}

.player-side.right {
  overflow: visible !important;
}

.ai-dialogue {
  margin-top: 8px;
  width: 130px;
  z-index: 10;
}

@media (min-width: 769px) {
  #players-setup { flex-wrap: nowrap !important; }
  .right-slot { width: 240px; }
  .mode-center-panel { width: 140px; }
}

@media (max-width: 768px) {
  #players-setup {
    flex-wrap: wrap !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .right-slot { width: min(240px, 88vw); }
  .mode-center-panel {
    width: min(320px, 88vw);
    order: 3;
  }
  .mode-buttons-stack {
    flex-direction: row;
    justify-content: center;
  }
  .mode-btn {
    width: auto !important;
    min-width: 90px !important;
    font-size: 10px !important;
  }
  .jack-in-btn { width: 160px !important; }
  .mode-panel-inner { padding: 10px; gap: 8px; }
}

/* ── Utility ─────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Multiplayer Lobby Overlay ───────────────────────────────────── */
.mp-lobby-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.mp-lobby-panel {
  background: var(--card-bg, #0d0d1a);
  border: 1px solid var(--neon-blue, #05d9e8);
  border-radius: 12px;
  padding: 2rem;
  width: min(420px, 90vw);
  text-align: center;
}
.mp-title {
  font-family: var(--heading-font, 'Rajdhani', sans-serif);
  font-size: 1.4rem; color: var(--neon-blue, #05d9e8);
  margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 2px;
}
.mp-step { margin-bottom: 1rem; }
.mp-label {
  display: block; font-size: .85rem; color: #888;
  margin-bottom: .4rem; text-transform: uppercase; letter-spacing: 1px;
}
.mp-code-input {
  width: 100%; padding: .6rem; font-size: 1.1rem; text-align: center;
  background: rgba(255,255,255,.06); border: 1px solid #333;
  color: #fff; border-radius: 6px; letter-spacing: 3px;
}
.mp-code-input:focus { outline: none; border-color: var(--neon-blue, #05d9e8); }
.mp-room-code {
  font-size: 2rem; font-weight: 700; letter-spacing: 6px;
  color: var(--neon-pink, #ff2a6d); margin: .6rem 0;
}
.mp-status {
  font-size: .85rem; color: #aaa; margin-top: .8rem;
}

/* ── Mobile: sound controls + image clipping fixes ───────────────── */
@media (max-width: 768px) {
  .sound-controls {
    bottom: 8px;
    right: 8px;
    gap: 6px;
  }
  .sound-controls .icon-button {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  /* Ensure bottom of page isn't hidden behind fixed sound-controls */
  body { padding-bottom: 50px; }
}

@media (max-width: 480px) {
  .sound-controls {
    bottom: 4px;
    right: 4px;
    gap: 4px;
  }
  .sound-controls .icon-button {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
}

/* ══════════════════════════════════════════════════════════════════
   TIMED MODE — per-move countdown timer
   ══════════════════════════════════════════════════════════════════ */

#move-timer {
  position: fixed;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
  cursor: default;
  /* conic-gradient progress ring */
  background: conic-gradient(
    var(--neon-blue, #05d9e8) var(--timer-deg, 360deg),
    rgba(5, 217, 232, 0.12) 0deg
  );
}
#move-timer::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--deep-black, #0a0a0f);
}
.timer-count {
  position: relative;
  z-index: 1;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--neon-blue, #05d9e8);
  line-height: 1;
}
#move-timer.timer-warn {
  background: conic-gradient(#ffb300 var(--timer-deg, 360deg), rgba(255,179,0,.12) 0deg);
  box-shadow: 0 0 12px rgba(255,179,0,.6);
}
#move-timer.timer-warn .timer-count { color: #ffb300; }

#move-timer.timer-urgent {
  background: conic-gradient(#ff3d00 var(--timer-deg, 360deg), rgba(255,61,0,.12) 0deg);
  box-shadow: 0 0 18px rgba(255,61,0,.8);
  animation: timerUrgentPulse 0.5s ease-in-out infinite;
}
#move-timer.timer-urgent .timer-count { color: #ff4500; }

@keyframes timerUrgentPulse {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50%       { transform: translateY(-50%) scale(1.08); }
}

/* ── Timed-mode toggle button (in center mode panel) ── */
.timed-toggle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.timed-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  color: #aaa;
  letter-spacing: 1px;
}
.timed-toggle {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 10px;
  border: 1px solid #555;
  background: rgba(255,255,255,.04);
  color: #888;
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
}
.timed-toggle.active {
  border-color: var(--neon-blue, #05d9e8);
  background: rgba(5,217,232,.12);
  color: var(--neon-blue, #05d9e8);
  box-shadow: 0 0 8px rgba(5,217,232,.4);
}

/* ── Tournament format picker ── */
.tournament-format-picker {
  margin-top: 0.6rem;
  text-align: center;
}
.format-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  color: #888;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}
.format-btns {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════════════
   TOURNAMENT — bracket overlay
   ══════════════════════════════════════════════════════════════════ */

.tournament-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn .3s ease;
}
.tournament-panel {
  position: relative;
  width: min(460px, 92vw);
  padding: 2rem 2.5rem;
  background: rgba(10,10,20,.95);
  border: 1px solid var(--neon-blue, #05d9e8);
  box-shadow: 0 0 40px rgba(5,217,232,.3), inset 0 0 30px rgba(5,217,232,.06);
  text-align: center;
}
.tourn-meta {
  display: flex;
  justify-content: space-between;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  color: #777;
  letter-spacing: 2px;
  margin-bottom: 1.4rem;
}
.tourn-scores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}
.tourn-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  min-width: 120px;
}
.tourn-player-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  color: #ccc;
  letter-spacing: 1px;
  text-transform: uppercase;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tourn-score {
  font-family: 'Rajdhani', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--neon-blue, #05d9e8);
  line-height: 1;
  text-shadow: 0 0 20px var(--neon-blue, #05d9e8);
}
.tourn-pips {
  display: flex;
  gap: 6px;
}
.tourn-pip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #555;
  background: transparent;
  transition: all .3s;
}
.tourn-pip.filled {
  background: var(--neon-blue, #05d9e8);
  border-color: var(--neon-blue, #05d9e8);
  box-shadow: 0 0 6px var(--neon-blue, #05d9e8);
}
.tourn-vs {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #555;
}

/* ══════════════════════════════════════════════════════════════════
   BOUNTY POSTER — tournament champion
   ══════════════════════════════════════════════════════════════════ */

.bounty-poster {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  animation: fadeIn .4s ease;
}
.bounty-content {
  position: relative;
  width: min(380px, 90vw);
  padding: 2rem 2rem 1.6rem;
  background: #1a0f07;
  border: 3px solid #8b6914;
  box-shadow: 0 0 30px rgba(200,155,40,.35), inset 0 0 50px rgba(0,0,0,.5);
  text-align: center;
  /* torn-paper / aged look */
  clip-path: polygon(0 2%, 4% 0, 96% 0, 100% 2%, 100% 98%, 97% 100%, 3% 100%, 0 98%);
}
.bounty-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(139,105,20,.04) 3px,
    rgba(139,105,20,.04) 4px
  );
  pointer-events: none;
}
.bounty-header {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #d4a017;
  letter-spacing: 8px;
  text-shadow: 2px 2px 0 #000, 0 0 20px rgba(212,160,23,.4);
  margin-bottom: 0.2rem;
}
.bounty-subheader {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  color: #a07a20;
  letter-spacing: 4px;
  border-top: 1px solid #8b6914;
  border-bottom: 1px solid #8b6914;
  padding: 0.25rem 0;
  margin-bottom: 1rem;
}
.bounty-avatar {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border: 3px solid #8b6914;
  border-radius: 4px;
  filter: sepia(30%) contrast(1.05);
  margin-bottom: 0.8rem;
}
.bounty-dead-or-alive {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: #a07a20;
  margin-bottom: 0.3rem;
}
.bounty-winner-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #d4a017;
  letter-spacing: 3px;
  text-shadow: 1px 1px 0 #000;
}
.bounty-series {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0.4rem 0 0.1rem;
}
.bounty-series-info {
  font-size: 0.7rem;
  color: #888;
  letter-spacing: 2px;
  margin-bottom: 0.8rem;
}
.bounty-reward {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #d4a017;
  letter-spacing: 2px;
  border-top: 1px solid #8b6914;
  padding-top: 0.6rem;
  margin-bottom: 1rem;
}

/* ══════════════════════════════════════════════════════════════════
   STREAK / BOUNTY SYSTEM
   ══════════════════════════════════════════════════════════════════ */

.streak-banner {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10,10,20,.92);
  border: 1px solid var(--neon-pink, #ff2a6d);
  color: var(--neon-pink, #ff2a6d);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 0.45rem 1.4rem;
  border-radius: 4px;
  z-index: 150;
  box-shadow: 0 0 18px rgba(255,42,109,.35);
  animation: slideUpFade .4s ease;
  white-space: nowrap;
  pointer-events: none;
}
.streak-banner.unlock-banner {
  border-color: var(--neon-blue, #05d9e8);
  color: var(--neon-blue, #05d9e8);
  box-shadow: 0 0 18px rgba(5,217,232,.4);
}
@keyframes slideUpFade {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Board skins unlocked by win streaks ── */
#mainBoard.skin-neon-grid .mini-board {
  border-color: var(--neon-blue, #05d9e8) !important;
  box-shadow: 0 0 8px rgba(5,217,232,.25);
}
#mainBoard.skin-neon-grid .cell:hover {
  background: rgba(5,217,232,.14) !important;
}
#mainBoard.skin-blood-red .mini-board {
  border-color: #ff1744 !important;
  box-shadow: 0 0 10px rgba(255,23,68,.3);
}
#mainBoard.skin-blood-red .mini-board.active {
  box-shadow: 0 0 16px rgba(255,23,68,.6) !important;
}
#mainBoard.skin-blood-red .cell:hover {
  background: rgba(255,23,68,.15) !important;
}
#mainBoard.skin-gold-chrome .mini-board {
  border-color: #d4a017 !important;
  box-shadow: 0 0 12px rgba(212,160,23,.4);
}
#mainBoard.skin-gold-chrome .mini-board.active {
  box-shadow: 0 0 22px rgba(212,160,23,.7) !important;
}
#mainBoard.skin-gold-chrome .cell:hover {
  background: rgba(212,160,23,.12) !important;
}

/* ══════════════════════════════════════════════════════════════════
   GHOST REPLAY — overlay & controls
   ══════════════════════════════════════════════════════════════════ */

.replay-overlay {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10,10,20,.94);
  border: 1px solid var(--neon-blue, #05d9e8);
  box-shadow: 0 0 20px rgba(5,217,232,.25);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  z-index: 160;
  min-width: min(400px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: slideUpFade .35s ease;
}
.replay-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  color: #888;
  letter-spacing: 1px;
}
.replay-title {
  color: var(--neon-blue, #05d9e8);
  font-weight: 700;
  font-size: 0.85rem;
}
.replay-controls {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
#replay-move-counter {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  color: #aaa;
  flex: 1;
  text-align: center;
}
.replay-upload-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* ── Spectate link row in multiplayer lobby ── */
.mp-spectate-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  margin: 0.4rem 0;
  flex-wrap: wrap;
}
.mp-spectate-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  color: #888;
  letter-spacing: 1px;
}

