/* Side A — Preview styles */

:root {
  --bg: #0a0a0a;
  --fg: #ffffff;
  --muted: #999;
  --dim: #555;
  --orange: #ff6b35;
  --cream: #f5edd4;
  --ink: #0f1d49;
  --rule: rgba(15, 29, 73, 0.30);
  --card: rgba(255, 255, 255, 0.05);
  --card-border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

a { color: inherit; }

/* ------- Landing ------- */

.landing main {
  text-align: center;
  padding-top: 96px;
}
.landing .hero h1 {
  font-family: "Permanent Marker", cursive;
  font-size: 72px;
  margin: 0 0 8px;
  color: var(--orange);
  letter-spacing: 0.02em;
}
.landing .tagline {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 32px;
}

/* ------- Preview ------- */

.preview .loading,
.preview .error {
  padding: 96px 0;
  text-align: center;
  color: var(--muted);
}
.error h1 { color: var(--fg); margin-bottom: 8px; }

.mixtape .from-line {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  text-align: center;
  margin: 0;
}

.mixtape-name {
  font-family: "Permanent Marker", cursive;
  font-size: 36px;
  line-height: 1.1;
  margin: 8px 0 4px;
  text-align: center;
}

.mixtape-meta {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
  margin: 0 0 28px;
  font-variant-numeric: tabular-nums;
}

/* ---- Cassette composition ---- */
.cassette {
  position: relative;
  margin: 0 auto 32px;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 16 / 10;
}
.cassette .shell {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* Above/below decoration zones — positioned roughly to match the in-app layout */
.cassette .zone {
  position: absolute;
  left: 12%;
  right: 12%;
  height: 18%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
  padding: 0 10px;
  line-height: 1.1;
  font-size: 16px;
  color: #111;
  pointer-events: none;
  word-break: break-word;
}
.cassette .zone.above { top: 6%; }
.cassette .zone.below { bottom: 6%; }

.cassette .song-label {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  pointer-events: none;
  display: none; /* default off; JS toggles */
  line-height: 1.2;
}

/* ---- Liner notes (J-card paper) ---- */
.liner-notes {
  margin: 0 0 32px;
}
.liner-notes h2,
.tracklist h2 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px 4px;
}
.jcard {
  background-color: var(--cream);
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 25px,
      var(--rule) 25px,
      var(--rule) 26px
    );
  background-position: 0 8px;
  color: var(--ink);
  font-family: "Shadows Into Light", cursive;
  font-size: 22px;
  line-height: 26px;
  padding: 8px 16px 20px;
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ---- Tracklist ---- */
.tracklist {
  margin: 0 0 32px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 4px 0;
}
.tracklist h2 {
  padding: 12px 16px 4px;
  margin: 0;
}
.tracklist ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: track;
}
.tracklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  counter-increment: track;
  border-top: 1px solid var(--card-border);
}
.tracklist li:first-of-type { border-top: none; }
.tracklist li::before {
  content: counter(track);
  font-size: 12px;
  color: var(--muted);
  width: 22px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.tracklist .meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tracklist .title {
  font-size: 15px;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tracklist .artist {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tracklist .dur {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---- CTAs ---- */
.ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 28px;
}
.cta {
  display: inline-block;
  padding: 14px 20px;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.1s ease, opacity 0.1s ease;
}
.cta:active { transform: scale(0.98); }
.cta.primary {
  background: #ffffff;
  color: #000;
}
.cta.secondary {
  background: transparent;
  color: #fff;
  border: 1.5px solid #fff;
}
.cta.tertiary {
  background: transparent;
  color: var(--orange);
  border: 1.5px solid var(--orange);
}

.brand {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--dim);
  text-transform: uppercase;
}
.brand strong {
  color: var(--fg);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: "Permanent Marker", cursive;
  text-transform: none;
}
