/* Custom styles for the Snake Game */

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
}

/* Game Container */
.game-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Game Board */
.game-board-container {
    position: relative;
    border: 2px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.game-board-container:hover {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.2);
}

/* Canvas */
#gameCanvas {
    background-color: rgba(17, 24, 39, 0.7);
    display: block;
    margin: 0 auto;
    border-radius: 0.75rem;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Score */
.score-container {
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

/* Buttons */
button {
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

/* Game Over Overlay */
#gameOver {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#gameOver.hidden {
  display: none !important;
}

.game-title {
  background: linear-gradient(90deg, #f472b6, #60a5fa, #a7f3d0, #f472b6);
  background-size: 200% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 16px #f472b6, 0 0 32px #60a5fa;
  animation: shimmer 2s linear infinite, title-pulse 1.4s ease-in-out infinite alternate;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes title-pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.07); }
}

/* Responsive Design */
.mobile-controls {
  margin-top: 1.5rem;
}
.mobile-btn {
  background: linear-gradient(90deg, #4f46e5, #ec4899);
  color: #fff;
  font-size: 2rem;
  padding: 0.75rem 1.3rem;
  margin: 0 0.5rem;
  border-radius: 1rem;
  box-shadow: 0 0 12px #6366f1, 0 0 20px #ec4899;
  border: none;
  outline: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.mobile-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 4px #6366f1;
}

@media (max-width: 640px) {
    .game-container {
        padding: 1rem;
    }
    
    .score-container {
        padding: 0.5rem 1rem;
    }
    
    button {
        padding: 0.375rem 0.75rem;
    }
}
