:root {
  --body-bg: #1a1a1a;
  --cassette-bg: #2d2d2d;
  --cassette-accent: #ff9800;
  --reel-bg: #111;
  --tape-color: #4a3427;
  --text-color: #eee;
  --font-main: 'Outfit', sans-serif;
}

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

body {
  background-color: var(--body-bg);
  color: var(--text-color);
  font-family: var(--font-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

.container {
  text-align: center;
}

h1 {
  margin-bottom: 2rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cassette-accent);
}

/* Cassette Player Styles */
.cassette {
  position: relative;
  width: 600px;
  height: 340px;
  background: var(--cassette-bg);
  border-radius: 15px;
  box-shadow: 
    0 20px 50px rgba(0,0,0,0.5),
    inset 0 2px 5px rgba(255,255,255,0.1);
  border: 4px solid #1a1a1a;
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: transform 0.3s ease;
}

.cassette::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
  border-radius: 11px;
}

.label-strip {
  width: 100%;
  height: 40px;
  background: #fff;
  color: #333;
  display: flex;
  align-items: center;
  padding: 0 15px;
  font-weight: bold;
  font-family: 'Courier New', Courier, monospace;
  border-radius: 4px;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
  cursor: text;
  outline: none;
}

.label-strip:focus {
  background: #f0f0f0;
}

.tape-window {
  flex-grow: 1;
  background: #111;
  border-radius: 8px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: relative;
  padding: 0 40px;
  border: 8px solid #222;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.reel {
  width: 120px;
  height: 120px;
  background: var(--reel-bg);
  border-radius: 50%;
  border: 4px solid #333;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reel::before {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border: 2px dashed #444;
  border-radius: 50%;
}

.reel-hub {
  width: 40px;
  height: 40px;
  background: #666;
  border-radius: 50%;
  position: relative;
}

.reel-hub::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  background: #444;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.reel-hub::before {
  content: '';
  position: absolute;
  width: 4px;
  height: 100%;
  background: #444;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.tape-path {
  position: absolute;
  bottom: 20px;
  width: 80%;
  height: 4px;
  background: var(--tape-color);
  opacity: 0.8;
}

.vu-meter {
  position: absolute;
  bottom: 40px;
  width: 120px;
  height: 8px;
  background: #000;
  border: 1px solid #333;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: inset 0 0 5px #000;
}

.vu-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(to right, #4caf50 0%, #4caf50 70%, #ffeb3b 85%, #f44336 100%);
  transition: width 0.1s ease;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

/* Animations */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinning {
  animation: spin 2s linear infinite;
}

.spinning-fast {
  animation: spin 1s linear infinite;
}

/* Controls */
.controls {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

button {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  background: #333;
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 0 #111;
  text-transform: uppercase;
  font-size: 0.8rem;
}

button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #111;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 4px 0 #111;
}

button.record {
  background: #d32f2f;
}
button.record.active {
  background: #ff5252;
  box-shadow: 0 0 15px rgba(255, 82, 82, 0.5);
}

button.play {
  background: #388e3c;
}

button.stop {
  background: #1976d2;
}

button.save {
  background: var(--cassette-accent);
  color: #000;
}

button.eject {
  background: #555;
}

.status-bar {
  margin-top: 15px;
  font-family: 'Courier New', Courier, monospace;
  color: var(--cassette-accent);
  font-size: 1.2rem;
}

.timer {
  margin-bottom: 5px;
}
