/* ===== GROOVE LAB STYLES v1.0 ===== */

/* ===== VARIABLES ===== */
:root {
  --gl-primary: #00C2C7;
  --gl-secondary: #D4AF37;
  --gl-dark: #0B0E13;
  --gl-gray: #767779;
  --gl-gray-light: #1d46a5;
  --gl-text: #ffffff;
  --gl-text-dim: #a0a0a0;
  --gl-danger: #ff4757;
  --gl-success: #2ed573;
  
  --gl-step-size: 24px;
  --gl-step-gap: 2px;
  --gl-row-height: 40px;
}

@media (max-width: 768px) {
  :root {
    --gl-step-size: 18px;
    --gl-row-height: 36px;
  }
}

/* ===== CONTAINER ===== */
.groove-lab-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ===== SEO INTRO ===== */
.seo-intro {
  background: var(--gl-gray);
  border-left: 4px solid var(--gl-primary);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  line-height: 1.7;
}

/* ===== CONTROLES PRINCIPALES ===== */
.groove-controls-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background: var(--gl-gray);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.groove-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.groove-control-group--wide {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .groove-control-group--wide {
    grid-column: span 1;
  }
}

.groove-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gl-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.groove-label i {
  color: var(--gl-primary);
}

/* ===== BPM CONTROL ===== */
.groove-bpm-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.groove-bpm-display {
  flex: 1;
  background: var(--gl-dark);
  border: 2px solid var(--gl-gray-light);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gl-primary);
  font-family: 'Courier New', monospace;
  min-width: 80px;
}

/* ===== BOTONES ===== */
.groove-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gl-gray-light);
  color: var(--gl-text);
}

.groove-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 194, 199, 0.3);
}

.groove-btn:active:not(:disabled) {
  transform: translateY(0);
}

.groove-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.groove-btn--small {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.groove-btn--large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.groove-btn--primary {
  background: linear-gradient(135deg, var(--gl-primary), #00a0a5);
  color: white;
}

.groove-btn--secondary {
  background: var(--gl-gray-light);
  color: var(--gl-text);
}

.groove-btn--danger {
  background: var(--gl-danger);
  color: white;
}

.groove-btn--premium {
  background: linear-gradient(135deg, var(--gl-secondary), #c49b2c);
  color: var(--gl-dark);
}

/* ===== SLIDER ===== */
.groove-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--gl-gray-light);
  outline: none;
  -webkit-appearance: none;
}

.groove-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gl-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.groove-slider::-webkit-slider-thumb:hover {
  background: var(--gl-secondary);
  transform: scale(1.2);
}

.groove-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gl-primary);
  cursor: pointer;
  border: none;
}

/* ===== SELECT ===== */
.groove-select {
  padding: 0.75rem;
  background: var(--gl-dark);
  border: 2px solid var(--gl-gray-light);
  border-radius: 8px;
  color: var(--gl-text);
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.groove-select:hover {
  border-color: var(--gl-primary);
}

.groove-select:focus {
  outline: none;
  border-color: var(--gl-primary);
  box-shadow: 0 0 0 3px rgba(0, 194, 199, 0.2);
}

/* ===== TRANSPORT CONTROLS ===== */
.groove-transport {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--gl-gray);
  border-radius: 12px;
}

@media (max-width: 768px) {
  .groove-transport {
    flex-wrap: wrap;
  }
  
  .groove-btn--large {
    flex: 1;
    min-width: 140px;
  }
}

/* ===== SECUENCIADOR ===== */
.groove-sequencer-wrapper {
  margin-bottom: 3rem;
  background: var(--gl-dark);
  border-radius: 12px;
  padding: 1.5rem;
  overflow-x: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.groove-sequencer {
  min-width: 800px;
}

.groove-sequencer-grid {
  display: flex;
  flex-direction: column;
  gap: var(--gl-step-gap);
}

/* ===== FILAS ===== */
.groove-row {
  display: flex;
  align-items: center;
  gap: var(--gl-step-gap);
  min-height: var(--gl-row-height);
}

.groove-row--header {
  margin-bottom: 0.5rem;
}

/* ===== LABEL CELL ===== */
.groove-label-cell {
  width: 120px;
  min-width: 120px;
  padding: 0.5rem;
  background: var(--gl-gray);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gl-text);
  position: sticky;
  left: 0;
  z-index: 10;
}

.groove-label-cell > div:first-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.drum-icon {
  font-size: 1.2rem;
}

.drum-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* ===== VOLUME SLIDER EN LABEL ===== */
.groove-volume-slider {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--gl-gray-light);
  outline: none;
  -webkit-appearance: none;
  margin-top: 0.25rem;
  cursor: ew-resize;
}

.groove-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gl-primary);
  cursor: ew-resize;
  transition: all 0.15s ease;
}

.groove-volume-slider::-webkit-slider-thumb:hover {
  background: var(--gl-secondary);
  transform: scale(1.2);
}

.groove-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gl-primary);
  cursor: ew-resize;
  border: none;
  transition: all 0.15s ease;
}

.groove-volume-slider::-moz-range-thumb:hover {
  background: var(--gl-secondary);
  transform: scale(1.2);
}

/* ===== STEP HEADER ===== */
.groove-step-header {
  width: var(--gl-step-size);
  min-width: var(--gl-step-size);
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--gl-text-dim);
  position: relative;
}

.groove-step-header.beat-start {
  color: var(--gl-text);
  font-weight: 600;
}

.groove-step-header.measure-start::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -2px;
  right: -2px;
  height: 2px;
  background: var(--gl-primary);
}

/* ===== STEPS ===== */
.groove-step {
  width: var(--gl-step-size);
  min-width: var(--gl-step-size);
  height: var(--gl-step-size);
  background: var(--gl-gray-light);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.1s ease;
  position: relative;
  border: 2px solid transparent;
}

.groove-step.beat-start {
  box-shadow: inset -1px 0 0 var(--gl-gray);
}

.groove-step.measure-start {
  box-shadow: inset -2px 0 0 var(--gl-primary);
}

.groove-step:hover {
  background: var(--gl-gray);
  transform: scale(1.1);
}

/* ===== ACENTOS ===== */
.groove-step.accent-0 {
  /* OFF - sin golpe */
  background: var(--gl-gray-light);
}

.groove-step.accent-1 {
  /* GHOST - 40% */
  background: var(--drum-color);
  opacity: 0.4;
}

.groove-step.accent-2 {
  /* NORMAL - 100% */
  background: var(--drum-color);
  opacity: 0.8;
}

.groove-step.accent-3 {
  /* ACCENT - 120% */
  background: var(--drum-color);
  opacity: 1;
  box-shadow: 0 0 8px var(--drum-color);
  border-color: var(--drum-color);
}

/* ===== STEP ACTIVO (reproducción) ===== */
.groove-step.active {
  animation: stepPulse 0.15s ease-out;
  box-shadow: 0 0 16px var(--gl-primary);
}

@keyframes stepPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ===== INSTRUCCIONES ===== */
.groove-instructions {
  background: var(--gl-gray);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.groove-instructions__title {
  font-size: 1.5rem;
  color: var(--gl-text);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.groove-instructions__title i {
  color: var(--gl-primary);
}

.groove-instructions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.groove-instruction {
  text-align: center;
}

.groove-instruction__icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background: var(--gl-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--gl-primary);
}

.groove-instruction h4 {
  font-size: 1.1rem;
  color: var(--gl-text);
  margin-bottom: 0.5rem;
}

.groove-instruction p {
  font-size: 0.9rem;
  color: var(--gl-text-dim);
  line-height: 1.5;
}

/* ===== PREMIUM TEASER ===== */
.groove-premium-teaser {
  background: linear-gradient(135deg, #1a1d24 0%, #2a2d34 100%);
  border: 2px solid var(--gl-secondary);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.groove-premium-teaser__icon {
  font-size: 3rem;
  color: var(--gl-secondary);
  margin-bottom: 1rem;
}

.groove-premium-teaser__title {
  font-size: 2rem;
  color: var(--gl-text);
  margin-bottom: 1rem;
}

.groove-premium-teaser__desc {
  font-size: 1.1rem;
  color: var(--gl-text-dim);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.groove-premium-teaser__features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.groove-premium-feature {
  padding: 0.5rem 1rem;
  background: var(--gl-dark);
  border: 1px solid var(--gl-secondary);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--gl-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== TIPS ===== */
.groove-tips {
  background: var(--gl-gray);
  border-radius: 12px;
  padding: 2rem;
}

.groove-tips__title {
  font-size: 1.5rem;
  color: var(--gl-text);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.groove-tips__title i {
  color: var(--gl-secondary);
}

.groove-tips__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.groove-tips__list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--gl-gray-light);
  line-height: 1.7;
  color: var(--gl-text-dim);
}

.groove-tips__list li:last-child {
  border-bottom: none;
}

.groove-tips__list strong {
  color: var(--gl-text);
}

.groove-tips__list a {
  color: var(--gl-primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--gl-primary);
}

.groove-tips__list a:hover {
  color: var(--gl-secondary);
  border-bottom-color: var(--gl-secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .groove-lab-container {
    padding: 1.5rem 0.75rem;
  }
  
  .groove-controls-main {
    padding: 1.5rem;
  }
  
  .groove-sequencer-wrapper {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .groove-label-cell {
    width: 90px;
    min-width: 90px;
    font-size: 0.8rem;
  }
  
  .drum-icon {
    font-size: 1rem;
  }
  
  .groove-instructions__grid {
    grid-template-columns: 1fr;
  }
  
  .groove-premium-teaser {
    padding: 1.5rem;
  }
  
  .groove-premium-teaser__title {
    font-size: 1.5rem;
  }
}
