@import url('./fonts.css');

:root {
  color-scheme: dark;
  --blue: #002fa7;
  --midnight: #041b64;
  --cream: #fff5e3;
  --orange: #ff9147;
  --progress: 0%;
  font-family: 'DM Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; background: var(--blue); }
body { margin: 0; min-height: 100vh; min-height: 100svh; color: var(--cream); background: radial-gradient(ellipse at 61% 62%, #174ec0 0, var(--blue) 54%, var(--midnight) 100%); }
button, input { font: inherit; -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; touch-action: manipulation; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid #fff2d4; outline-offset: 4px; }
button:disabled { cursor: default; }

.room { width: min(calc(100% - 96px), 1030px); margin: 0 auto; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 6vw, 90px); padding: 36px 0; }
.scene { width: 100%; position: relative; isolation: isolate; overflow: hidden; border-radius: 24px; background: var(--midnight); box-shadow: 0 24px 80px #000f4540; }
.room-photo { display: block; width: 100%; height: auto; }
.brand { position: absolute; z-index: 3; top: max(5%, env(safe-area-inset-top)); right: 7%; margin: 0; color: inherit; text-decoration: none; font-size: clamp(15px, 3.9vw, 23px); font-weight: 800; letter-spacing: .15em; text-shadow: 0 2px 15px #020f4c; }
.record-center { position: absolute; z-index: 3; top: 55%; left: 48%; width: 20%; height: 12%; padding: 0; transform: translate(-50%, -50%); background: transparent; border: 0; border-radius: 50%; }
.record-center:enabled:hover { box-shadow: inset 0 0 0 1px #ffcf9c90; }
.platter-light { position: absolute; top: 44.8%; left: 22.7%; width: 51%; height: 21.8%; border-radius: 50%; pointer-events: none; overflow: hidden; mix-blend-mode: screen; opacity: 0; transition: opacity .32s ease; }
.platter-light::before { content: ''; position: absolute; inset: -60% 0; background: conic-gradient(transparent 0 12%, #ffd09255 17%, transparent 25% 60%, #e0edff3d 65%, transparent 74%); animation: vinyl 1.82s linear infinite; animation-play-state: paused; }
.is-playing .platter-light { opacity: .7; }
.is-playing .platter-light::before { animation-play-state: running; }
@keyframes vinyl { to { transform: rotate(360deg); } }

.listen { min-width: 0; text-align: center; }
.release { margin: 0 0 10px; color: #ffba83; font-size: 12px; font-weight: 650; letter-spacing: .21em; }
h1 { margin: 0; font-size: clamp(29px, 4.1vw, 48px); font-weight: 760; letter-spacing: -.045em; line-height: 1.18; }
.line { color: #e0e9ff; margin: 10px 0 0; font-size: 13px; line-height: 1.65; }
#music { width: 100%; margin-top: 14px; }
.timeline { margin: 20px 0 0; display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; align-items: center; gap: 10px; text-align: left; font-size: 11px; font-variant-numeric: tabular-nums; }
.timeline > :last-child { text-align: right; }
#seek { width: 100%; height: 30px; padding: 0; margin: 0; background: transparent; appearance: none; cursor: pointer; }
#seek:disabled { cursor: default; opacity: .72; }
#seek::-webkit-slider-runnable-track { height: 4px; border-radius: 10px; background: linear-gradient(90deg, var(--orange) var(--progress), #dbebff69 var(--progress)); }
#seek::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; margin-top: -4px; background: var(--cream); }
#seek::-moz-range-track { height: 4px; border-radius: 10px; background: #dbebff69; }
#seek::-moz-range-progress { height: 4px; background: var(--orange); }
#seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--cream); }
.transport { margin: 9px 0 20px; }
.play { width: 65px; height: 65px; display: inline-grid; place-items: center; padding: 0; border: 1px solid #fef4e9ae; border-radius: 50%; background: radial-gradient(ellipse at 25% 10%, #fff8, transparent 70%), linear-gradient(150deg, #dff0ff50, #8caadd35 55%, #d8e8ff66); box-shadow: inset 0 1px 2px #fffb, inset 0 -2px 4px #b6cef96e, 0 7px 18px #061e6570; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); transition: transform .18s ease; }
.play:enabled:active { transform: scale(.93); }
.play:disabled { opacity: .55; }
.play-mark { margin-left: 4px; border-block: 9px solid transparent; border-left: 15px solid var(--cream); }
.is-playing .play-mark, .is-loading .play-mark { width: 15px; height: 18px; margin: 0; border: 0; border-inline: 4px solid var(--cream); border-radius: 1px; }
.status { margin: 8px 0 0; min-height: 16px; font-size: 11px; color: #e0e9ff; }
.retry { min-height: 44px; margin: 3px 0 0; padding: 0 10px; border: 0; background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }

.sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 5px; border-radius: 26px; border: 1px solid #e7edff47; background: #c7dbff17; box-shadow: inset 0 1px 1px #e5efff1a; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.side { min-height: 57px; padding: 8px 11px; border: 1px solid transparent; display: flex; align-items: center; justify-content: center; gap: clamp(6px, 2vw, 12px); border-radius: 21px; text-align: left; background: transparent; }
.side[aria-pressed="true"] { background: radial-gradient(ellipse at 0 110%, #ffb0773b, transparent 75%), linear-gradient(140deg, #dce6ff40, #d9e5ff19); border-color: #eff0ff63; box-shadow: inset 0 1px 1px #fff3; }
.side-letter { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid #cbdcffa8; color: #e5edff; font-size: 12px; font-weight: 700; }
.side[aria-pressed="true"] .side-letter { background: var(--orange); color: #32200f; border-color: #ffc18c; }
.side strong, .side small { display: block; white-space: nowrap; }
.side strong { font-size: 14px; font-weight: 700; }
.side small { color: #e1e9ff; font-size: 10px; margin-top: 3px; }
.side:disabled { opacity: .67; }
.beer-link { display: inline-flex; gap: 6px; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px; color: #e0e9ff; font-size: 12px; text-underline-offset: 4px; text-decoration-thickness: 1px; }

@media (max-width: 740px) {
  body { background: var(--blue); }
  .room { width: min(100%, 480px); display: block; padding: 0 0 calc(18px + env(safe-area-inset-bottom)); }
  .scene { border-radius: 0; box-shadow: none; }
  .scene::after { content: ''; pointer-events: none; position: absolute; inset: auto 0 0; height: 31%; background: linear-gradient(0deg, var(--blue), #002fa700); }
  .brand { font-size: clamp(16px, 4.6vw, 21px); }
  .listen { position: relative; z-index: 1; width: calc(100% - 46px); margin: -19% auto 0; }
  h1 { font-size: clamp(29px, 8.5vw, 43px); }
  .release { margin-bottom: 7px; }
  .line { margin-top: 7px; }
  .timeline { margin-top: 11px; }
  .transport { margin: 4px 0 13px; }
  .play { width: 59px; height: 59px; }
}

@media (max-width: 350px) {
  .listen { width: calc(100% - 30px); }
  .side { padding-inline: 6px; }
  .side strong { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
