/* === CASSETTE PLAYER === */
.cassette-wrapper {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 85;
}

.cassette-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 auto;
  background: var(--panel-strong);
  border: 1px solid var(--line-dim);
  border-radius: 50%;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all 300ms;
}

.cassette-toggle:hover {
  border-color: var(--line);
  color: var(--hot);
  box-shadow: 0 0 12px rgba(242, 77, 255, 0.3);
}

.cassette-player {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(164, 51, 255, 0.1);
  overflow: hidden;
  animation: popupIn 0.25s ease-out;
}

@keyframes popupIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.cassette-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(164, 51, 255, 0.08);
  border-bottom: 1px solid var(--line-dim);
}

.cassette-title {
  font-size: 0.68rem;
  color: var(--lavender);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cassette-close {
  width: 18px;
  height: 18px;
  background: none;
  border: 1px solid var(--line-dim);
  color: var(--muted);
  font-size: 0.7rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 200ms;
}

.cassette-close:hover { border-color: var(--hot); color: var(--hot); }

.cassette-body {
  padding: 14px;
}

/* Tape visual */
.cassette-tape {
  position: relative;
  height: 50px;
  background: rgba(10, 2, 20, 0.6);
  border: 1px solid var(--line-dim);
  border-radius: 4px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.tape-reel {
  width: 24px;
  height: 24px;
  border: 2px solid var(--line-dim);
  border-radius: 50%;
  position: relative;
  animation: reelSpin 2s linear infinite;
  animation-play-state: paused;
}

.tape-reel::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--line-dim);
  border-radius: 50%;
}

@keyframes reelSpin {
  to { transform: rotate(360deg); }
}

.tape-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hot);
}

/* Info */
.cassette-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cassette-channel {
  font-size: 0.78rem;
  color: var(--lavender);
  text-transform: uppercase;
}

.cassette-status {
  font-size: 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Controls */
.cassette-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}

.cass-btn {
  width: 36px;
  height: 28px;
  background: rgba(164, 51, 255, 0.08);
  border: 1px solid var(--line-dim);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 200ms;
}

.cass-btn:hover { border-color: var(--line); color: var(--lavender); }

.cass-play {
  width: 44px;
  border-color: var(--line);
  color: var(--lavender);
}

.cass-play:hover { color: var(--hot); border-color: var(--hot); }

/* EQ bars */
.cassette-eq {
  display: flex;
  gap: 2px;
  justify-content: center;
  align-items: flex-end;
  height: 20px;
}

.cassette-eq span {
  width: 4px;
  background: var(--hot);
  border-radius: 1px;
  animation: eqBounce 0.6s ease-in-out infinite alternate;
  animation-play-state: paused;
  opacity: 0.7;
}

.cassette-eq span:nth-child(1) { height: 8px; animation-delay: 0s; }
.cassette-eq span:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.cassette-eq span:nth-child(3) { height: 6px; animation-delay: 0.2s; }
.cassette-eq span:nth-child(4) { height: 18px; animation-delay: 0.05s; }
.cassette-eq span:nth-child(5) { height: 10px; animation-delay: 0.15s; }
.cassette-eq span:nth-child(6) { height: 16px; animation-delay: 0.08s; }
.cassette-eq span:nth-child(7) { height: 7px; animation-delay: 0.18s; }
.cassette-eq span:nth-child(8) { height: 12px; animation-delay: 0.03s; }
.cassette-eq span:nth-child(9) { height: 20px; animation-delay: 0.12s; }
.cassette-eq span:nth-child(10) { height: 9px; animation-delay: 0.07s; }

@keyframes eqBounce {
  to { height: 3px; }
}

/* Modes */
.cassette-modes {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  border-top: 1px solid var(--line-dim);
}

.mode-btn {
  flex: 1;
  padding: 4px 8px;
  background: none;
  border: 1px solid var(--line-dim);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.62rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 200ms;
}

.mode-btn:hover { border-color: var(--line); color: var(--lavender); }
.mode-btn.active { border-color: var(--hot); color: var(--hot); }

/* === VHS MODE === */
.mode-vhs body,
.mode-vhs {
  --vhs-filter: saturate(1.3) contrast(1.1) brightness(0.95);
}

.mode-vhs .noise { opacity: 0.12; }
.mode-vhs .scanlines { opacity: 0.35; }

.mode-vhs .hero-image img {
  filter: saturate(1.4) contrast(1.15) brightness(0.9);
}

.mode-vhs .panel {
  box-shadow: 2px 0 0 rgba(255, 0, 100, 0.1), -2px 0 0 rgba(0, 200, 255, 0.1), var(--shadow);
}

/* === VINYL MODE === */
.mode-vinyl {
  --hot: #ffaa44;
  --violet: #cc7700;
  --lavender: #ffe4b5;
  --text: #ddc088;
  --muted: #aa8855;
}

.mode-vinyl .noise { opacity: 0.08; }

.mode-vinyl body {
  background:
    radial-gradient(circle at 45% 18%, rgba(180, 120, 40, 0.2), transparent 36rem),
    radial-gradient(circle at 82% 42%, rgba(200, 150, 50, 0.12), transparent 29rem),
    linear-gradient(180deg, #0a0500 0%, #0d0800 48%, #050300 100%);
}

.mode-vinyl .hero-image img {
  filter: sepia(0.3) saturate(0.8) brightness(0.9);
}

/* === MOBILE CASSETTE === */
@media (max-width: 768px) {
  .cassette-wrapper { bottom: 40px; }
  .cassette-toggle { width: 30px; height: 30px; font-size: 0.85rem; }
  .cassette-player { width: calc(100vw - 32px); max-width: 280px; }
}
