*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #ECF0F4;
    --bg-dark: #D8E2EA;
    --sh-l: rgba(255, 255, 255, 0.88);
    --sh-d: rgba(185, 200, 215, 0.75);
    --rnb: #5BB8E8;
    --rnb-dk: #2A8FC0;
    --rnb-glow: rgba(91, 184, 232, 0.35);
    --ink: #0F1C28;
    --mid: #2A4255;
    --soft: #4A6E85;
    --serif: 'Barlow', sans-serif;
    --sans: 'Inter', system-ui, sans-serif;
    --r-pill: 100px;
}

html,
body {
    height: 100%;
}

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 24px 110px;
}

.wrap {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    text-align: center;
}

.badge {
    background: var(--rnb);
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: var(--r-pill);
    letter-spacing: 0.5px;
    box-shadow: 3px 3px 8px rgba(91, 184, 232, 0.4);
}

.title {
    font-family: var(--serif);
    font-size: 48px;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.05;
    letter-spacing: -1px;
}

.title em {
    font-style: italic;
    color: var(--rnb-dk);
}

.message {
    font-size: 15px;
    color: var(--mid);
    font-weight: 300;
    line-height: 1.85;
    max-width: 380px;
}

.player {
    width: 100%;
    background: var(--bg);
    box-shadow:
        9px 9px 22px rgba(140, 170, 195, 0.95),
        -9px -9px 22px rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 24px 28px;
}

.player-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.live {
    display: flex;
    align-items: center;
    gap: 7px;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: #E05050;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(224, 80, 80, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 6px rgba(224, 80, 80, 0.5);
    }

    50% {
        box-shadow: 0 0 12px rgba(224, 80, 80, 0.9);
    }
}

.live-txt {
    font-size: 10px;
    font-weight: 500;
    color: #C94040;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.fm {
    font-size: 11px;
    color: var(--soft);
    font-weight: 300;
}

#pre-play {
    text-align: center;
}

.btn-ecouter {
    display: block;
    width: 100%;
    background: var(--rnb);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 500;
    padding: 15px 24px;
    cursor: pointer;
    text-align: center;
    box-shadow: 3px 3px 10px rgba(91, 184, 232, 0.4);
    margin-bottom: 10px;
    transition: background 0.2s;
}

.btn-ecouter:hover {
    background: var(--rnb-dk);
}

.btn-ecouter-sub {
    font-size: 12px;
    color: var(--soft);
    font-weight: 300;
}

.now-label {
    font-size: 10px;
    color: var(--soft);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: none;
}

.now-song {
    font-family: var(--serif);
    font-size: 18px;
    color: var(--ink);
    margin-bottom: 3px;
    display: none;
}

.now-artist {
    font-size: 14px;
    color: var(--mid);
    font-weight: 300;
    margin-bottom: 20px;
    display: none;
}

.progress-wrap {
    background: var(--bg-dark);
    box-shadow:
        inset 4px 4px 10px rgba(185, 200, 215, 0.75),
        inset -4px -4px 10px rgba(255, 255, 255, 0.88);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: none;
}

.progress-track {
    height: 4px;
    border-radius: 2px;
    background: transparent;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--rnb);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--rnb-glow);
    transition: width 1s linear;
}

.controls {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.controls-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-play {
    width: 52px;
    height: 52px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg);
    box-shadow:
        5px 5px 14px rgba(185, 200, 215, 0.75),
        -5px -5px 14px rgba(255, 255, 255, 0.88);
    border-radius: 50%;
    transition: box-shadow 0.15s;
}

.btn-play:active {
    box-shadow:
        inset 4px 4px 10px rgba(185, 200, 215, 0.75),
        inset -4px -4px 10px rgba(255, 255, 255, 0.88);
}

.btn-play svg {
    width: 20px;
    height: 20px;
    fill: var(--rnb-dk);
}

.btn-play:hover svg {
    fill: var(--rnb);
}

.meta-show {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}

.meta-time {
    font-size: 11px;
    color: var(--soft);
    font-weight: 300;
}

.player-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 70px;
    background: var(--bg);
    box-shadow:
        0 -6px 24px rgba(185, 200, 215, 0.75),
        0 -1px 0 rgba(255, 255, 255, 0.7);
    padding: 0 48px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 32px;
}

.pf-left {
    display: flex;
    align-items: center;
    gap: 13px;
    overflow: hidden;
}

.pf-dot {
    width: 7px;
    height: 7px;
    background: #E05050;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 7px rgba(224, 80, 80, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.pf-track {
    overflow: hidden;
}

.pf-song {
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-show {
    font-size: 13px;
    color: var(--soft);
    font-weight: 300;
    white-space: nowrap;
}

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

.btn-play-fixed {
    width: 54px;
    height: 54px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    box-shadow:
        4px 4px 11px rgba(185, 200, 215, 0.75),
        -4px -4px 11px rgba(255, 255, 255, 0.88);
    border-radius: 50%;
    transition: box-shadow 0.15s;
}

.btn-play-fixed:active {
    box-shadow:
        inset 3px 3px 8px rgba(185, 200, 215, 0.75),
        inset -3px -3px 8px rgba(255, 255, 255, 0.88);
}

.btn-play-fixed svg {
    width: 21px;
    height: 21px;
    fill: var(--rnb-dk);
}

.vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 140px;
    height: 5px;
    border-radius: 2px;
    background: rgba(185, 200, 215, 0.5);
    outline: none;
    cursor: pointer;
}

.vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--rnb-dk);
    box-shadow: 2px 2px 5px rgba(185, 200, 215, 0.75), -2px -2px 5px rgba(255, 255, 255, 0.88);
    cursor: pointer;
}

.pf-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.pf-fm {
    font-size: 13px;
    color: var(--soft);
    font-weight: 300;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .title {
        font-size: 36px;
    }

    .message {
        font-size: 14px;
    }

    .player-fixed {
        padding: 0 16px;
        height: 76px;
        gap: 12px;
        grid-template-columns: 1fr auto;
    }

    .pf-right {
        display: none;
    }

    .vol-slider {
        width: 80px;
    }

    .pf-song {
        font-size: 13px;
    }

    .pf-show {
        font-size: 11px;
    }

    .btn-play-fixed {
        width: 44px;
        height: 44px;
    }
}

.btn-fallback {
    background: none;
    border: none;
    font-family: var(--sans);
    font-size: 12px;
    color: var(--soft);
    font-weight: 300;
    cursor: pointer;
    padding: 6px 0;
    text-decoration: underline;
    text-decoration-color: rgba(74, 110, 133, 0.3);
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.btn-fallback:hover {
    color: var(--rnb-dk);
    text-decoration-color: var(--rnb-dk);
}

.fallback-wrap {
    text-align: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(140, 165, 185, 0.2);
}

.legal-bar {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    z-index: 150;
    background: var(--bg-dark);
    font-size: 11px;
    color: var(--soft);
    font-weight: 300;
    text-align: center;
    padding: 8px 24px;
    line-height: 1.5;
    box-shadow: 0 -1px 0 rgba(140,165,185,0.2);
}


#loading {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#loading.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-logo {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: white;
  background: var(--rnb);
  padding: 6px 16px;
  border-radius: 100px;
  letter-spacing: 0.5px;
  box-shadow: 3px 3px 8px rgba(91, 184, 232, 0.4);
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid rgba(91, 184, 232, 0.2);
  border-top-color: var(--rnb);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
