/* === CASSETTE TAPE === */
/* Animated cassette with rotating spools */

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

:root {
  --tape-body: #2a2a2a;
  --tape-label: #f5e6d3;
  --tape-window: #1a1a1a;
  --reel-color: #fafafa;
  --tape-brown: #3d2817;
  --accent-red: #c41e3a;
  --accent-blue: #2b5797;
  --text-dark: #1a1a1a;
}

body {
  font-family: 'Courier New', monospace;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  overflow-x: hidden;
  color: #fff;
}

/* === CONTAINER === */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* === HERO === */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.title {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  color: #fff;
  text-shadow:
    3px 3px 0 var(--accent-red),
    6px 6px 0 rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: clamp(0.8rem, 2vw, 1rem);
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.5rem;
}

/* === CASSETTE WRAPPER === */
.cassette-wrapper {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
  perspective: 1000px;
}

/* === CASSETTE === */
.cassette {
  width: min(400px, 90vw);
  aspect-ratio: 1.6;
}

.cassette-body {
  width: 100%;
  height: 100%;
  background: var(--tape-body);
  border-radius: 8px;
  position: relative;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* === LABEL === */
.label {
  position: absolute;
  top: 8%;
  left: 10%;
  right: 10%;
  height: 35%;
  background: var(--tape-label);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8%;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.label-lines {
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent-blue) 0px,
    var(--accent-blue) 100%
  );
  opacity: 0.3;
}

.label-text {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tape-title {
  font-size: clamp(0.9rem, 3vw, 1.2rem);
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.1em;
}

.tape-artist {
  font-size: clamp(0.6rem, 2vw, 0.8rem);
  color: var(--accent-red);
  letter-spacing: 0.15em;
}

/* === WINDOW === */
.window {
  position: absolute;
  top: 48%;
  left: 15%;
  right: 15%;
  height: 35%;
  background: var(--tape-window);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10%;
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, 0.8),
    0 1px 0 rgba(255, 255, 255, 0.1);
}

/* === REELS === */
.reel {
  width: 30%;
  aspect-ratio: 1;
  background: var(--reel-color);
  border-radius: 50%;
  position: relative;
  box-shadow:
    inset 0 0 10px rgba(0, 0, 0, 0.2),
    0 2px 5px rgba(0, 0, 0, 0.3);
}

.reel-left {
  animation: spin 3s linear infinite;
}

.reel-right {
  animation: spin 3s linear infinite reverse;
}

.reel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30%;
  height: 30%;
  background: var(--tape-brown);
  border-radius: 50%;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.reel-center::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  height: 40%;
  background: var(--tape-window);
  border-radius: 50%;
}

.reel-spokes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.reel-spokes::before,
.reel-spokes::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  transform-origin: center;
}

.reel-spokes::before {
  transform: translate(-50%, -50%) rotate(0deg);
}

.reel-spokes::after {
  transform: translate(-50%, -50%) rotate(60deg);
}

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

/* === TAPE STRIP === */
.tape-strip {
  position: absolute;
  top: 50%;
  left: 25%;
  right: 25%;
  height: 6px;
  background: var(--tape-brown);
  transform: translateY(-50%);
  border-radius: 1px;
}

/* === SCREWS === */
.screw {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #666;
  border-radius: 50%;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.5);
}

.screw::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 1px;
  background: #333;
}

.screw-tl { top: 5%; left: 3%; }
.screw-tr { top: 5%; right: 3%; }
.screw-bl { bottom: 5%; left: 3%; }
.screw-br { bottom: 5%; right: 3%; }

/* === CASSETTE EDGE === */
.cassette-edge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8%;
  background: linear-gradient(90deg,
    var(--tape-body) 0%,
    #3a3a3a 20%,
    var(--tape-body) 40%,
    #3a3a3a 60%,
    var(--tape-body) 80%,
    #3a3a3a 100%
  );
  border-radius: 0 0 8px 8px;
}

/* === TRACKLIST === */
.tracklist {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.tracklist h2 {
  font-size: clamp(0.8rem, 2vw, 1rem);
  letter-spacing: 0.3em;
  color: var(--accent-red);
  margin-bottom: 1rem;
  text-align: center;
}

.tracks {
  list-style: none;
  counter-reset: track;
}

.tracks li {
  counter-increment: track;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.2);
  font-size: clamp(0.8rem, 2vw, 0.95rem);
}

.tracks li::before {
  content: counter(track, decimal-leading-zero) ".";
  color: rgba(255, 255, 255, 0.4);
  margin-right: 0.75rem;
}

.track-name {
  flex: 1;
}

.duration {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9em;
}

/* === STORY CARDS === */
.story {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  background: rgba(245, 230, 211, 0.05);
  border-left: 3px solid var(--accent-red);
  padding: 1.5rem;
}

.card h3 {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: var(--tape-label);
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.card p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  font-family: Georgia, serif;
}

/* === FOOTER === */
.footer {
  text-align: center;
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
}

.warning {
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.5rem;
}

.brand {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  letter-spacing: 0.3em;
  color: var(--accent-red);
}

/* === RESPONSIVE === */
@media (min-width: 600px) {
  .story {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .container {
    padding: 3rem 2rem;
  }

  .hero {
    padding: 4rem 0 3rem;
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .reel-left,
  .reel-right {
    animation: none;
  }
}
