@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
  --bg-color: #b5d45f;
  --text-color: #1a1a1a;
  --accent-color: #5f7f2c;
  --highlight-color: #ccec86;
  --font-family: 'VT323', monospace;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-family);
  font-size: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

header {
  width: 100%;
  padding: 20px 60px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
}

.logo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo a img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(100%) brightness(0);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.logo a:hover img {
  filter: grayscale(0%) brightness(0.6) sepia(0.6) hue-rotate(40deg) saturate(2);
  transform: scale(1.1);
}

.github-icon {
  width: 48px;
  height: 48px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-icon {
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: transform 0.3s ease, fill 0.3s ease;
  fill: var(--text-color);
}

.volume-icon:hover {
  fill: var(--accent-color);
  transform: scale(1.1);
}

#volume-slider {
  -webkit-appearance: none;
  appearance: none; /* ← Add this line */
  width: 100px;
  height: 5px;
  background: #111;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
}


.volume-icon.muted {
  fill: #888;
  opacity: 0.6;
}

#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #111;
  cursor: pointer;
  transition: background 0.3s;
}

#volume-slider:hover::-webkit-slider-thumb {
  background: var(--highlight-color);
}

.container {
  text-align: center;
  max-width: 700px;
  padding: 40px 20px;
  width: 100%;
  box-sizing: border-box;
}

.title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 0.5em;
  color: var(--text-color);
  animation: fadeIn 1.5s ease;
}

.subtitle {
  font-style: italic;
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 1em;
  animation: fadeIn 2s ease;
}

#game-canvas {
  border: 4px solid #4c651e;
  background-color: #cde888;
  box-shadow: inset 0 0 40px #a2c85c;
  margin: 30px 0;
  width: 100%;
  max-width: 600px;
  animation: fadeIn 2.5s ease;
}

.controls {
  margin-top: 30px;
  animation: fadeIn 3s ease;
}

button {
  background-color: var(--accent-color);
  color: var(--text-color);
  border: none;
  border-radius: 999px;
  padding: 12px 32px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  background-color: var(--highlight-color);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  .title {
    font-size: 2.2rem;
  }

  button {
    width: 100%;
  }
}

#game-info {
  display: none;
  justify-content: space-between;
  align-items: center;
  width: 595px;
  font-family: 'VT323', monospace;
  font-size: 28px;
  color: #111;
  margin-top: 10px;
  padding: 0 10px;
}

#game-info > div {
  flex: 1;
  text-align: center;
}

#score-display {
  text-align: left;
}

#difficulty-display {
  text-align: center;
}

#highscore-display {
  text-align: right;
}

body.playing #game-info {
  display: flex;
}
