* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 1200px;
  width: 100%;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 10px;
  font-size: 2.5em;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 1em;
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-btn {
  background: #667eea;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.2s;
}

.control-btn:hover {
  background: #5568d3;
  transform: translateY(-2px);
}

.control-btn:active {
  transform: translateY(0);
}

.control-btn.active {
  background: #ff6b6b;
  animation: blink 0.5s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.key-display {
  font-size: 1.2em;
  font-weight: bold;
  color: #667eea;
  min-width: 60px;
  text-align: center;
}

.tempo-input {
  width: 70px;
  padding: 8px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1em;
  text-align: center;
  font-weight: bold;
  background: white;
}

.tempo-input:focus {
  outline: none;
  border-color: #667eea;
}

.tempo-label {
  font-weight: bold;
  color: #333;
}

.chord-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

/* PC Layout: 3 rows */
@media (min-width: 768px) {
  .chord-grid {
    grid-template-columns: repeat(12, 1fr);
  }
}

/* Mobile Layout: 3 columns */
@media (max-width: 767px) {
  .chord-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }
}

.chord-btn {
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  border: 2px solid #ddd;
  border-radius: 12px;
  padding: 20px 10px;
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.chord-btn:hover {
  background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
  border-color: #667eea;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.chord-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chord-btn.playing {
  background: linear-gradient(145deg, #667eea, #5568d3);
  color: white;
  border-color: #667eea;
  animation: pulse 0.3s ease-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.chord-btn .shortcut {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 0.7em;
  opacity: 0.5;
}

.info {
  text-align: center;
  color: #666;
  font-size: 0.9em;
  margin-top: 20px;
}

@media (max-width: 767px) {
  h1 {
    font-size: 1.8em;
  }

  .chord-btn {
    padding: 15px 5px;
    font-size: 1em;
  }

  .container {
    padding: 20px;
  }
}
