:root {
  --background: #09060d;
  --text: #f2edf4;
  --muted: #b4aab8;
  --line: rgba(255, 255, 255, .28);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: radial-gradient(circle at 22% 20%, rgba(67, 32, 82, .22), transparent 38%), var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
.page { min-height: 100vh; display: flex; align-items: center; padding: 64px 7vw; }
.upload { width: min(920px, 90vw); }
.message { margin: 0 0 19px 3px; color: #ddd5df; font-size: clamp(16px, 1.7vw, 20px); font-weight: 500; letter-spacing: -.02em; }
.file-card { position: relative; width: 100%; aspect-ratio: 3 / 2; min-height: 390px; overflow: hidden; background: #130e18; box-shadow: 0 30px 80px rgba(0, 0, 0, .38); }
.file-card > img { width: 100%; height: 100%; display: block; object-fit: cover; filter: none; }
.player { position: absolute; left: clamp(18px, 4vw, 46px); right: clamp(18px, 4vw, 46px); bottom: 12px; padding: 15px 20px 11px; background: rgba(8, 5, 10, .44); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(5px); }
.filename { margin-bottom: 10px; color: var(--text); font-size: 15px; font-weight: 600; }
.main-controls { display: flex; align-items: center; gap: 19px; }
.play-button { width: 40px; height: 40px; flex: none; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255, 255, 255, .6); border-radius: 50%; background: rgba(0, 0, 0, .1); color: var(--text); cursor: pointer; }
.play-button:hover { background: rgba(255, 255, 255, .1); }
.play-button svg { width: 22px; height: 22px; fill: currentColor; }
.pause-icon { display: none; }
.play-button.playing .play-icon { display: none; }
.play-button.playing .pause-icon { display: block; }
.timeline { flex: 1; }
.timeline input, .volume input { appearance: none; display: block; width: 100%; margin: 0; background: transparent; cursor: pointer; }
.timeline input { height: 18px; --progress: 0%; }
.timeline input::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, var(--text) var(--progress), rgba(255, 255, 255, .28) var(--progress)); }
.timeline input::-webkit-slider-thumb { width: 13px; height: 13px; margin-top: -5px; appearance: none; border: 0; border-radius: 50%; background: var(--text); }
.timeline input::-moz-range-track { height: 3px; background: rgba(255,255,255,.28); }
.timeline input::-moz-range-progress { height: 3px; background: var(--text); }
.timeline input::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--text); }
.times { display: flex; justify-content: space-between; margin-top: 3px; color: var(--muted); font-size: 10px; }
.lower-controls { display: flex; align-items: center; margin-top: 8px; padding-left: 59px; color: var(--muted); font-size: 11px; }
.volume { display: flex; align-items: center; gap: 9px; }
.volume svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.volume input { width: 76px; height: 14px; }
.volume input::-webkit-slider-runnable-track { height: 2px; background: var(--line); }
.volume input::-webkit-slider-thumb { width: 9px; height: 9px; margin-top: -3.5px; appearance: none; border: 0; border-radius: 50%; background: var(--text); }
.volume input::-moz-range-track { height: 2px; background: var(--line); }
.volume input::-moz-range-thumb { width: 9px; height: 9px; border: 0; border-radius: 50%; background: var(--text); }
.download { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 0 3px; color: #c9c0cc; font-size: 12px; text-decoration: none; }
.download svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.download:hover { color: white; text-decoration: underline; }

@media (max-width: 650px) {
  .page { align-items: flex-start; padding: 17vh 17px 60px; }
  .upload { width: 100%; }
  .file-card { min-height: 0; aspect-ratio: 3 / 2; }
  .file-card > img { object-position: 50% center; }
  .player { left: 10px; right: 10px; bottom: 8px; padding: 12px 14px 9px; }
  .filename { margin-bottom: 8px; font-size: 13px; }
  .main-controls { gap: 14px; }
  .play-button { width: 38px; height: 38px; }
  .lower-controls { padding-left: 52px; }
  .volume input { width: 55px; }
}
@media (max-width: 390px) {
  .volume { display: none; }
  .lower-controls { padding-left: 0; }
}
