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

body {
  background: #0a0a0a;
  min-height: 100vh;
  font-family: 'Share Tech Mono', monospace;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse at 50% 0%, rgba(40,30,20,0.4) 0%, transparent 60%),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.008) 2px, rgba(255,255,255,0.008) 4px);
  pointer-events: none;
  z-index: 0;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.deck-panel {
  position: relative;
  z-index: 1;
  background: 
    linear-gradient(180deg, #666 0%, #555 2%, #4a4a4a 4%, #3d3d3d 50%, #353535 96%, #2a2a2a 98%, #222 100%);
  border-radius: 12px;
  border: 1px solid #555;
  box-shadow:
    0 2px 0 #666,
    0 -1px 0 #222,
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 20px 60px rgba(0,0,0,0.8),
    0 5px 20px rgba(0,0,0,0.5);
}

.deck-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 1px,
    rgba(255,255,255,0.015) 1px,
    rgba(255,255,255,0.015) 2px
  );
  pointer-events: none;
}

.cassette-well {
  background: 
    linear-gradient(135deg, rgba(30,25,20,0.95) 0%, rgba(20,18,15,0.9) 100%);
  border-radius: 8px;
  border: 2px solid #222;
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,0.8),
    inset 0 0 20px rgba(0,0,0,0.4),
    0 1px 0 rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}

.cassette-well::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,200,100,0.0) 0%, transparent 70%);
  pointer-events: none;
  transition: all 0.5s;
}

.cassette-well.backlit::before {
  background: radial-gradient(ellipse at 50% 30%, rgba(255,180,60,0.08) 0%, transparent 70%);
}

.transport-btn {
  width: 64px;
  height: 48px;
  background: linear-gradient(180deg, #444 0%, #333 40%, #2a2a2a 100%);
  border: 1px solid #555;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 18px;
  transition: all 0.08s ease;
  box-shadow:
    0 3px 0 #111,
    0 4px 8px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.1);
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}

.transport-btn:hover {
  background: linear-gradient(180deg, #4a4a4a 0%, #383838 40%, #303030 100%);
}

.transport-btn:active, .transport-btn.pressed {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #111,
    0 1px 4px rgba(0,0,0,0.4),
    inset 0 1px 3px rgba(0,0,0,0.3);
  background: linear-gradient(180deg, #2a2a2a 0%, #333 100%);
}

.transport-btn.record-btn {
  color: #cc0000;
}

.transport-btn.record-btn:hover {
  color: #ff2222;
}

@keyframes spinCW {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinCCW {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.reel {
  transition: animation-duration 0.3s;
}

.knob {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: 
    radial-gradient(circle at 35% 35%, #666, #333 60%, #222 100%);
  border: 2px solid #444;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.15);
  cursor: grab;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

.knob::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 12px;
  background: #ddd;
  border-radius: 1px;
}

.knob-large {
  width: 64px;
  height: 64px;
}

.knob-large::after {
  height: 16px;
  top: 6px;
}

.led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #331111;
  border: 1px solid #222;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
  transition: all 0.3s;
}

.led.on-red {
  background: #ff2200;
  box-shadow: 0 0 6px #ff2200, 0 0 12px rgba(255,34,0,0.4);
}

.led.on-green {
  background: #39FF14;
  box-shadow: 0 0 6px #39FF14, 0 0 12px rgba(57,255,20,0.4);
}

.led.on-amber {
  background: #FFB000;
  box-shadow: 0 0 6px #FFB000, 0 0 12px rgba(255,176,0,0.4);
}

.counter-digit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 32px;
  background: #111;
  color: #eee;
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  font-weight: 700;
  border: 1px solid #333;
  border-radius: 2px;
  box-shadow: inset 0 1px 4px rgba(0,0,0,0.8);
  margin: 0 1px;
}

.vu-meter {
  width: 100px;
  height: 60px;
  background: 
    linear-gradient(180deg, #FFF8E7 0%, #f5ecd0 100%);
  border-radius: 4px 4px 0 0;
  border: 1px solid #999;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.vu-needle {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 2px;
  height: 45px;
  background: linear-gradient(180deg, #111 0%, #333 100%);
  transform-origin: bottom center;
  transition: transform 0.08s ease-out;
  border-radius: 1px;
}

.toggle-switch {
  width: 40px;
  height: 20px;
  background: #222;
  border-radius: 10px;
  border: 1px solid #444;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
  transition: background 0.2s;
}

.toggle-switch.on {
  background: #1a3a1a;
}

.toggle-handle {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: linear-gradient(180deg, #888, #555);
  border-radius: 50%;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.toggle-switch.on .toggle-handle {
  left: 22px;
}

.drop-zone {
  border: 2px dashed #555;
  border-radius: 8px;
  transition: all 0.3s;
  cursor: pointer;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: #FFB000;
  background: rgba(255,176,0,0.05);
  box-shadow: 0 0 20px rgba(255,176,0,0.1);
}

.eq-bar {
  display: inline-block;
  width: 4px;
  margin: 0 1px;
  background: #39FF14;
  border-radius: 1px;
  transition: height 0.05s;
  box-shadow: 0 0 4px rgba(57,255,20,0.3);
}

.side-btn {
  padding: 6px 14px;
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #555;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 1px;
}

.side-btn.active {
  background: linear-gradient(180deg, #3a3020 0%, #2a2010 100%);
  color: #FFB000;
  border-color: #FFB000;
  box-shadow: inset 0 0 10px rgba(255,176,0,0.1);
}

.side-btn.inactive {
  background: linear-gradient(180deg, #333 0%, #222 100%);
  color: #666;
  border-color: #444;
}

.cassette-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 52px;
  border-radius: 4px;
  border: 1px solid #444;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.cassette-thumb:hover {
  border-color: #FFB000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.slider-track {
  width: 100%;
  height: 6px;
  background: #222;
  border-radius: 3px;
  border: 1px solid #333;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
  position: relative;
  cursor: pointer;
}

.slider-fill {
  height: 100%;
  background: linear-gradient(90deg, #555, #888);
  border-radius: 3px;
}

.slider-thumb-handle {
  position: absolute;
  top: -5px;
  width: 16px;
  height: 16px;
  background: linear-gradient(180deg, #999, #555);
  border: 1px solid #777;
  border-radius: 50%;
  transform: translateX(-50%);
  cursor: grab;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Toast notification */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #39FF14;
  font-family: 'VT323', monospace;
  font-size: 18px;
  padding: 10px 24px;
  border: 1px solid #39FF14;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(57,255,20,0.2);
  z-index: 1000;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Mobile responsive */
@media (max-width: 860px) {
  .deck-panel {
    border-radius: 8px;
    margin: 10px;
  }
}

/* Footer */
.tapecaster-footer {
  text-align: center;
  padding: 20px;
  color: #444;
  font-size: 12px;
  font-family: 'Share Tech Mono', monospace;
}

.tapecaster-footer a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.tapecaster-footer a:hover {
  color: #FFB000;
}