/*
 * Copyright (c) 2025 VDS Framework
 * Part of the Virtual Desktop Site Framework
 * Snake 2025 Styles
 */

/* Snake window content layout */
#snake-window .window-content {
  display: flex;
  flex-direction: row;
  padding: 0;
  overflow: hidden;
  background: #1a1a1a;
}

/* Main canvas container */
.snake-canvas-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #000;
  padding: 10px;
}

/* Canvas styling */
#snake-canvas {
  display: block;
  border: 2px solid #333;
  box-shadow: 0 0 20px rgba(0, 255, 159, 0.3);
  background: #000;
}

/* Pause indicator */
#snake-pause-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  color: #00ff9f;
  padding: 30px 50px;
  border-radius: 12px;
  border: 3px solid #00ff9f;
  font-family: 'Courier New', monospace;
  font-size: 32px;
  font-weight: bold;
  z-index: 10;
  text-shadow: 0 0 10px #00ff9f;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.05); }
}

/* Game over overlay */
#snake-gameover {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  color: #ff0099;
  padding: 40px 60px;
  border-radius: 16px;
  border: 3px solid #ff0099;
  text-align: center;
  z-index: 10;
  box-shadow: 0 0 30px rgba(255, 0, 153, 0.5);
}

#snake-gameover h2 {
  margin: 0 0 20px 0;
  font-size: 48px;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 20px #ff0099;
}

#snake-gameover p {
  margin: 10px 0;
  font-size: 24px;
  font-family: Arial, sans-serif;
}

#snake-final-score {
  font-size: 36px;
  font-weight: bold;
  color: #00ff9f;
  text-shadow: 0 0 15px #00ff9f;
}

#snake-gameover .restart-hint {
  margin-top: 30px;
  font-size: 16px;
  color: #aaa;
  font-style: italic;
}

/* Sidebar */
.snake-sidebar {
  width: 280px;
  background: #2a2a2a;
  border-left: 1px solid #444;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 25px;
  color: #ddd;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

.snake-sidebar h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #00ff9f;
  border-bottom: 2px solid #00ff9f;
  padding-bottom: 8px;
  text-shadow: 0 0 10px rgba(0, 255, 159, 0.5);
}

/* Stats section */
.snake-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: #1a1a1a;
  border-radius: 6px;
  border: 1px solid #333;
}

.stat-label {
  color: #aaa;
  font-size: 13px;
}

.stat-value {
  font-size: 20px;
  font-weight: bold;
  color: #00ff9f;
  font-family: 'Courier New', monospace;
}

.stat-value.time-bonus {
  color: #58a6ff;
}

.stat-value.highscore {
  color: #ffd700;
}

/* Controls section */
.snake-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.snake-controls label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #ccc;
  font-size: 13px;
}

.snake-controls select {
  width: 100%;
  padding: 8px;
  background: #333;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  font-size: 13px;
}

.snake-controls select:focus {
  outline: none;
  border-color: #00ff9f;
  box-shadow: 0 0 5px rgba(0, 255, 159, 0.5);
}

/* Checkbox styling */
.sound-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #1a1a1a;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.sound-toggle:hover {
  background: #252525;
}

.sound-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* Button group */
.snake-button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.snake-sidebar button {
  padding: 12px;
  background: linear-gradient(135deg, #00ff9f 0%, #00cc7f 100%);
  color: #000;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 255, 159, 0.3);
}

.snake-sidebar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 159, 0.5);
}

.snake-sidebar button:active {
  transform: translateY(0);
}

.snake-sidebar button:nth-child(2) {
  background: linear-gradient(135deg, #58a6ff 0%, #388bfd 100%);
  box-shadow: 0 2px 8px rgba(88, 166, 255, 0.3);
}

.snake-sidebar button:nth-child(2):hover {
  box-shadow: 0 4px 12px rgba(88, 166, 255, 0.5);
}

.snake-sidebar button:nth-child(3) {
  background: linear-gradient(135deg, #ff0099 0%, #cc0077 100%);
  box-shadow: 0 2px 8px rgba(255, 0, 153, 0.3);
}

.snake-sidebar button:nth-child(3):hover {
  box-shadow: 0 4px 12px rgba(255, 0, 153, 0.5);
}

/* Instructions */
.snake-instructions {
  background: #1a1a1a;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #333;
}

.snake-instructions h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #00ff9f;
}

.snake-instructions ul {
  margin: 0;
  padding-left: 20px;
  font-size: 12px;
  line-height: 1.8;
}

.snake-instructions li {
  margin: 5px 0;
}

.snake-instructions strong {
  color: #58a6ff;
}

/* Hidden utility class */
.hidden {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #snake-window .window-content {
    flex-direction: column-reverse;
  }

  .snake-sidebar {
    width: 100%;
    max-height: 250px;
    border-left: none;
    border-top: 1px solid #444;
    padding: 15px;
  }

  .snake-canvas-container {
    min-height: 400px;
  }

  #snake-gameover {
    padding: 30px 40px;
  }

  #snake-gameover h2 {
    font-size: 36px;
  }

  #snake-gameover p {
    font-size: 18px;
  }

  #snake-final-score {
    font-size: 28px;
  }
}

/* Scrollbar styling for sidebar */
.snake-sidebar::-webkit-scrollbar {
  width: 8px;
}

.snake-sidebar::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.snake-sidebar::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

.snake-sidebar::-webkit-scrollbar-thumb:hover {
  background: #555;
}
