body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 10px;
  font-family: Arial, sans-serif;
  background: 
    radial-gradient(circle at 20% 50%, rgba(50, 50, 50, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(40, 40, 40, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(30, 30, 30, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  height: 100vh;
  color: #f0f0f0;
  background-attachment: fixed;
  overflow: hidden;
  box-sizing: border-box;
}

/* Main title styling */
h1 {
  color: #f0d9b5;
  font-family: 'Courier New', Courier, monospace;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  margin: 0 0 20px 0;
  font-size: 2.2em;
  font-weight: bold;
}

#game-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1000px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  padding: 15px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

#board-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

#chessboard {
  display: grid;
  grid-template-columns: repeat(8, 65px);
  grid-template-rows: repeat(8, 65px);
  gap: 0;
  width: 520px;
  height: 520px;
  border: 3px solid #444;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.square {
  position: relative;
  width: 65px;
  height: 65px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 14px;
  user-select: none;
  box-sizing: border-box;
}

/* Rounded corners for corner squares only */
.square[data-square="a8"] {
  border-top-left-radius: 5px;
}

.square[data-square="h8"] {
  border-top-right-radius: 5px;
}

.square[data-square="a1"] {
  border-bottom-left-radius: 5px;
}

.square[data-square="h1"] {
  border-bottom-right-radius: 5px;
}

.piece {
  width: 58px;
  height: 58px;
  z-index: 10;
  pointer-events: none; /* Allow clicks to pass through to the square */
  image-rendering: pixelated;
}

.square.selected {
  box-shadow: inset 0 0 0 3px #ffff00;
}

/* Show legal moves */
.legal-move-indicator {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}

.legal-move-indicator.capture-indicator {
  width: 48px;
  height: 48px;
  background-color: transparent;
  border: 4px solid rgba(255, 0, 0, 0.6);
  border-radius: 50%;
}

.square.legal-move {
  cursor: pointer;
}

.square.legal-move:hover {
  box-shadow: inset 0 0 0 2px rgba(0, 150, 255, 0.5);
}

.square.flash-error {
  animation: flashError 0.6s ease-in-out;
}

@keyframes flashError {
  0%, 100% { 
    box-shadow: inset 0 0 0 3px #ffff00; 
  }
  25%, 75% { 
    box-shadow: inset 0 0 0 4px #ff4444; 
  }
  50% { 
    box-shadow: inset 0 0 0 5px #ff0000; 
  }
}

.light {
  background-color: #d3bfa5;
}

.dark {
  background-color: #b58863;
}

/* Coordinate markings inside edge squares */
.rank-label, .file-label {
  position: absolute;
  color: rgba(255, 255, 255, 0.6);
  font-weight: normal;
  font-size: 12px;
  user-select: none;
}

.rank-label {
  top: 4px;
  left: 4px;
}

.file-label {
  bottom: 4px;
  right: 4px;
}

#turn-indicator {
  position: absolute;
  right: -30px;
  top: 0;
  font-size: 18px;
  font-weight: bold;
  padding: 12px 18px;
  border-radius: 8px;
  background-color: rgba(26, 26, 26, 0.9);
  border: 2px solid #444;
  color: #886969;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  min-width: 160px;
}

.hidden {
    display: none !important;
}

/* Intro Overlay Styles */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
}

#intro-content {
    max-width: 600px;
    padding: 40px;
    background: #1a1a1a;
    border-radius: 10px;
    border: 2px solid #444;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#intro-content h1 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #f0d9b5;
}

#intro-content p {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 30px;
}

.stylized-chess {
    font-family: 'Georgia', serif;
    font-weight: bold;
    font-style: italic;
    color: #d18b47;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    font-size: 1.3em;
}

#player-selection button {
    font-size: 1.2em;
    padding: 10px 30px;
    margin: 0 15px;
    cursor: pointer;
    border: 2px solid #f0d9b5;
    background-color: transparent;
    color: #f0d9b5;
    border-radius: 5px;
    transition: all 0.3s ease;
}

#player-selection button:hover {
    background-color: #f0d9b5;
    color: #1a1a1a;
}

/* Promotion Overlay Styles */
#promotion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#promotion-content {
    padding: 20px 30px;
    background: #3a3a3a;
    border-radius: 8px;
    text-align: center;
    color: white;
    border: 2px solid #555;
}

#promotion-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
}

#promotion-choices {
    display: flex;
    gap: 15px;
}

.promotion-piece {
    width: 80px;
    height: 80px;
    background-color: #777;
    border: 2px solid #999;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.promotion-piece:hover {
    background-color: #999;
}

.promotion-piece img {
    width: 70px;
    height: 70px;
    image-rendering: pixelated;
}

/* AI Toggle Styles */
#ai-toggle-container {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 3500;
}

#ai-toggle {
    background: rgba(26, 26, 26, 0.9);
    border-radius: 25px;
    padding: 10px 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

#ai-toggle label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: white;
    font-size: 14px;
    font-weight: 500;
    gap: 10px;
}

#ai-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#ai-enabled:checked + label .toggle-slider {
    background: #4CAF50;
}

#ai-enabled:checked + label .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-text {
    white-space: nowrap;
    user-select: none;
}

/* Hover effects */
#ai-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#ai-toggle label:hover .toggle-slider {
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

/* King in check styling */
.square.king-in-check {
  animation: checkPulse 1.2s ease-in-out infinite alternate;
  position: relative;
  overflow: visible;
}

.square.king-in-check::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 4px solid transparent;
  border-image: linear-gradient(45deg, #ff0000, #ff4444, #ff6666, #ff0000) 1;
  border-radius: 8px;
  animation: expandFromCenter 0.4s ease-out forwards, 
             borderGyrate 1.5s ease-in-out infinite 0.4s;
  z-index: 15;
  pointer-events: none;
  transform-origin: center center;
}

.square.king-in-check::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 2px solid #ff0000;
  border-radius: 6px;
  animation: expandFromCenter 0.3s ease-out forwards, 
             innerPulse 0.8s ease-in-out infinite alternate 0.3s;
  z-index: 14;
  pointer-events: none;
  transform-origin: center center;
}

/* Class for shrinking effect when check is removed */
.square.king-check-ending::before {
  animation: shrinkToCenter 0.3s ease-in forwards !important;
}

.square.king-check-ending::after {
  animation: shrinkToCenter 0.25s ease-in forwards !important;
}

/* Attacking piece styling - yellow gyrating rings */
.square.attacking-piece {
  animation: attackPulse 1.2s ease-in-out infinite alternate;
  position: relative;
  overflow: visible;
}

.square.attacking-piece::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 4px solid transparent;
  border-image: linear-gradient(45deg, #ffdd00, #ffff44, #ffff66, #ffdd00) 1;
  border-radius: 8px;
  animation: expandFromCenter 0.4s ease-out forwards, 
             yellowBorderGyrate 1.5s ease-in-out infinite 0.4s;
  z-index: 15;
  pointer-events: none;
  transform-origin: center center;
}

.square.attacking-piece::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border: 2px solid #ffdd00;
  border-radius: 6px;
  animation: expandFromCenter 0.3s ease-out forwards, 
             yellowInnerPulse 0.8s ease-in-out infinite alternate 0.3s;
  z-index: 14;
  pointer-events: none;
  transform-origin: center center;
}

/* Class for shrinking effect when attacking piece indicator is removed */
.square.attacking-piece-ending::before {
  animation: shrinkToCenter 0.3s ease-in forwards !important;
}

.square.attacking-piece-ending::after {
  animation: shrinkToCenter 0.25s ease-in forwards !important;
}

@keyframes checkPulse {
  0% {
    box-shadow: inset 0 0 0 2px #ff4444, 
                0 0 20px rgba(255, 68, 68, 0.6),
                0 0 40px rgba(255, 0, 0, 0.3);
    background-color: rgba(255, 68, 68, 0.1);
  }
  100% {
    box-shadow: inset 0 0 0 3px #ff0000, 
                0 0 30px rgba(255, 0, 0, 0.8),
                0 0 60px rgba(255, 0, 0, 0.4);
    background-color: rgba(255, 0, 0, 0.2);
  }
}



@keyframes borderGyrate {
  0% { 
    transform: rotate(0deg) scale(1);
    border-width: 4px;
  }
  25% { 
    transform: rotate(90deg) scale(1.05);
    border-width: 3px;
  }
  50% { 
    transform: rotate(180deg) scale(1);
    border-width: 5px;
  }
  75% { 
    transform: rotate(270deg) scale(1.05);
    border-width: 3px;
  }
  100% { 
    transform: rotate(360deg) scale(1);
    border-width: 4px;
  }
}

@keyframes innerPulse {
  0% {
    opacity: 0.7;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes expandFromCenter {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shrinkToCenter {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

@keyframes attackPulse {
  0% {
    box-shadow: inset 0 0 0 2px #ffdd44, 
                0 0 20px rgba(255, 221, 68, 0.6),
                0 0 40px rgba(255, 221, 0, 0.3);
    background-color: rgba(255, 221, 68, 0.1);
  }
  100% {
    box-shadow: inset 0 0 0 3px #ffdd00, 
                0 0 30px rgba(255, 221, 0, 0.8),
                0 0 60px rgba(255, 221, 0, 0.4);
    background-color: rgba(255, 221, 0, 0.2);
  }
}

@keyframes yellowBorderGyrate {
  0% { 
    transform: rotate(0deg) scale(1);
    border-width: 4px;
  }
  25% { 
    transform: rotate(90deg) scale(1.05);
    border-width: 3px;
  }
  50% { 
    transform: rotate(180deg) scale(1);
    border-width: 5px;
  }
  75% { 
    transform: rotate(270deg) scale(1.05);
    border-width: 3px;
  }
  100% { 
    transform: rotate(360deg) scale(1);
    border-width: 4px;
  }
}

@keyframes yellowInnerPulse {
  0% {
    opacity: 0.7;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1.02);
  }
}

/* Last move indicator styling */
.square.last-move-from,
.square.last-move-to {
  position: relative;
}

.square.last-move-from::before,
.square.last-move-to::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 0, 0.3);
  border: 2px solid rgba(255, 255, 0, 0.6);
  border-radius: 4px;
  pointer-events: none;
  z-index: 5;
  animation: lastMoveGlow 0.5s ease-out;
}

.square.last-move-from::before {
  background-color: rgba(255, 255, 0, 0.2);
  border-color: rgba(255, 255, 0, 0.4);
}

.square.last-move-to::before {
  background-color: rgba(255, 255, 0, 0.4);
  border-color: rgba(255, 255, 0, 0.8);
  box-shadow: 0 0 10px rgba(255, 255, 0, 0.3);
}

@keyframes lastMoveGlow {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hide move history on small screens */
@media (max-width: 1024px) {
  #move-history-panel {
    display: none;
  }
}

/* Move History Panel Styles */
#move-history-panel {
  position: fixed;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 214px;
  background: rgba(26, 26, 26, 0.95);
  border-radius: 8px;
  border: 1px solid #444;
  height: 520px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  z-index: 100;
}

#move-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #444;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px 8px 0 0;
}

#move-history-header h3 {
  margin: 0;
  color: #f0d9b5;
  font-size: 16px;
  font-family: 'Courier New', Courier, monospace;
}

#clear-history {
  background: transparent;
  border: 1px solid #666;
  color: #ccc;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

#clear-history:hover {
  background: rgba(255, 68, 68, 0.2);
  border-color: #ff4444;
  color: #ff6666;
}

#move-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
}

.move-pair {
  display: flex;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.move-pair:hover {
  background: rgba(240, 217, 181, 0.1);
}

.move-number {
  color: #b58863;
  font-weight: bold;
  min-width: 25px;
  margin-right: 8px;
}

.white-move, .black-move {
  min-width: 65px;
  padding: 2px 4px;
  border-radius: 3px;
  margin-right: 4px;
}

.white-move {
  color: #f0d9b5;
  background: rgba(240, 217, 181, 0.1);
}

.black-move {
  color: #8b7355;
  background: rgba(139, 115, 85, 0.1);
}

.current-move {
  background: rgba(255, 255, 0, 0.2) !important;
  border: 1px solid rgba(255, 255, 0, 0.4);
}

#move-list::-webkit-scrollbar {
  width: 6px;
}

#move-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

#move-list::-webkit-scrollbar-thumb {
  background: rgba(240, 217, 181, 0.3);
  border-radius: 3px;
}

#move-list::-webkit-scrollbar-thumb:hover {
  background: rgba(240, 217, 181, 0.5);
}

/* Mobile Warning Overlay Styles */
.mobile-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    backdrop-filter: blur(10px);
}

.mobile-warning-overlay.show {
    opacity: 1;
}

.mobile-warning-overlay.hide {
    opacity: 0;
}

.mobile-warning-content {
    max-width: 90%;
    width: 400px;
    padding: 30px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 15px;
    border: 2px solid #ff6b6b;
    box-shadow: 
        0 0 30px rgba(255, 107, 107, 0.3),
        0 0 60px rgba(255, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
    color: white;
    font-family: 'Courier New', Courier, monospace;
    position: relative;
    overflow: hidden;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mobile-warning-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e, #ff6b6b, #ff4757);
    border-radius: 17px;
    z-index: -1;
    animation: borderGlow 2s ease-in-out infinite alternate;
}

.mobile-warning-title {
    margin: 0 0 20px 0;
    font-size: 1.5em;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 
        0 0 10px rgba(255, 107, 107, 0.8),
        0 0 20px rgba(255, 107, 107, 0.4);
    animation: pulseGlow 1.5s ease-in-out infinite alternate;
}

.mobile-warning-message {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #f0f0f0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.mobile-warning-message strong {
    color: #ff6b6b;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.6);
}

.mobile-warning-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.mobile-warning-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', Courier, monospace;
    position: relative;
    overflow: hidden;
}

.leave-btn {
    background: linear-gradient(135deg, #ff4757 0%, #ff6b6b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    border: 2px solid #ff4757;
}

.leave-btn:hover {
    background: linear-gradient(135deg, #ff3742 0%, #ff5656 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6);
}

.continue-btn {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
    border: 2px solid #2ecc71;
}

.continue-btn:hover {
    background: linear-gradient(135deg, #27ae60 0%, #219a52 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.6);
}

.mobile-warning-btn:active {
    transform: translateY(0);
}

/* Animations */
@keyframes popIn {
    0% {
        transform: scale(0.5) rotate(-5deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes borderGlow {
    0% {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    }
    100% {
        box-shadow: 0 0 40px rgba(255, 107, 107, 0.8);
    }
}

@keyframes pulseGlow {
    0% {
        text-shadow: 
            0 0 10px rgba(255, 107, 107, 0.8),
            0 0 20px rgba(255, 107, 107, 0.4);
    }
    100% {
        text-shadow: 
            0 0 15px rgba(255, 107, 107, 1),
            0 0 30px rgba(255, 107, 107, 0.6);
    }
}

/* Responsive adjustments for really small screens */
@media (max-width: 480px) {
    .mobile-warning-content {
        margin: 20px;
        padding: 20px;
        width: calc(100% - 40px);
    }
    
    .mobile-warning-title {
        font-size: 1.3em;
    }
    
    .mobile-warning-message {
        font-size: 0.9em;
    }
    
    .mobile-warning-btn {
        padding: 10px 15px;
        font-size: 0.95em;
    }
}

/* Game Over Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #2c2c2c;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  color: #e0e0e0;
  border: 1px solid #444;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.modal-content h2 {
  margin-top: 0;
  color: #fff;
}

.modal-content .stylized-chess {
  font-family: 'Georgia', serif;
  font-weight: bold;
  color: #b58863;
  font-style: italic;
}

.modal-buttons {
  margin-top: 20px;
}

.modal-buttons button {
  background-color: #4a4a4a;
  color: white;
  border: 1px solid #666;
  padding: 10px 20px;
  margin: 0 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s;
}

.modal-buttons button:hover {
  background-color: #5a5a5a;
}

#anarchyButton {
    background-color: #c0392b; /* A nice red for anarchy */
}

#anarchyButton:hover {
    background-color: #e74c3c;
}

/* Notification Area */
#notification-area {
    position: fixed;
    top: 86%;
    right: 20px;
    transform: translateY(-50%);
    background-color: rgba(20, 25, 35, 0.95);
    color: #ecf0f1;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    max-width: 250px;
    text-align: left;
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(30px) scale(0.95);
}

#notification-area.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0) scale(1);
    animation: fadeInSlide 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

#notification-area.hide-notification {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(30px) scale(0.95);
    animation: fadeOutSlide 0.25s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes fadeInSlide {
    0% {
        opacity: 0;
        transform: translateY(-50%) translateX(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(-50%) translateX(0) scale(1);
    }
}

@keyframes fadeOutSlide {
    0% {
        opacity: 1;
        transform: translateY(-50%) translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) translateX(30px) scale(0.9);
    }
}