/* ========================================
   JS Drum Kit - Premium Dark Theme Styles
   Synced with Portfolio Global Theme
   ======================================== */

/* Drum Kit Styles - Synced with warm color system */

:root {
  --drum-primary: var(--color-accent-primary);
  --drum-secondary: var(--color-accent-secondary);
  --drum-text: var(--color-text-primary);
  --drum-muted: var(--color-text-muted);
  --drum-surface: var(--color-surface-primary);
  --drum-border: var(--color-border-primary);
}

/* Main Container */
.drum-kit-container {
  min-height: 100vh;
  background: var(--bg-color);
  color: var(--drum-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}

.drum-kit-container::before {
  content: '';
  position: fixed;
  width: 40vw;
  height: 40vw;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
  filter: blur(100px);
  top: -10%;
  left: -10%;
  z-index: -1;
  opacity: 0.5;
}

/* Drum Header */
.drum-header {
  text-align: center;
  margin-bottom: 3rem;
}

.drum-header h1 {
  font-size: 3rem;
  font-weight: 900;
  margin: 0;
  background: linear-gradient(135deg, var(--drum-text), var(--drum-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes glowPulse {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(201, 184, 163, 0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(201, 184, 163, 0.6);
  }
}

.drum-subtitle {
  font-size: 1.1rem;
  color: var(--drum-muted);
  margin: 0.8rem 0 0 0;
}

.drum-subtitle strong {
  color: var(--drum-primary);
  font-weight: 700;
}

/* Keys Container */
.keys {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1.2rem;
  max-width: 800px;
  width: 100%;
  margin-bottom: 3rem;
}

/* Individual Key/Pad */
.key {
  background: linear-gradient(135deg, var(--drum-surface), rgba(42, 38, 34, 0.5));
  border: 2px solid var(--drum-border);
  border-radius: 1.2rem;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.key::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(201, 184, 163, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.key:hover::before {
  opacity: 1;
}

.key:hover {
  transform: translateY(-4px);
  border-color: var(--drum-primary);
  box-shadow: 0 8px 20px rgba(201, 184, 163, 0.15);
}

.key:active,
.key.playing {
  transform: scale(0.95);
  background: linear-gradient(135deg, rgba(201, 184, 163, 0.15), rgba(139, 115, 85, 0.1));
  border-color: var(--drum-primary);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.4),
    0 0 15px rgba(201, 184, 163, 0.25);
}

.key.playing::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(201, 184, 163, 0.2), transparent 70%);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* KBD Element */
kbd {
  background: var(--color-surface-secondary);
  border: 1px solid var(--drum-border);
  border-radius: 0.5rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--drum-primary);
  font-family: 'JetBrains Mono', monospace;
}

.key.playing kbd {
  background: var(--drum-primary);
  color: #000;
}

/* Sound Label */
.sound {
  font-size: 0.85rem;
  color: var(--drum-muted);
  text-align: center;
  transition: color 0.2s ease;
}

.key.playing .sound {
  color: var(--drum-primary);
  font-weight: 600;
}

/* Instructions Section */
.drum-instructions {
  max-width: 800px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.instruction-card {
  background: var(--drum-surface);
  border: 1px solid var(--drum-border);
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.instruction-card:hover {
  transform: translateY(-4px);
  border-color: var(--drum-primary);
  background: rgba(201, 184, 163, 0.05);
}

.instruction-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.instruction-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--drum-text);
  margin: 0 0 0.5rem 0;
}

.instruction-card p {
  font-size: 0.85rem;
  color: var(--drum-muted);
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .drum-header h1 {
    font-size: 2rem;
  }

  .keys {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.8rem;
  }

  .key {
    padding: 1rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .drum-kit-container {
    padding: 1rem 0.5rem;
  }

  .drum-header h1 {
    font-size: 1.5rem;
  }

  .keys {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }

  .key {
    padding: 0.8rem 0.5rem;
    font-size: 0.8rem;
  }
}

/* Focus States for Accessibility */
.key:focus-visible {
  outline: 2px solid var(--drum-primary);
  outline-offset: 2px;
}

.key:focus-visible::before {
  opacity: 1;
}

/* Animation Classes */
.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Delay animations for staggered effect */
.drum-header {
  animation-delay: 0.1s;
}

.keys .key:nth-child(1) {
  animation-delay: 0.2s;
}
.keys .key:nth-child(2) {
  animation-delay: 0.25s;
}
.keys .key:nth-child(3) {
  animation-delay: 0.3s;
}
.keys .key:nth-child(4) {
  animation-delay: 0.35s;
}
.keys .key:nth-child(5) {
  animation-delay: 0.4s;
}
.keys .key:nth-child(6) {
  animation-delay: 0.45s;
}
.keys .key:nth-child(7) {
  animation-delay: 0.5s;
}
.keys .key:nth-child(8) {
  animation-delay: 0.55s;
}
.keys .key:nth-child(9) {
  animation-delay: 0.6s;
}
