/* 16-bit .ca Style */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
  --arcade-dark: #111111;
  --arcade-frame: #222222;
  --arcade-accent: #ff0066;
  --arcade-screen: #001122;
  --arcade-text: #00ffbb;
}

body {
  font-family: 'Press Start 2P', cursive;
  background-color: #222;
  color: var(--arcade-text);
  letter-spacing: 1px;
  line-height: 1.4;
  overflow-x: hidden;
  padding: 0;
  margin: 0;
  position: relative;
}

/* Arcade cabinet frame */
.arcade-cabinet {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 10px;
  background-color: var(--arcade-frame);
  border: 8px solid var(--arcade-dark);
  border-radius: 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8), inset 0 0 10px rgba(0, 0, 0, 0.5);
  min-height: 100vh;
  box-sizing: border-box;
}

/* Screen effect */
.arcade-screen {
  position: relative;
  background-color: var(--arcade-screen);
  border-radius: 10px;
  padding: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
  border: 4px solid var(--arcade-dark);
}

/* Scanline effect */
.arcade-screen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 10;
}

/* CRT flicker overlay */
#arcade-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(120, 235, 255, 0.03);
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.1s;
}

/* Header text */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Press Start 2P', cursive;
  text-transform: uppercase;
  color: var(--arcade-accent);
  text-shadow: 2px 2px 0px var(--arcade-dark);
  letter-spacing: 2px;
}

/* Pixelated cards */
.card {
  background-color: var(--arcade-dark);
  border: 3px solid var(--arcade-accent);
  border-radius: 0;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
  transform: translateZ(0);
}

.card-header {
  border-bottom: 3px solid var(--arcade-accent);
  background-color: var(--arcade-dark) !important;
  color: var(--arcade-text) !important;
  text-align: center;
  font-weight: bold;
}

.card-body {
  padding: 15px;
}

/* Buttons */
.btn {
  font-family: 'Press Start 2P', cursive;
  border-radius: 0;
  border: 3px solid;
  box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5);
  transition: all 0.1s;
  text-transform: uppercase;
  font-size: 0.8rem;
  padding: 10px 15px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);
}

.btn-primary {
  background-color: #0066ff;
  border-color: #00ccff;
  color: white;
}

.btn-success {
  background-color: #00aa44;
  border-color: #00ff66;
  color: white;
}

.btn-danger {
  background-color: #aa0000;
  border-color: #ff0033;
  color: white;
}

.btn-warning {
  background-color: #aa5500;
  border-color: #ffaa00;
  color: white;
}

/* Form elements */
.form-control {
  background-color: #000;
  border: 2px solid var(--arcade-accent);
  border-radius: 0;
  color: var(--arcade-text);
  font-family: 'Press Start 2P', cursive;
  font-size: 0.8rem;
  padding: 12px;
  height: auto;
}

.form-control:focus {
  box-shadow: none;
  border-color: #00ffbb;
  background-color: #001122;
  color: #00ffbb;
}


/* Make input fields larger on mobile for better touch targets */
@media (max-width: 768px) {
  .form-control {
    font-size: 16px; /* Prevents iOS from zooming in on focus */
    padding: 10px;
  }
  
  .input-group .btn {
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

/*every td in the first tr in #players-body*/
#players-body tr:first-child td{
    background-color: yellow;
    animation: infiniteStrobeYellowRed 1s infinite linear;
  }

@keyframes infiniteStrobeYellowRed {
  0%, 100% {
    background-color: yellow;
  }
  50% {
    background-color: red;
  }
}

@keyframes infiniteStrobeYellowRedText {
    0%, 100% {
      color: yellow;
    }
    50% {
      color: red;
    }
  }

/* Tables */
.table {
  border: 3px solid var(--arcade-accent);
  color: white;
}

.table thead th {
  background-color: var(--arcade-dark);
  border-bottom: 3px solid var(--arcade-accent);
  text-transform: uppercase;
  font-size: 0.8rem;
  color: lime;
}

.table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.table tr.highlight {
  background-color: rgba(0, 255, 200, 0.15);
}

/* Emoji styling - make them more 16-bit like */
.emoji-container {
  position: relative;
  width: 100%;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.emoji {
  font-size: 8rem;
  filter: saturate(1.5) contrast(1.2);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
  transform-style: preserve-3d;
  position: relative;
  z-index: 35;
  cursor: pointer;
}

.emoji:active {
  transform: scale(0.9) rotateY(10deg);
}

/* Loading screen */
#loading-overlay {
  background-color: var(--arcade-dark);
  color: var(--arcade-text);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#loading-overlay h4 {
  font-family: 'Press Start 2P', cursive;
  color: var(--arcade-text);
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Floating Emoji Animation */
@keyframes float {
    0% { transform: translateY(0px); opacity: 1; scale: 1;}
    100% { transform: translateY(-65vh); opacity: 0; scale: 0.2;}
}

#floating-emojis {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    pointer-events: none;
}

.floating-emoji {
    position: absolute;
    animation: float 2s ease-out forwards;
    pointer-events: none;
    opacity: 1;
    font-size: 2rem;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    z-index: 25;
}

/* Upgrade cards */
.upgrade-card {
  background-color: var(--arcade-dark);
  border: 3px solid #00aaff;
  border-radius: 0;
  transition: all 0.2s;
}

.upgrade-card:hover {
  transform: translateY(-5px);
  border-color: var(--arcade-accent);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.5);
}

.upgrade-icon {
  font-size: 2.5rem;
  filter: saturate(1.5) contrast(1.2);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

/* Tabs styling */
.nav-tabs {
  border-bottom: 3px solid var(--arcade-accent);
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.nav-tabs .nav-item {
  margin-bottom: -3px;
  flex-grow: 1;
  flex-basis: 0;
  min-width: 100px;
}

.nav-tabs .nav-link {
  font-family: 'Press Start 2P', cursive;
  border-radius: 0;
  border: 3px solid var(--arcade-accent);
  padding: 8px 10px;
  margin-right: 2px;
  background-color: var(--arcade-dark);
  color: var(--arcade-text);
  font-size: 0.7rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.nav-tabs .nav-link.active {
  background-color: var(--arcade-accent);
  color: white;
  border-color: var(--arcade-accent);
}

/* Toasts */
.toast {
  background-color: var(--arcade-dark);
  border: 3px solid;
  border-radius: 0;
}

.toast-header {
  border-bottom: 3px solid;
  border-radius: 0;
}

/* Pixel corner decorations */
.pixel-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: var(--arcade-accent);
  z-index: 5;
}

.pixel-corner-tl {
  top: 0;
  left: 0;
  box-shadow: 12px 0 0 0 var(--arcade-accent), 0 12px 0 0 var(--arcade-accent);
}

.pixel-corner-tr {
  top: 0;
  right: 0;
  box-shadow: -12px 0 0 0 var(--arcade-accent), 0 12px 0 0 var(--arcade-accent);
}

.pixel-corner-bl {
  bottom: 0;
  left: 0;
  box-shadow: 12px 0 0 0 var(--arcade-accent), 0 -12px 0 0 var(--arcade-accent);
}

.pixel-corner-br {
  bottom: 0;
  right: 0;
  box-shadow: -12px 0 0 0 var(--arcade-accent), 0 -12px 0 0 var(--arcade-accent);
}

/* Control panel styling */
.control-panel {
  background-color: #333;
  border-top: 8px solid var(--arcade-dark);
  padding: 20px;
  display: flex;
  justify-content: center;
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.5);
}

.arcade-joystick {
  width: 80px;
  height: 80px;
  background-color: var(--arcade-accent);
  border-radius: 50%;
  margin: 0 20px;
  position: relative;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3);
}

.arcade-joystick::before {
  content: "";
  position: absolute;
  top: -30px;
  left: 30px;
  width: 20px;
  height: 50px;
  background-color: #000;
  border-radius: 10px;
}

.arcade-button {
  width: 60px;
  height: 60px;
  background-color: #ff0000;
  border-radius: 50%;
  margin: 10px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.3);
}

/* CRT edges */
.crt-frame {
  position: absolute;
  border: 10px solid var(--arcade-dark);
  border-radius: 20px;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  pointer-events: none;
  z-index: 9;
  box-shadow: inset 0 0 10px rgba(0, 0, 255, 0.3);
  overflow: hidden;
}

/* CRT effect - curved edges */
.crt-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.3) 100%
  );
  pointer-events: none;
  z-index: 8;
}

/* Color adjustments for specific elements */
.counter {
  color: #00ffbb;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.stats {
  color: #ffff00;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

/* 16-bit animation for auto-clicker */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.auto-click-indicator {
  animation: pulse 2s infinite;
  color: #ffaa00;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

/* Game title pixelated decoration */
.game-title {
  position: relative;
  text-align: center;
  padding: 10px 0;
  margin-bottom: 20px;
}

.game-title h1 {
  font-size: 2.5rem;
  margin: 0;
  padding: 10px;
  color: #00ffbb;
  text-shadow: 4px 4px 0 #000;
}

.game-title::before, .game-title::after {
  content: "";
  position: absolute;
  height: 4px;
  left: 50px;
  right: 50px;
  background: repeating-linear-gradient(
    90deg,
    var(--arcade-accent),
    var(--arcade-accent) 10px,
    transparent 10px,
    transparent 20px
  );
}

.game-title::before {
  top: 0;
}

.game-title::after {
  bottom: 0;
}

/* Chat styling */
.chat-messages {
  background-color: var(--arcade-dark);
  border: 2px solid var(--arcade-accent);
}

.self-message {
  background-color: #005533;
  border: 2px solid #00aa66;
}

.other-message {
  background-color: #220033;
  border: 2px solid #6600aa;
}

/* Glitch animation */
@keyframes glitch {
  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); }
}

.glitch {
  animation: glitch 0.2s linear;
}

/* Make player-items more arcade-like */
.player-item {
  background-color: var(--arcade-dark);
  border: 2px solid #00aaff;
  color: #00ffbb;
  z-index: 999999;
}

.player-item:hover {
  border-color: var(--arcade-accent);
  background-color: #001144;
}

.sabotage-item {
  background-color: var(--arcade-dark);
  border: 2px solid #ff0033;
  color: #ffaa00;
}

/* Adjustments for existing elements */
.bg-primary {
  background-color: #0066ff !important;
}

.bg-success {
  background-color: #00aa44 !important;
}

.bg-info {
  background-color: #0099cc !important;
}

.bg-danger {
  background-color: #aa0000 !important;
}

.text-white {
  color: #ffffff !important;
}

.text-muted {
  color: #00aaaa !important;
}

/* Override Bootstrap Tab Content */
.tab-content {
  background-color: var(--arcade-dark);
  border: 3px solid var(--arcade-accent);
  border-top: none;
}

/* Spectator mode banner */
#spectator-banner .alert-warning {
  background-color: var(--arcade-dark);
  border: 3px solid #ffaa00;
  color: #ffff00;
}

/* Game key displays */
.game-key {
  background-color: var(--arcade-dark);
  color: #00ffbb;
  border: 2px solid var(--arcade-accent);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  .emoji-container {
    height: 150px;
  }
  
  .emoji {
    font-size: 5rem;
  }
  
  h1, h2, h3 {
    font-size: 1.5rem;
  }
  
  .game-title h1 {
    font-size: 1.8rem;
  }
  
  .counter {
    font-size: 1.5rem;
  }
  
  .stats {
    font-size: 0.9rem;
  }
  
  .btn {
    font-size: 0.7rem;
    padding: 8px 12px;
  }
  
  .card-body {
    padding: 10px;
  }
  
  .nav-tabs .nav-link {
    font-size: 0.6rem;
    padding: 5px 8px;
  }
  
  .upgrade-icon {
    font-size: 1.8rem;
  }
  
  .control-panel {
    display: none; /* Hide on mobile to save space */
  }
  
  .table {
    font-size: 0.7rem;
  }
  
  .pixel-corner {
    width: 8px;
    height: 8px;
  }
  
  .pixel-corner-tl {
    box-shadow: 8px 0 0 0 var(--arcade-accent), 0 8px 0 0 var(--arcade-accent);
  }
  
  .pixel-corner-tr {
    box-shadow: -8px 0 0 0 var(--arcade-accent), 0 8px 0 0 var(--arcade-accent);
  }
  
  .pixel-corner-bl {
    box-shadow: 8px 0 0 0 var(--arcade-accent), 0 -8px 0 0 var(--arcade-accent);
  }
  
  .pixel-corner-br {
    box-shadow: -8px 0 0 0 var(--arcade-accent), 0 -8px 0 0 var(--arcade-accent);
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .emoji {
    font-size: 4rem;
  }
  
  .game-title h1 {
    font-size: 1.5rem;
  }
  
  .counter {
    font-size: 1.2rem;
  }
  
  .stats {
    font-size: 0.8rem;
  }
  
  .game-key {
    font-size: 0.7rem;
    padding: 3px;
  }
  
  .btn-sm {
    font-size: 0.6rem;
    padding: 3px 6px;
  }
}

/* Adjust for notches and safe areas on modern phones */
@supports (padding: max(0px)) {
  .arcade-cabinet {
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
}

/* Spectator Badge */
.spectator-icon {
  font-style: normal;
  margin-right: 4px;
}

.spectator-badge {
  background-color: rgba(255, 193, 7, 0.8);
  color: #000;
  border-radius: 16px;
  padding: 2px 8px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rank-container {
  display: flex;
  align-items: center;
  gap: 4px;
}

#spectator-banner {
  position: relative;
  z-index: 100;
}

#spectator-info {
  font-weight: normal;
  font-style: italic;
  margin: 0 8px;
}



/* Fix for upgrade cards on mobile */
@media (max-width: 576px) {
  .col-md-4.col-sm-6 {
    padding-left: 8px;
    padding-right: 8px;
  }
  
  .upgrade-card {
    margin-bottom: 16px;
  }
  
  .upgrade-card .card-body {
    padding: 10px 8px;
  }
  
  .upgrade-icon {
    margin-bottom: 5px;
  }
  
  .upgrade-card .card-title {
    font-size: 0.7rem;
    margin-bottom: 5px;
    color: white;
  }
  
  .upgrade-card .card-text {
    font-size: 0.4rem;
  }
}



/* Fix chat on mobile */
@media (max-width: 768px) {
  .chat-messages {
    height: fit-content;
    max-height: 50vh;
  }
  
  .message-header {
    font-size: 0.7rem;
  }
  
  .message-content {
    font-size: 0.8rem;
  }
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--arcade-dark);
  border: 1px solid var(--arcade-accent);
}

::-webkit-scrollbar-thumb {
  background: var(--arcade-accent);
  border: 2px solid var(--arcade-dark);
}

::-webkit-scrollbar-thumb:hover {
  background: #ff3385;
}

/* Fix floating emoji positioning on mobile */
@media (max-width: 768px) {
  #floating-emojis {
    width: 100%;
    height: 100%;
  }
  
  .floating-emoji {
    font-size: 1.5rem;
  }
}

/* Prevent text selection */
.arcade-cabinet {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Additional touch optimizations */
@media (max-width: 768px) {
  /* Make upgrade cards more tappable */
  .upgrade-card {
    min-height: 150px;
  }
  
  /* Fix for table */
  .table td, .table th {
    padding: 5px;
  }
}

.customization-title{
    color: white;
}

/* Arcade-style Sabotage Tab CSS */

/* Main container */
.arcade-attack-container {
    position: relative;
    padding: 0;
    color: #00ffbb;
  }
  
  /* Title area */
  .attack-title {
    position: relative;
    border-bottom: 2px solid var(--arcade-accent);
    padding-bottom: 15px;
    margin-bottom: 20px;
  }
  
  .attack-title h3 {
    font-size: 1.8rem;
    color: #ff0066;
    text-shadow: 3px 3px 0 #000;
    letter-spacing: 3px;
    margin-bottom: 5px;
  }
  
  .attack-subtitle {
    color: #ffff00;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-top: -5px;
  }
  
  .pixel-decoration {
    height: 4px;
    background: repeating-linear-gradient(
      90deg,
      var(--arcade-accent),
      var(--arcade-accent) 10px,
      transparent 10px,
      transparent 20px
    );
    margin-bottom: 10px;
  }
  
  .scanline-small {
    height: 2px;
    background: repeating-linear-gradient(
      90deg,
      rgba(0, 255, 187, 0.5),
      rgba(0, 255, 187, 0.5) 5px,
      transparent 5px,
      transparent 10px
    );
    margin: 10px auto;
    width: 80%;
  }
  
  /* Attack Screen */
  .attack-screen {
    background-color: rgba(0, 0, 0, 0.3);
    border: 3px solid var(--arcade-accent);
    padding: 15px;
    position: relative;
    overflow: hidden;
  }
  
  .attack-screen::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 2px
    );
    pointer-events: none;
    z-index: 1;
  }
  
  .attack-screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #00aaff;
  }
  
  /* Blinking text effect */
  .blink-text {
    animation: blink-text 1.2s infinite;
    color: #ffff00;
    font-weight: bold;
    letter-spacing: 1px;
  }
  
  @keyframes blink-text {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.5; }
  }
  
  /* Health bar style */
  .health-bar {
    width: 120px;
    height: 12px;
    background-color: #333;
    border: 2px solid #00aaff;
  }
  
  .health-bar-fill {
    height: 100%;
    width: 80%;
    background-color: #00ff00;
    transition: width 0.3s;
  }
  
  /* Search input styling */
  .retro-input-group {
    border: 2px solid #00aaff;
    background-color: #001133;
  }
  
  .retro-input {
    background-color: #001133 !important;
    border: none !important;
    color: #00ffbb !important;
    letter-spacing: 1px;
    padding: 10px 15px !important;
    height: auto !important;
  }
  
  .retro-input::placeholder {
    color: rgba(0, 255, 187, 0.5);
  }
  
  .retro-btn {
    background-color: #00aaff;
    color: #000033;
    border: none;
    font-weight: bold;
    padding: 10px 20px;
    letter-spacing: 1px;
  }
  
  .retro-btn:hover {
    background-color: #00ddff;
    color: #000033;
  }
  
  /* Players grid */
  .players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 10px 0;
  }
  
  .player-grid-item {
    background-color: #001133;
    border: 2px solid #00aaff;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
  }
  
  .player-grid-item:hover {
    border-color: #ff0066;
    transform: scale(1.05);
  }
  
  .player-grid-item.selected {
    border-color: #ff0066;
    box-shadow: 0 0 10px #ff0066;
  }
  
  .player-avatar {
    font-size: 2rem;
    margin-bottom: 10px;
  }
  
  .player-name {
    font-size: 0.8rem;
    margin-bottom: 5px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .player-clicks {
    font-size: 0.7rem;
    color: #00ffbb;
  }
  
  .player-grid-placeholder {
    grid-column: 1 / -1;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 30px;
    border: 2px dashed #00aaff;
  }
  
  /* Target info section */
  .target-info {
    display: flex;
    align-items: center;
    background-color: #001133;
    border: 2px solid #00aaff;
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .target-avatar {
    font-size: 3rem;
    margin-right: 20px;
  }
  
  .target-data {
    flex: 1;
  }
  
  .target-name {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 5px;
  }
  
  .target-stats {
    display: flex;
    gap: 15px;
  }
  
  .stat {
    font-size: 0.8rem;
    color: #00ffbb;
  }
  
  /* Attack types navigation */
  .attack-types-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
  }
  
  .attack-type-btn {
    background-color: #001133;
    border: 2px solid #00aaff;
    color: #00ffbb;
    padding: 8px 15px;
    flex: 1;
    text-align: center;
    cursor: pointer;
    font-size: 0.8rem;
    letter-spacing: 1px;
  }
  
  .attack-type-btn.active {
    background-color: #00aaff;
    color: #000033;
    font-weight: bold;
  }
  
  /* Attack cards */
  .attack-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
  }
  
  .attack-card {
    background-color: #001133;
    border: 2px solid #ff3355;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
  }
  
  .attack-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 0 #000;
  }
  
  .attack-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .attack-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #ff3355;
  }
  
  .attack-name {
    font-size: 0.8rem;
    color: #ffffff;
    margin-bottom: 5px;
  }
  
  .attack-desc {
    font-size: 0.7rem;
    color: #bbbbbb;
    margin-bottom: 10px;
  }
  
  .attack-cost {
    font-size: 0.9rem;
    color: #ff3355;
    font-weight: bold;
  }
  
  /* Attack modal */
  .attack-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .attack-modal-content {
    background-color: #001133;
    border: 3px solid #ff0066;
    width: 90%;
    max-width: 500px;
    position: relative;
  }
  
  .attack-modal-header {
    background-color: #ff0066;
    color: #ffffff;
    padding: 10px 15px;
    text-align: center;
  }
  
  .attack-modal-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 1.2rem;
    letter-spacing: 2px;
  }
  
  .attack-modal-body {
    padding: 20px;
  }
  
  .attack-animation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }
  
  .attacker, .target {
    font-size: 1.5rem;
    padding: 10px;
    background-color: #000;
    border: 2px solid #00aaff;
    width: 100px;
    text-align: center;
  }
  
  .attack-beam {
    flex: 1;
    display: flex;
    height: 10px;
    margin: 0 10px;
  }
  
  .beam-segment {
    flex: 1;
    height: 100%;
    background-color: #ff0066;
    animation: beam-pulse 0.5s infinite alternate;
  }
  
  .beam-segment:nth-child(2) {
    animation-delay: 0.2s;
  }
  
  .beam-segment:nth-child(3) {
    animation-delay: 0.4s;
  }
  
  @keyframes beam-pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
  }
  
  .attack-details {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border: 2px solid #00aaff;
  }
  
  .attack-details p {
    margin-bottom: 5px;
    font-size: 0.9rem;
  }
  
  .attack-modal-footer {
    display: flex;
    gap: 10px;
    padding: 15px;
    justify-content: center;
  }
  
  .retro-btn-danger {
    background-color: #ff0066;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    letter-spacing: 1px;
  }

  
  .retro-btn-secondary {
    background-color: #333;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    letter-spacing: 1px;
  }
  
  /* Attack success animation */
  .attack-animation-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 0, 102, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: flash 0.5s forwards;
  }
  
  @keyframes flash {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
  }
  
  .attack-success-text {
    font-size: 3rem;
    color: #ffffff;
    text-shadow: 3px 3px 0 #000;
    animation: shake 0.5s forwards;
  }
  
  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
  }
  
  /* Mobile optimizations */
  @media (max-width: 768px) {
    .players-grid {
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .attack-cards-container {
      grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    
    .attack-types-nav {
      flex-direction: column;
    }
    
    .attacker, .target {
      width: 80px;
      font-size: 1rem;
    }
    
    .attack-title h3 {
      font-size: 1.5rem;
    }
    
    .attack-modal-content {
      width: 95%;
    }
  }

  /* Arcade Chat Styles */
.arcade-chat-container {
    position: relative;
    background-color: var(--arcade-dark);
    border: 3px solid var(--arcade-accent);
    overflow: hidden;
}

.chat-title-section {
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid var(--arcade-accent);
}

.chat-title-section h3 {
    color: #00ffbb;
    text-shadow: 3px 3px 0 #000;
    letter-spacing: 3px;
}

.chat-mode-selector {
    display: flex;
    gap: 10px;
}

.chat-mode-btn {
    background-color: var(--arcade-dark);
    border: 2px solid #00aaff;
    color: #00ffbb;
    padding: 8px 15px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
}

.chat-mode-btn.active {
    background-color: #00aaff;
    color: #000033;
}

.status-indicator {
    color: #ffff00;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.chat-screen {
    position: relative;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.15);
}

.chat-screen::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1;
}

.chat-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00aaff;
    position: relative;
    z-index: 2;
}

.ownedbg{
    background-color: #006e42;
}

.channel-name {
    color: #00ffbb;
    font-weight: bold;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.iconImg{
    max-height: 4rem;
    min-height: 4rem;
}

.smallIconImg{
    max-height: 2rem;
    min-height: 2rem;
}

.midIconImg{
    max-height: 5rem;
    min-height: 5rem;
}

.mainIconImg{
    max-height: 9rem;
    min-height: 9rem;
}

.connection-status {
    font-size: 0.8rem;
    color: #bbbbbb;
}

.chat-messages-container {
    height: fit-content;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 15px;
    background-color: rgba(0, 17, 34, 0.7);
    border: 2px solid #00aaff;
    position: relative;
    z-index: 2;
}

/* Message styles */
.chat-message {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 0;
    position: relative;
    word-break: break-word;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.7rem;
}

.message-sender {
    font-weight: bold;
    color: #ffff00;
    letter-spacing: 1px;
}

.message-time {
    color: #bbbbbb;
    font-size: 0.6rem;
}

.message-content {
    font-size: 0.8rem;
    line-height: 1.4;
    color: white;
}

.self-message {
    background-color: rgba(0, 85, 51, 0.6);
    border-left: 3px solid #00aa66;
}

.other-message {
    background-color: rgba(34, 0, 51, 0.6);
    border-left: 3px solid #6600aa;
}

.system-message {
    margin-bottom: 12px;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-left: 3px solid #ffaa00;
}

.system-content {
    color: #ffaa00;
    font-size: 0.7rem;
    font-style: italic;
    text-align: center;
}

/* Input area */
.chat-input-container {
    position: relative;
    z-index: 2;
}

.chars-counter {
    background-color: #001133;
    color: #00ffbb;
    border: none;
    border-top: 2px solid #00aaff;
    border-bottom: 2px solid #00aaff;
    font-size: 0.7rem;
    padding: 0 8px;
}

/* Decorations */
.chat-decorations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.corner-decoration {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 3px solid var(--arcade-accent);
    z-index: 2;
}

.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* Custom scrollbar for chat */
.chat-messages-container::-webkit-scrollbar {
    width: 12px;
}

.chat-messages-container::-webkit-scrollbar-track {
    background: #001122;
    border: 1px solid #00aaff;
}

.chat-messages-container::-webkit-scrollbar-thumb {
    background: #00aaff;
    border: 2px solid #001122;
}

.chat-messages-container::-webkit-scrollbar-thumb:hover {
    background: #00ccff;
}

/* Time stamp style */
.message-timestamp {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typing-indicator {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: #00ffbb;
    margin-left: 5px;
    animation: blink-cursor 1s infinite;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .chat-messages-container {
        height: fit-content;
        max-height: 70vh;
        margin-left: -1rem;
        margin-right: -1rem;
    }
    
    .chat-message {
        padding: 6px 8px;
    }
    
    .message-header {
        font-size: 0.7rem;
    }
    
    .message-content {
        font-size: 0.8rem;
        color: white;

    }
    
    .chat-mode-btn {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    #chat-global-btn {
        border-radius: 30px;
        margin-right: 3px;
    }

    .attack-title h3 {
        font-size: 1.6rem;
    }


}

.card-title {
    color: white;
    font-size: 0.7rem;
    margin-top: 1rem;
  }

  .customization-description {
    color: yellow;
    margin-left: 5px;
  }
  .card-text {
    font-size: 0.6rem;
    color: orange;
  }

  #upgradesTabContent{
    border: none;
  }
  .upgrade-count{
    color:red;
  }

  /* Chat message styling with new emoji and clicks display */
.message-sender-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.message-emoji {
    font-size: 1rem;
    display: inline-block;
}

.message-emoji img.smallIconImg {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.message-clicks {
    font-size: 0.8em;
    color: #00ffbb;
    margin-left: 5px;
    font-family: 'Courier New', monospace;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.message-sender {
    font-weight: bold;
    color: #ffcc00;
}

.message-time {
    font-size: 0.7em;
    color: #808080;
}

.chat-message {
    margin-bottom: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #555;
    font-family: 'Courier New', monospace;
}

.self-message {
    border-left-color: #00aaff;
    background-color: rgba(0, 20, 40, 0.3);
}

.other-message {
    border-left-color: #ff5500;
}

/* Add a subtle arcade glow effect to chat messages */
.chat-message:hover {
    box-shadow: 0 0 8px rgba(0, 255, 187, 0.3);
}

.retro-btn-danger:hover {
  filter: brightness(1.5);
}

.leaderboard-actions {
  display: flex;
  justify-content: center;
  gap: 5px;
}

.leaderboard-actions .btn {
  font-family: 'Press Start 2P', cursive;
  font-size: 0.7rem;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 1px 1px 0 #000;
  transition: all 0.2s;
}

.leaderboard-actions .btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.leaderboard-actions .btn:active:not(:disabled) {
  transform: scale(0.95);
}

.spectator-icon, .copy-icon {
  font-size: 0.9rem;
  margin-right: 4px;
}

/* Pixel effect for buttons */
.leaderboard-actions .btn {
  position: relative;
  overflow: hidden;
}

.leaderboard-actions .btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
              rgba(255, 255, 255, 0.1) 0%, 
              transparent 50%, 
              rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

/* Scanline effect */
.leaderboard-actions .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.3);
  animation: scanline 2s linear infinite;
  pointer-events: none;
  opacity: 0.5;
}

@keyframes scanline {
  0% {
      top: 0;
  }
  100% {
      top: 100%;
  }
}

.player-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  vertical-align: middle;
  width: 24px;
  height: 24px;
  max-height: 24px;
  min-height: 24px;
}

tr:hover .player-emoji {
  transform: scale(1.2);
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.7));
  z-index: 1;
}

.leaderboard-icon {
  max-height: 24px;
  min-height: 24px;
}

.badgeYou{
  padding: 0.6rem;
}