:root {
  color-scheme: dark;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.8);
  --accent: #e5c79d;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-image: url('./backgraound.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body {
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background-image: url('./backgraound.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.top-bar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px 0;
}

.site-mark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-button {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.nav-button:hover,
.nav-button:focus-visible {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.7);
}

.center-stage {
  position: relative;
  z-index: 5;
  min-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 24px 80px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 44px;
}

.brand {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-size: 70px;
  line-height: 1.1;
  letter-spacing: 0.16em;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 2px 6px rgba(0, 0, 0, 0.9);
  font-display: swap;
}

.subtitle {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
  font-display: swap;
}

.player-shell {
  position: relative;
  z-index: 5;
  width: 100%;
  display: flex;
  justify-content: center;
}

.player-card {
  width: min(800px, calc(100vw - 48px));
  min-height: 135px;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) minmax(338px, auto);
  align-items: center;
  gap: 24px;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(18, 14, 11, 0.75);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.player-thumb {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.player-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
  min-width: 0;
}

.track-title-wrap {
  min-width: 0;
}

.track-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
}

.track-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.track-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  flex: 1;
  min-width: 0;
}

.youtube-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 200ms ease;
}

.youtube-link:hover,
.youtube-link:focus-visible {
  color: rgba(255, 68, 68, 0.9);
  outline: none;
}

.youtube-icon {
  width: 100%;
  height: 100%;
}

.track-progress {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 4px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #f3dbb7 0%, #e5c79d 100%);
  border-radius: inherit;
  transition: width 150ms linear;
}

.progress-time {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.8);
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: end;
  width: 100%;
  flex-shrink: 1;
  min-width: 0;
}

.control-button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 18px;
  transition: transform 180ms ease, background 180ms ease;
  flex-shrink: 0;
}

.control-button:hover,
.control-button:focus-visible {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.play-button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.play-button:hover,
.play-button:focus-visible {
  background: rgba(255, 255, 255, 0.32);
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 6px;
  min-width: 0;
  flex-shrink: 1;
}

.volume-icon {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.volume-control {
  width: min(110px, 24vw);
  max-width: 110px;
  min-width: 60px;
  height: 5px;
  accent-color: #e5c79d;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  outline: none;
  flex-shrink: 1;
  box-sizing: border-box;
}

.volume-control::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e5c79d;
  cursor: pointer;
  border: none;
}

.volume-control::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e5c79d;
  cursor: pointer;
  border: none;
}

.volume-control::-webkit-slider-runnable-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  box-sizing: border-box;
}

.volume-control::-moz-range-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  box-sizing: border-box;
}

.popover {
  position: absolute;
  top: 76px;
  right: 40px;
  width: min(340px, calc(100vw - 32px));
  max-height: 340px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(18, 14, 11, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  z-index: 20;
}

.popover.hidden {
  display: none;
}

.popover-header {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.popover-content {
  padding: 14px 18px;
  max-height: 260px;
  overflow-y: auto;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.popover-song {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 8px 0;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: color 150ms ease;
}

.popover-song:hover {
  color: var(--accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.status-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  width: 200px;
  border-radius: 12px;
  background: rgba(18, 14, 11, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.status-time {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.02em;
}

.status-date {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-listeners {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.02em;
}

.status-credit {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .top-bar {
    padding: 20px 20px 0;
  }

  .site-mark {
    font-size: 22px;
  }

  .nav-button {
    padding: 8px 16px;
    font-size: 13px;
  }

  .player-card {
    width: calc(100vw - 32px);
    min-height: auto;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 18px;
    padding: 18px 22px;
  }

  .player-thumb {
    width: 70px;
    height: 70px;
  }

  .player-controls {
    grid-column: 1 / -1;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
    min-width: 0;
  }

  .status-widget {
    bottom: 16px;
    left: 16px;
    padding: 10px 14px;
  }

  .status-time {
    font-size: 12px;
  }

  .status-date,
  .status-listeners,
  .status-credit {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .player-card {
    width: calc(100vw - 24px);
  }

  .brand {
    font-size: clamp(44px, 12.5vw, 56px);
    letter-spacing: 0.12em;
  }

  .subtitle {
    font-size: 17px;
  }

  .player-card {
    gap: 14px;
    padding: 16px;
  }

  .player-controls {
    gap: 10px;
    justify-content: space-between;
  }

  .control-button,
  .play-button {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .volume-wrap {
    gap: 6px;
    margin-left: 0;
  }

  .volume-control {
    width: min(84px, 24vw);
    min-width: 56px;
  }
}
