* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Special Elite', 'Courier New', Courier, monospace;
  line-height: 1.6;
  color: #e8e8e8;
  background: #2a2a2a;
  font-size: 22.5px;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 30%, rgba(42, 26, 32, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(42, 32, 28, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 50% 10%, rgba(38, 28, 42, 0.3) 0%, transparent 40%);
  pointer-events: none;
  z-index: 1;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.15'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 2;
}

.page {
  padding: 3.75rem;
  max-width: 1000px;
  position: relative;
  z-index: 3;
}

h1 {
  font-size: 1.875rem;
  font-weight: 400;
  margin-bottom: 2.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

p {
  margin-bottom: 1.25rem;
}

.controls {
  margin-bottom: 2.5rem;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.controls label {
  font-weight: 400;
  color: #e8e8e8;
  min-width: 120px;
}

.controls select {
  padding: 0.5rem 0.75rem;
  border: 2px solid #e8e8e8;
  background-color: #2a2a2a;
  color: #e8e8e8;
  font-family: 'Special Elite', 'Courier New', Courier, monospace;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.controls select:focus {
  outline: 2px solid #e8e8e8;
  outline-offset: 2px;
}

.controls select:hover {
  background-color: #3a3a3a;
}

.controls input[type="range"] {
  flex: 1;
  min-width: 150px;
  max-width: 300px;
  height: 6px;
  background: #3a3a3a;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #e8e8e8;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.controls input[type="range"]::-webkit-slider-thumb:hover {
  background: #ffffff;
  transform: scale(1.1);
}

.controls input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #e8e8e8;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.controls input[type="range"]::-moz-range-thumb:hover {
  background: #ffffff;
  transform: scale(1.1);
}

.controls input[type="range"]:focus {
  outline: none;
}

.controls input[type="range"]:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(232, 232, 232, 0.3);
}

.controls input[type="range"]:focus::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(232, 232, 232, 0.3);
}

#volumeValue {
  min-width: 45px;
  color: #e8e8e8;
  font-size: 0.95rem;
  opacity: 0.8;
}

.info-message {
  min-height: 1.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: #e8e8e8;
  opacity: 0.7;
  font-style: italic;
}

#guitarStrings {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.string {
  padding: 1.25rem 1.5rem;
  background-color: rgba(42, 42, 42, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.string svg {
  opacity: 0;
  transition: opacity 0.1s ease-in;
}

.string svg.ready {
  opacity: 1;
}

.string:hover {
  background-color: rgba(60, 60, 60, 0.8);
  transform: translateY(-2px);
}

.string:focus {
  outline: none;
}

.string:active {
  transform: translateY(0);
}

.string.playing {
  background-color: rgba(80, 80, 80, 0.9);
  animation: pulse 0.3s ease;
}

.string.playing::after {
  content: '♪';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  animation: float 1s ease-in-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(5px); }
}

.string strong {
  color: inherit;
}

.char {
  display: inline-block;
  position: relative;
}

.error-message {
  background-color: rgba(255, 243, 205, 0.2);
  border: 2px solid #ffc107;
  padding: 1rem;
  margin-bottom: 1.25rem;
  color: #ffc107;
}

@media (max-width: 480px) {
  .page {
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .string {
    padding: 1rem 1.25rem;
  }
}
