/* Base and Typography */
:root {
  --primary: #00ff41; /* Neon green */
  --secondary: #00a2ff; /* Blue */
  --accent: #ff0055; /* Pink */
  --tertiary: #ffcc00; /* Yellow/Gold */
  --dark: #1a1a1a;
  --darker: #121212;
  --light: #ffffff;
  --panel-bg: rgba(26, 26, 26, 0.9);
  --grid-bg: rgba(18, 18, 18, 0.95);
  --glow: 0 0 15px rgba(0, 162, 255, 0.7);
  --grid-border: #2a2a3a;
  --button-active: var(--secondary);
  --button-hover: rgba(0, 162, 255, 0.2);
  --button-ticked: var(--primary);
  --section-active: var(--secondary);
  --section-inactive: #333333;
}

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

body {
  font-family: 'Rajdhani', sans-serif;
  margin: 0;
  padding: 0;
  color: var(--light);
  background-color: var(--darker);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

h1 {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--secondary);
  text-shadow: 0 0 8px rgba(30, 144, 255, 0.7);
  margin: 0;
  padding: 0;
}

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--secondary);
  text-shadow: 0 0 5px rgba(30, 144, 255, 0.5);
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--light);
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}

p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.9;
  color: var(--light);
}

.accent {
  color: var(--accent);
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 52% { opacity: 0; }
  53%, 100% { opacity: 1; }
}

/* Mobile Top Menu */
.mobile-top-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background-color: var(--darker);
  border-bottom: 2px solid var(--secondary);
  z-index: 1000;
  align-items: center;
  padding: 0 15px;
}

.mobile-menu-btn {
  font-size: 1.5rem;
  color: var(--secondary);
  cursor: pointer;
  padding: 5px;
}

.mobile-title {
  flex: 1;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  color: var(--secondary);
  letter-spacing: 1px;
}

.playback-indicator {
  font-size: 0.8rem;
  color: var(--primary);
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.3);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1100;
  padding: 20px;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-menu-close {
  position: absolute;
  top: 15px;
  right: 15px;
  color: var(--secondary);
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-menu-content {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mobile-menu-item {
  display: block;
  padding: 12px 15px;
  background-color: rgba(30, 144, 255, 0.1);
  color: var(--secondary);
  text-decoration: none;
  font-family: 'Orbitron', sans-serif;
  border-radius: 5px;
  border: 1px solid rgba(30, 144, 255, 0.3);
  text-align: center;
  font-size: 1rem;
}

.mobile-menu-item:active {
  background-color: rgba(30, 144, 255, 0.2);
  transform: scale(0.98);
}

/* Sidebar Navigation */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 180px;
  height: 100%;
  background-color: rgba(10, 10, 15, 0.95);
  border-right: 2px solid var(--secondary);
  padding: 20px 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

.sidebar-button {
  position: relative;
  z-index: 110;
  display: block;
  width: 80%;
  margin: 10px 0;
  padding: 12px 10px;
  background-color: rgba(30, 144, 255, 0.1);
  color: var(--secondary);
  text-decoration: none;
  text-align: center;
  border-radius: 8px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border: 1px solid rgba(30, 144, 255, 0.2);
  cursor: pointer;
}

.sidebar-button:hover {
  background-color: rgba(30, 144, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 15px rgba(30, 144, 255, 0.7);
  text-shadow: 0 0 5px var(--secondary);
}

/* Main Content Wrapper */
.main-content {
  margin-left: 180px;
  padding: 20px;
}

/* Interface Header */
.interface-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(30, 144, 255, 0.3);
}

.inspire-logo {
  margin-right: 30px;
}

.logo-img {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(30, 144, 255, 0.7));
}

.interface-title {
  flex: 1;
}

.subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  color: var(--secondary);
  margin-top: 5px;
  font-weight: 500;
  opacity: 0.8;
  text-shadow: 0 0 5px rgba(30, 144, 255, 0.5);
}

.playback-status {
  position: absolute;
  top: 5px;
  right: 10px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  color: var(--secondary);
  background-color: rgba(0, 0, 0, 0.5);
  padding: 5px 10px;
  border-radius: 5px;
  border-left: 3px solid var(--secondary);
  box-shadow: 0 0 10px rgba(0, 162, 255, 0.3);
  text-shadow: 0 0 3px rgba(0, 162, 255, 0.5);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.playback-status.playing {
  color: var(--primary);
  border-left-color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
  text-shadow: 0 0 3px rgba(0, 255, 65, 0.5);
}

/* Core styles matching the dashboard */
.inspire-interface {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  color: var(--light);
  background-color: var(--darker);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.inspire-interface::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--dark) 0%, transparent 100%);
  opacity: 0.7;
  z-index: 0;
}

.inspire-interface::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(30, 144, 255, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(0, 162, 255, 0.1) 0%, transparent 20%);
  z-index: 0;
}

/* Status Bar */
.status-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.9rem;
  padding: 8px 15px;
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid var(--secondary);
  border-radius: 3px;
}

.status-indicator {
  font-weight: 600;
  display: flex;
  align-items: center;
  color: var(--secondary);
  text-shadow: 0 0 5px rgba(30, 144, 255, 0.5);
}

.status-indicator::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--secondary);
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 2s infinite;
  box-shadow: 0 0 8px rgba(30, 144, 255, 0.7);
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.status-dots {
  display: flex;
  gap: 5px;
}

.dot {
  width: 6px;
  height: 6px;
  background: var(--secondary);
  border-radius: 50%;
  opacity: 0.5;
  box-shadow: 0 0 5px rgba(30, 144, 255, 0.5);
}

.dot:nth-child(1) {
  animation: dot-pulse 2s infinite;
}

.dot:nth-child(2) {
  animation: dot-pulse 2s infinite 0.5s;
}

.dot:nth-child(3) {
  animation: dot-pulse 2s infinite 1s;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.status-code {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 1px;
  color: var(--secondary);
  text-shadow: 0 0 5px rgba(30, 144, 255, 0.5);
}

/* Module structure */
.beat-machine-module {
  position: relative;
  z-index: 2;
  padding: 25px;
  background: var(--grid-bg);
  border-radius: 8px;
  border: 1px solid rgba(30, 144, 255, 0.2);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 30px;
}

.module-container {
  margin-bottom: 35px;
}

.module-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  color: var(--secondary);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

/* Beat Machine Section Selector */
.section-selector {
  margin-bottom: 25px;
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
  overflow-x: auto;
  padding-bottom: 5px;
  -webkit-overflow-scrolling: touch;
}

.section-tab {
  background: rgba(30, 144, 255, 0.1);
  border: 1px solid rgba(30, 144, 255, 0.3);
  border-radius: 5px;
  padding: 10px 18px;
  color: var(--secondary);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
  text-align: center;
  flex-shrink: 0;
}

.section-tab:hover {
  background: rgba(30, 144, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(30, 144, 255, 0.3);
}

.section-tab.active {
  background: var(--secondary);
  color: var(--darker);
  box-shadow: 0 0 15px rgba(30, 144, 255, 0.5);
}

/* Controls Panel */
.controls-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  align-items: flex-start;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  padding: 22px;
  border-radius: 8px;
  border: 1px solid rgba(30, 144, 255, 0.2);
}

.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(30, 144, 255, 0.1);
  min-width: 200px;
}

.control-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  color: var(--secondary);
  margin-bottom: 10px;
  text-shadow: 0 0 5px rgba(30, 144, 255, 0.3);
  letter-spacing: 1px;
}

.tempo-display {
  position: relative;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(30, 144, 255, 0.3);
  border-radius: 8px;
  width: 120px;
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

.tempo-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  color: var(--secondary);
  text-shadow: 0 0 10px rgba(30, 144, 255, 0.7);
}

.tempo-label {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  color: var(--secondary);
  opacity: 0.8;
}

.tempo-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.tempo-slider-container {
  width: 100%;
}

.tempo-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
  outline: none;
  border: 1px solid rgba(30, 144, 255, 0.3);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.tempo-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--secondary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(30, 144, 255, 0.7);
}

.tempo-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--secondary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(30, 144, 255, 0.7);
  border: none;
}

.tempo-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.control-btn {
  background: rgba(30, 144, 255, 0.1);
  border: 1px solid rgba(30, 144, 255, 0.3);
  border-radius: 5px;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Orbitron', sans-serif;
}

.control-btn:hover {
  background: rgba(30, 144, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 0 15px rgba(30, 144, 255, 0.3);
}

.control-btn.wide {
  width: auto;
  padding: 0 20px;
  font-size: 0.9rem;
  height: 45px;
  letter-spacing: 1px;
}

.control-btn.large {
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
}

.control-btn.primary {
  background: rgba(0, 255, 65, 0.1);
  border-color: rgba(0, 255, 65, 0.3);
  color: var(--primary);
}

.control-btn.primary:hover {
  background: rgba(0, 255, 65, 0.2);
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.playback-controls {
  display: flex;
  justify-content: center;
  margin: 0 10px;
}

.pattern-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Beat Grid, specifically enhanced for mobile */
.beat-maker-wrap {
  margin-bottom: 35px;
}

.mobile-instrument-select {
  display: none;
  margin-bottom: 15px;
  align-items: center;
  gap: 10px;
}

.mobile-instrument-select label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  color: var(--secondary);
}

.beat-maker-container {
  display: flex;
  position: relative;
}

.instrument-labels {
  width: 160px;
  display: flex;
  flex-direction: column;
  padding-right: 15px;
}

.instrument-label {
  height: 30px;
  margin: 4px 0;
  color: var(--secondary);
  text-shadow: 0 0 5px rgba(30, 144, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.75rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.instrument-label.active {
  color: var(--primary);
  text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.instrument-label.custom-sound {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upload-btn {
  font-size: 0.65rem;
  background: var(--accent);
  color: white;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: pointer;
  margin-right: 5px;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.upload-btn:hover {
  background: rgba(255, 0, 85, 0.8);
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.4);
}

.sound-upload {
  display: none;
}

.grid-container {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  border: 1px solid rgba(30, 144, 255, 0.2);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
  padding: 15px;
  overflow-x: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.grid {
  display: grid;
  grid-template-columns: repeat(16, minmax(40px, 1fr));
  grid-auto-rows: 30px;
  gap: 8px;
  min-width: 650px;
}

.grid button {
  background: transparent;
  border: 2px solid var(--secondary);
  padding: 0;
  height: 30px;
  position: relative;
  outline: none;
  border-radius: 3px;
  transition: all 0.2s ease;
  box-shadow: 0 0 3px rgba(30, 144, 255, 0.3);
  cursor: pointer;
}

.grid button:hover {
  background: var(--button-hover);
  transform: scale(1.05);
}

.grid button.on {
  background: var(--button-active);
  box-shadow: 0 0 8px var(--secondary);
}

.grid button.on:hover {
  background: rgba(0, 162, 255, 0.8);
}

.grid button.ticked {
  background: var(--button-ticked);
  box-shadow: 0 0 12px var(--primary);
}

.grid button.ticked:hover {
  background: rgba(0, 255, 65, 0.8);
}

/* Mobile Pattern Navigation */
.mobile-grid-navigation {
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  border: 1px solid rgba(30, 144, 255, 0.2);
}

.beat-page-indicator {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  color: var(--secondary);
}

.beat-navigation-controls {
  display: flex;
  gap: 10px;
}

.nav-btn {
  background: rgba(30, 144, 255, 0.1);
  border: 1px solid rgba(30, 144, 255, 0.3);
  border-radius: 5px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 1rem;
  cursor: pointer;
}

.nav-btn:active {
  background: rgba(30, 144, 255, 0.2);
  transform: scale(0.95);
}

/* Effects Panel */
.effects-module {
  margin-bottom: 35px;
}

.effects-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid rgba(30, 144, 255, 0.2);
}

.effect-group {
  flex: 1;
  min-width: 240px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(30, 144, 255, 0.1);
  padding: 15px;
}

.effect-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  color: var(--secondary);
  margin-bottom: 15px;
  text-shadow: 0 0 5px rgba(30, 144, 255, 0.3);
  letter-spacing: 1px;
  text-align: center;
}

.effect-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.slider-control {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.slider-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  color: var(--light);
  letter-spacing: 0.5px;
}

.slider-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  color: var(--secondary);
  text-align: right;
}

.effect-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.6);
  outline: none;
  border: 1px solid rgba(30, 144, 255, 0.2);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.effect-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--secondary);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(30, 144, 255, 0.5);
}

.effect-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--secondary);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(30, 144, 255, 0.5);
  border: none;
}

.effect-toggle {
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(30, 144, 255, 0.2);
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 3px;
  background-color: var(--light);
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: rgba(0, 255, 65, 0.3);
  border-color: rgba(0, 255, 65, 0.5);
}

input:focus + .toggle-slider {
  box-shadow: 0 0 1px rgba(0, 255, 65, 0.5);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
  background-color: var(--primary);
}

/* MIDI Keyboard */
.keyboard-module {
  margin-bottom: 35px;
}

.keyboard-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(30, 144, 255, 0.2);
  border-bottom: none;
  align-items: center;
}

.preset-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.preset-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  color: var(--secondary);
  letter-spacing: 1px;
}

.octave-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.octave-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  color: var(--secondary);
  letter-spacing: 1px;
}

.octave-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.octave-display {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.2rem;
  color: var(--secondary);
  width: 30px;
  text-align: center;
}

.keyboard-options {
  display: flex;
  gap: 15px;
}

.option-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.option-checkbox input {
  width: 18px;
  height: 18px;
  background: rgba(30, 144, 255, 0.1);
  border: 1px solid rgba(30, 144, 255, 0.3);
  border-radius: 3px;
  cursor: pointer;
}

.checkbox-label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  color: var(--light);
  letter-spacing: 0.5px;
}

.midi-keyboard {
  display: flex;
  height: 140px;
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 0 0 8px 8px;
  border: 1px solid rgba(30, 144, 255, 0.2);
  border-top: none;
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.key {
  position: relative;
  cursor: pointer;
  transition: all 0.1s ease;
  user-select: none;
}

.key.white {
  background: linear-gradient(to bottom, #fff 0%, #eee 100%);
  height: 100%;
  width: 40px;
  border: 1px solid #888;
  border-radius: 0 0 4px 4px;
  color: #333;
  z-index: 1;
}

.key.white:hover {
  background: linear-gradient(to bottom, #f0f8ff 0%, #e6f2ff 100%);
}

.key.white.active {
  background: linear-gradient(to bottom, var(--secondary) 0%, rgba(0, 162, 255, 0.8) 100%);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.key.black {
  background: linear-gradient(to bottom, #444 0%, #222 100%);
  height: 65%;
  width: 24px;
  border: 1px solid #000;
  border-radius: 0 0 2px 2px;
  margin-left: -12px;
  margin-right: -12px;
  z-index: 2;
  color: #fff;
}

.key.black:hover {
  background: linear-gradient(to bottom, #666 0%, #444 100%);
}

.key.black.active {
  background: linear-gradient(to bottom, var(--accent) 0%, rgba(255, 0, 85, 0.8) 100%);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.key-label {
  position: absolute;
  bottom: 5px;
  width: 100%;
  text-align: center;
  font-size: 0.65rem;
  font-family: 'Share Tech Mono', monospace;
  opacity: 0.7;
}

.keyboard-info {
  text-align: center;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--light);
  opacity: 0.7;
  font-family: 'Rajdhani', sans-serif;
}

/* Option Select */
.option-select {
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(30, 144, 255, 0.3);
  border-radius: 5px;
  color: var(--secondary);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  appearance: none;
  min-height: 45px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 1px;
}

.option-select:hover {
  background: rgba(30, 144, 255, 0.1);
  box-shadow: 0 0 10px rgba(30, 144, 255, 0.2);
}

.option-select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 10px rgba(30, 144, 255, 0.3);
}

/* Section Controls */
.section-controls {
  margin-bottom: 35px;
}

.section-control-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 15px;
}

/* Sequencer Timeline */
.sequencer-timeline {
  margin-bottom: 20px;
}

.timeline-container {
  display: flex;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 5px;
  border: 1px solid rgba(30, 144, 255, 0.2);
  height: 50px;
  overflow: hidden;
  margin-bottom: 15px;
  margin-top: 15px;
}

.timeline-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  border-right: 1px solid var(--grid-border);
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
}

.timeline-section:last-child {
  border-right: none;
}

.timeline-section:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.timeline-section.intro {
  background: rgba(255, 0, 160, 0.2);
}

.timeline-section.verse {
  background: rgba(0, 162, 255, 0.2);
}

.timeline-section.chorus {
  background: rgba(0, 255, 65, 0.2);
}

.timeline-section.outro {
  background: rgba(255, 165, 0, 0.2);
}

/* Panel blinker */
.panel-blinker {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--secondary);
  bottom: 15px;
  right: 15px;
  animation: blinker 3s infinite;
  box-shadow: 0 0 10px rgba(30, 144, 255, 0.8);
}

@keyframes blinker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Interface Footer */
.interface-footer {
  position: relative;
  z-index: 2;
  margin-top: 30px;
  padding-top: 20px;
}

.footer-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
  margin-bottom: 15px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  opacity: 0.7;
}

.footer-code {
  font-family: 'Orbitron', sans-serif;
  color: var(--secondary);
  text-shadow: 0 0 5px rgba(30, 144, 255, 0.5);
}

/* Notification System */
.notification-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
}

.notification {
  background: rgba(0, 0, 0, 0.75);
  border-left: 3px solid var(--secondary);
  color: var(--secondary);
  padding: 10px 20px;
  border-radius: 5px;
  margin-bottom: 10px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 162, 255, 0.3);
  animation: notification-slide-in 0.3s ease forwards;
  max-width: 90vw;
  text-shadow: 0 0 5px rgba(0, 162, 255, 0.5);
}

@keyframes notification-slide-in {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes notification-slide-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Added scanning animation */
@keyframes scan {
  0% { background-position: 0% 0%; }
  100% { background-position: 0% 100%; }
}

.scanning {
  position: relative;
}

.scanning::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(0, 255, 65, 0.2), transparent);
  background-size: 100% 300%;
  animation: scan 2s linear infinite;
  pointer-events: none;
  z-index: 1;
  border-radius: inherit;
}

/* Added glitch effect animation */
@keyframes glitch {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); filter: hue-rotate(90deg); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

.glitch {
  animation: glitch 0.3s forwards;
}

/* Custom styles for touch devices */
.touch-device .sidebar-button,
.touch-device .control-btn,
.touch-device .section-tab,
.touch-device .key {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

.touch-device .upload-btn {
  cursor: default;
}

/* Fast tap response */
.touch-device .sidebar-button:active,
.touch-device .control-btn:active,
.touch-device .section-tab:active,
.touch-device .key:active {
  transform: scale(0.97);
  transition: transform 0.1s;
}

/* Responsive styles - MAJOR MOBILE ENHANCEMENTS */
@media (max-width: 1200px) {
  .controls-panel, .effects-panel {
    gap: 15px;
    justify-content: space-around;
  }
  
  .control-group, .effect-group {
    min-width: 180px;
  }
  
  .midi-keyboard {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 992px) {
  .playback-status {
    position: static;
    margin-left: auto;
    margin-top: 10px;
  }
  
  .interface-header {
    flex-wrap: wrap;
  }
  
  .instrument-label {
    font-size: 0.7rem;
  }
  
  .effect-group {
    flex: 0 0 calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  /* Mobile Top Menu */
  .mobile-top-menu {
    display: flex;
  }
  
  body {
    padding-top: 50px; /* Space for fixed top menu */
  }
  
  .notification-container {
    top: 60px;
  }
  
  /* Hide sidebar for mobile */
  .sidebar {
    display: none;
  }
  
  .main-content {
    margin-left: 0;
    padding: 15px;
  }
  
  .interface-header {
    flex-direction: column;
    text-align: center;
  }
  
  .inspire-logo {
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .playback-status {
    width: 100%;
    margin-top: 15px;
    text-align: center;
  }
  
  .status-bar {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  
  .status-dots {
    display: none;
  }
  
  /* Improved grid display for mobile */
  .beat-maker-container {
    flex-direction: column;
  }
  
  .mobile-instrument-select {
    display: flex;
  }
  
  .instrument-labels {
    display: none;
  }
  
  .grid-container {
    margin-top: 15px;
    width: 100%;
  }
  
  .grid {
    grid-template-columns: repeat(8, 1fr);
    min-width: 0;
    width: 100%;
  }
  
  .mobile-grid-navigation {
    display: flex;
  }
  
  /* More touch-friendly effect controls */
  .control-group, .effect-group {
    flex: 0 0 100%;
  }
  
  .effect-group {
    order: 3;
  }
  
  .keyboard-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  
  /* Ensure minimum touch target size */
  .control-btn,
  .section-tab,
  .option-select,
  .key,
  .nav-btn,
  .toggle {
    min-height: 44px;
  }
  
  .tempo-slider, .effect-slider {
    height: 10px;
  }
  
  .tempo-slider::-webkit-slider-thumb,
  .effect-slider::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }
  
  .tempo-slider::-moz-range-thumb,
  .effect-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
  }
  
  .timeline-container {
    height: 40px;
  }
  
  .timeline-section {
    font-size: 0.7rem;
  }
  
  .midi-keyboard {
    height: 120px;
  }
  
  .key.white {
    width: 36px;
  }
  
  .key.black {
    width: 20px;
    margin-left: -10px;
    margin-right: -10px;
  }
}

/* Further mobile optimizations */
@media (max-width: 480px) {
  .inspire-interface {
    padding: 20px 12px;
  }
  
  .beat-machine-module {
    padding: 15px;
  }
  
  h1 {
    font-size: 1.7rem;
  }
  
  .subtitle {
    font-size: 0.9rem;
  }
  
  /* Improved grid sizing for small screens */
  .grid button {
    height: 45px;
  }
  
  .section-control-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .controls-panel, .effects-panel {
    padding: 15px;
    gap: 10px;
  }
  
  .tempo-display {
    width: 100px;
    height: 75px;
  }
  
  .tempo-value {
    font-size: 2rem;
  }
  
  .control-btn.large {
    width: 50px;
    height: 50px;
  }
  
  .control-btn.wide {
    padding: 0 12px;
    font-size: 0.8rem;
  }
  
  .option-select {
    padding: 10px;
    font-size: 0.8rem;
  }
  
  .midi-keyboard {
    height: 100px;
    padding: 10px;
  }
  
  .key.white {
    width: 32px;
  }
  
  .key.black {
    width: 18px;
    margin-left: -9px;
    margin-right: -9px;
  }
  
  .keyboard-info {
    font-size: 0.75rem;
  }
}

/* Grid pattern mobile optimization */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(8, 1fr);
  }
  
  .grid button {
    aspect-ratio: 1/1;
    height: auto;
    min-height: 40px;
  }
  
  .beat-maker-wrap {
    padding-bottom: 10px;
  }
}

/* Fix for iOS Safari scrolling issues */
@supports (-webkit-overflow-scrolling: touch) {
  body {
    -webkit-overflow-scrolling: touch;
  }
  
  .grid-container,
  .midi-keyboard,
  .section-tabs,
  .instrument-labels {
    -webkit-overflow-scrolling: touch;
  }
  
  .grid button {
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Enhanced tap target sizes for iOS */
  @media (max-width: 768px) {
    .grid button {
      min-height: 48px;
    }
    
    .section-tab,
    .control-btn,
    .nav-btn {
      min-height: 48px;
    }
  }
}
