:root {
  --bg: #0a0a0b;
  --panel: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3efe6;
  --muted: #9d978a;
  --gold: #c9a45c;
  --gold-soft: rgba(201, 164, 92, 0.16);
  --red: #b3261e;
  --serif: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(50vmax 50vmax at 50% 40%, rgba(201, 164, 92, 0.06), transparent 60%),
    var(--bg);
}
/* Hafif kırmızı ışık süzmesi: yukarıdan inen yumuşak huzmeler, yavaşça salınır */
.bg::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(40vmax 62vmax at 18% 0%, rgba(200, 32, 32, 0.32), transparent 65%),
    radial-gradient(32vmax 58vmax at 82% 5%, rgba(175, 22, 28, 0.24), transparent 65%),
    radial-gradient(30vmax 42vmax at 82% 86%, rgba(255, 248, 240, 0.17), transparent 65%),
    conic-gradient(from -60deg at 84% 92%, transparent 0deg, rgba(255, 248, 240, 0.07) 10deg, transparent 22deg, rgba(255, 248, 240, 0.05) 34deg, transparent 48deg),
    radial-gradient(40vmax 30vmax at 35% 110%, rgba(155, 20, 24, 0.18), transparent 70%),
    conic-gradient(from 200deg at 30% -10%, transparent 0deg, rgba(210, 42, 36, 0.10) 12deg, transparent 26deg, rgba(210, 42, 36, 0.07) 40deg, transparent 55deg);
  filter: blur(30px);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translate3d(-2%, 0, 0) rotate(-1.5deg); opacity: 0.85; }
  50% { opacity: 1; }
  100% { transform: translate3d(3%, 2%, 0) rotate(1.5deg); opacity: 0.8; }
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.brand-mark svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.brand-mark circle { fill: var(--gold); stroke: none; }
.brand-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.brand-name em { font-style: normal; color: var(--gold); }

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 7px 12px;
  border-radius: 999px;
}
.live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
}
body.is-playing .live { color: var(--text); border-color: rgba(179, 38, 30, 0.5); }
body.is-playing .live i { background: #e5483e; animation: pulse 1.6s infinite; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 72, 62, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(229, 72, 62, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 72, 62, 0); }
}

/* Stage */
.stage {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px clamp(20px, 5vw, 56px) 40px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.player { text-align: center; }

.dial {
  position: relative;
  width: min(320px, 74vw, 42dvh);
  aspect-ratio: 1;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
}
.dial canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.play {
  position: relative;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(201, 164, 92, 0.55);
  background: radial-gradient(circle at 50% 35%, #1d1a14, #0d0c0a 70%);
  color: var(--gold);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 10px var(--gold-soft), 0 20px 60px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}
.play:hover { transform: scale(1.04); }
.play:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.play svg { width: 38%; height: 38%; fill: currentColor; grid-area: 1 / 1; }
.play .i-play { transform: translateX(6%); }
.play .i-stop { display: none; }
body.is-playing .play .i-play { display: none; }
body.is-playing .play .i-stop { display: block; }

.spinner {
  grid-area: 1 / 1;
  width: 56%;
  height: 56%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--gold);
  display: none;
  animation: spin 0.9s linear infinite;
}
body.is-loading .spinner { display: block; }
body.is-loading .play svg { opacity: 0.25; }
@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  text-wrap: balance;
}
.artist {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 26px;
}

.progress {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 380px;
  margin: 0 auto 22px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.bar {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.fill {
  height: 100%;
  width: 0;
  background: var(--gold);
  transition: width 0.9s linear;
}

.volume {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.mute {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}
.mute:hover { color: var(--text); }
.mute svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mute .spk { fill: currentColor; }
.mute .x { display: none; }
body.is-muted .mute .wave { display: none; }
body.is-muted .mute .x { display: block; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 140px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(var(--gold), var(--gold)) 0 / var(--v, 85%) 100% no-repeat, var(--line);
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  border: 0;
}
input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  border: 0;
}

/* Queue */
.queue {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px 14px;
  backdrop-filter: blur(6px);
}
.queue h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.queue ol { list-style: none; }
.queue li {
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.queue li:first-child { border-top: 0; }
.queue .q-title { font-weight: 600; font-size: 15px; }
.queue .q-artist { color: var(--muted); font-size: 13px; margin-top: 2px; }
.queue .empty { color: var(--muted); font-size: 14px; padding: 8px 0 14px; display: block; border: 0; }

.foot {
  text-align: center;
  padding: 22px;
  font-size: 12px;
  color: var(--muted);
}

.stage { min-height: 0; }

/* Telefon: her şey tek ekrana sığar, sayfa kaymaz */
@media (max-width: 820px) {
  .top { padding: 14px 20px; }
  .brand-mark svg { width: 26px; height: 26px; }
  .brand-name { font-size: 17px; }
  .stage {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 1.5dvh;
    padding: 0 20px 4px;
  }
  .dial { width: min(62vw, 30dvh); margin-bottom: 2dvh; }
  .eyebrow { font-size: 11px; margin-bottom: 0.8dvh; }
  .title { font-size: clamp(21px, 3.4dvh, 30px); margin-bottom: 0.6dvh; }
  .artist { font-size: 14px; margin-bottom: 1.8dvh; }
  .progress { margin-bottom: 1.2dvh; }
  .queue { max-width: 520px; width: 100%; margin: 0 auto; padding: 12px 18px 4px; border-radius: 14px; }
  .queue h2 { font-size: 11px; margin-bottom: 4px; }
  .queue li { padding: 8px 0; }
  .queue .q-title { font-size: 14px; }
  .queue .q-artist { font-size: 12px; }
  .queue li:nth-child(n+4) { display: none; }
  .foot { padding: 6px 20px 10px; font-size: 11px; }
}
@media (max-width: 820px) and (max-height: 720px) {
  .queue li:nth-child(n+3) { display: none; }
  .dial { width: min(58vw, 27dvh); }
}
@media (max-width: 820px) and (max-height: 600px) {
  .queue li:nth-child(n+2) { display: none; }
  .foot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
