﻿:root {
  color-scheme: dark;
  --bg: #292c32;
  --bg-deep: #1e2127;
  --panel: rgba(246, 242, 235, 0.92);
  --panel-strong: rgba(245, 241, 234, 0.98);
  --text: #2f2b28;
  --muted: rgba(47, 43, 40, 0.62);
  --accent: #d59a57;
  --accent-2: #e94f49;
  --line: rgba(60, 58, 55, 0.18);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.32), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.14), transparent 22%),
    linear-gradient(180deg, #f5f5f5 0%, #ececec 100%);
}
button, input { font: inherit; }
img { display: block; }

.player-shell {
  width: min(100% - 28px, 710px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: minmax(64px, 15vh) auto minmax(92px, 1fr);
  background: linear-gradient(180deg, #2a2d34 0%, #24262c 100%);
}

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0 0 2px 2px;
  background: #eceae4;
  box-shadow:
    0 24px 60px rgb(15 17 20 / 20%),
    inset 0 1px 0 rgb(255 255 255 / 55%);
}

.player-card__frame {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
}

.player-card__bg {
  position: absolute;
  inset: 0 0 0 37%;
  background: url('/player-assets/scene.png') center center / cover no-repeat;
  filter: saturate(0.95) contrast(1.03);
  transform: scale(1.02);
}

.player-card__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 68% 46%, transparent 0 19%, rgb(0 0 0 / 6%) 47%, rgb(0 0 0 / 32%) 92%),
    linear-gradient(90deg, rgba(245, 240, 232, 0.96) 0%, rgba(245, 240, 232, 0.88) 24%, rgba(245, 240, 232, 0.4) 42%, rgba(245, 240, 232, 0) 68%);
}

.player-card__fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(15,18,24,0.04) 0%, transparent 20%),
    linear-gradient(90deg, rgba(244, 240, 232, 0.92) 0%, rgba(244, 240, 232, 0.62) 34%, transparent 58%);
  box-shadow: inset 0 0 38px rgb(0 0 0 / 12%);
}

.player-head {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  color: var(--accent);
  text-shadow: 0 1px 0 rgb(255 255 255 / 26%);
}

.player-head__kicker {
  margin: 0 0 4px;
  color: rgba(47, 43, 40, 0.45);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
}

.player-head__title {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(36px, 7.2vw, 60px);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.player-head__subtitle {
  margin: 6px 0 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(14px, 2.3vw, 21px);
  letter-spacing: 0.08em;
}

.player-head__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  color: rgba(47, 43, 40, 0.65);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.player-head__meta #trackInfo {
  letter-spacing: 0.06em;
  font-weight: 600;
}

.player-head__badge {
  display: inline-flex;
  margin-top: 7px;
  padding: 2px 10px;
  border-radius: 999px;
  color: #fff;
  background: #171717;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.player-copy {
  position: absolute;
  top: 156px;
  left: 18px;
  z-index: 2;
  width: 138px;
  color: var(--muted);
  text-align: center;
}

.player-copy__eyebrow {
  margin: 0 0 8px;
  color: rgba(47, 43, 40, 0.38);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.player-copy strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.player-copy p {
  margin: 0;
  line-height: 1.7;
  font-size: 10px;
}

.player-copy__hint {
  margin-top: 10px !important;
  color: rgba(47, 43, 40, 0.48);
  font-size: 9px !important;
}

.vinyl-wrap {
  position: absolute;
  top: 108px;
  left: 113px;
  z-index: 3;
  width: 186px;
  aspect-ratio: 1;
  filter: drop-shadow(0 16px 14px rgb(0 0 0 / 24%));
}

.vinyl {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 47% 42%, rgb(255 255 255 / 13%) 0 1%, transparent 2%),
    repeating-radial-gradient(circle, #090909 0 2px, #171717 3px 4px, #050505 5px 7px);
  box-shadow: inset 0 0 0 2px #050505, inset 0 0 32px #000;
  will-change: transform;
}

.vinyl::before {
  position: absolute;
  inset: 12px;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 50%;
  content: '';
}

.vinyl__rings {
  position: absolute;
  inset: 23px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgb(255 255 255 / 2%), 0 0 0 19px rgb(0 0 0 / 22%);
}

.vinyl img {
  position: absolute;
  inset: 35px;
  width: calc(100% - 70px);
  height: calc(100% - 70px);
  border: 3px solid #111;
  border-radius: 50%;
  object-fit: cover;
}

.vinyl__center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 2px solid rgb(255 255 255 / 84%);
  border-radius: 50%;
  background: #111;
  transform: translate(-50%, -50%);
}

.vinyl__shine {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,0.12), transparent 24%, transparent 56%, rgba(255,255,255,0.04) 74%, transparent 100%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.vinyl.is-playing { animation: spin 8.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.track-meta {
  position: absolute;
  left: 188px;
  bottom: 84px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(47, 43, 40, 0.56);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.track-meta__heart {
  color: var(--accent-2);
  font-size: 14px;
  animation: pulse 1.8s ease-in-out infinite;
}

.track-meta__label {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 48%);
}

.track-meta__wave { font-size: 16px; letter-spacing: 0; }

@keyframes pulse { 50% { transform: scale(1.12); } }

.timeline {
  position: absolute;
  left: 117px;
  bottom: 48px;
  z-index: 2;
  width: 178px;
}

.timeline input {
  width: 100%;
  height: 3px;
  margin: 0;
  appearance: none;
  outline: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #2a2a2a var(--progress, 0%), rgba(42,42,42,0.12) var(--progress, 0%));
  cursor: pointer;
}

.timeline input::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  appearance: none;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2c2b29;
  box-shadow: 0 0 0 2px rgb(0 0 0 / 8%);
}

.timeline__labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: rgba(47, 43, 40, 0.58);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.timeline__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(47, 43, 40, 0.35);
}

.controls {
  position: absolute;
  left: 114px;
  bottom: 12px;
  z-index: 2;
  width: 188px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(36, 36, 35, 0.72);
  font-size: 12px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.control:hover {
  color: #171717;
  background: rgb(255 255 255 / 56%);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgb(0 0 0 / 10%);
}

.control--primary {
  width: 34px;
  height: 34px;
  color: #292929;
  font-size: 13px;
  background: rgb(255 255 255 / 26%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 60%);
}

.control--ghost[aria-pressed='true'] {
  color: #bd6f43;
  background: rgb(255 255 255 / 60%);
}

.fullscreen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 54px;
  margin: 0 auto;
  padding: 0 22px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 999px;
  color: #f2f4f5;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 20px rgb(0 0 0 / 12%);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.fullscreen-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgb(255 255 255 / 30%);
}

.fullscreen-btn__icon { font-size: 24px; font-weight: 400; }

.player-shell:fullscreen {
  width: 100vw;
  padding: 5vh 4vw;
  display: grid;
  grid-template-rows: 1fr auto;
  place-content: center;
}

.player-shell:fullscreen .player-card {
  width: min(100%, calc((100vh - 120px) * 16 / 9));
  margin: 0 auto;
}

@media (max-width: 600px) {
  .player-shell {
    width: 100%;
    grid-template-rows: minmax(44px, 10vh) auto minmax(84px, 1fr);
  }

  .player-head {
    top: 12px;
    left: 12px;
  }

  .player-copy {
    top: 40%;
    left: 10px;
    width: 118px;
    transform: scale(0.86);
    transform-origin: left center;
  }

  .vinyl-wrap {
    top: 27%;
    left: 15%;
    width: 27%;
    min-width: 150px;
  }

  .vinyl img { inset: 19%; width: 62%; height: 62%; }
  .vinyl__rings { inset: 13%; }
  .track-meta { left: 25%; bottom: 20%; }
  .timeline { left: 16%; bottom: 11%; width: 28%; min-width: 150px; }
  .controls { left: 15%; bottom: 2%; width: 30%; min-width: 160px; }
  .fullscreen-btn { min-height: 46px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .vinyl.is-playing,
  .track-meta__heart { animation: none; }
  .control,
  .fullscreen-btn { transition: none; }
}
