/* ─── D-PAD Radio ─────────────────────────────────────────── */

/* Toggle button in header */
.radio-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #00c8d4;
    background: rgba(0, 200, 212, 0.1);
    color: #00c8d4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
    transition: background 0.2s, box-shadow 0.2s;
}
.radio-toggle-btn:active {
    background: rgba(0, 200, 212, 0.25);
    box-shadow: 0 0 10px rgba(0, 200, 212, 0.3);
}
.radio-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ─── Mini Bar ────────────────────────────────────────────── */
.radio-mini-bar {
    position: fixed;
    bottom: calc(var(--nav-height, 56px) + var(--safe-bottom, 0px));
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(232, 224, 208, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99;
    display: none;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
    border-top: 1px solid rgba(0, 200, 212, 0.2);
}
.radio-mini-bar.visible {
    display: flex;
}


.radio-mini-bar .mini-eq {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
    flex-shrink: 0;
}
.radio-mini-bar .mini-eq .eq-bar {
    width: 3px;
    background: #00c8d4;
    border-radius: 1px;
    animation: eq-bounce 0.8s ease-in-out infinite alternate;
}
.radio-mini-bar .mini-eq .eq-bar:nth-child(1) { height: 6px; animation-delay: 0s; }
.radio-mini-bar .mini-eq .eq-bar:nth-child(2) { height: 12px; animation-delay: 0.15s; }
.radio-mini-bar .mini-eq .eq-bar:nth-child(3) { height: 8px; animation-delay: 0.3s; }
.radio-mini-bar .mini-eq .eq-bar:nth-child(4) { height: 14px; animation-delay: 0.1s; }

.radio-mini-bar .mini-eq.paused .eq-bar {
    animation-play-state: paused;
}

.mini-track-info {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}
.mini-track-name {
    font-family: 'Archivo Black', sans-serif;
    font-size: 11px;
    color: #e8872a;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-artist {
    font-size: 10px;
    color: rgba(0, 0, 0, 0.45);
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-pause-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: #00c8d4;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mini-pause-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ─── Drawer ──────────────────────────────────────────────── */
.radio-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.radio-drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.radio-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55vh;
    background: var(--surface-darker, #DDD5C5);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    z-index: 10001;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.radio-drawer.open {
    transform: translateY(0);
}

/* Drawer handle */
.radio-drawer-handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 6px;
    flex-shrink: 0;
}
.radio-drawer-handle .pill {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.15);
}

/* Station label */
.radio-station-label {
    text-align: center;
    font-family: 'Archivo', sans-serif;
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(0, 0, 0, 0.35);
    text-transform: uppercase;
    margin-bottom: 8px;
    flex-shrink: 0;
}

/* Drawer content */
.radio-drawer-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24px 20px;
    overflow-y: auto;
    gap: 16px;
}

/* Large EQ visualizer */
.radio-eq-large {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 48px;
    margin-bottom: 4px;
}
.radio-eq-large .eq-bar {
    width: 5px;
    background: #00c8d4;
    border-radius: 2px;
    animation: eq-bounce 0.8s ease-in-out infinite alternate;
}
.radio-eq-large .eq-bar:nth-child(1) { height: 12px; animation-delay: 0s; }
.radio-eq-large .eq-bar:nth-child(2) { height: 28px; animation-delay: 0.2s; }
.radio-eq-large .eq-bar:nth-child(3) { height: 20px; animation-delay: 0.1s; }
.radio-eq-large .eq-bar:nth-child(4) { height: 36px; animation-delay: 0.3s; }
.radio-eq-large .eq-bar:nth-child(5) { height: 24px; animation-delay: 0.05s; }
.radio-eq-large .eq-bar:nth-child(6) { height: 40px; animation-delay: 0.25s; }
.radio-eq-large .eq-bar:nth-child(7) { height: 16px; animation-delay: 0.15s; }

.radio-eq-large.paused .eq-bar {
    animation-play-state: paused;
}

/* Track info */
.radio-track-name {
    font-family: 'Archivo Black', sans-serif;
    font-size: 20px;
    color: #e8872a;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
}
.radio-artist {
    font-family: 'Figtree', sans-serif;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* Progress bar */
.radio-progress-wrap {
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}
.radio-progress-fill {
    height: 100%;
    width: 0%;
    background: #00c8d4;
    border-radius: 2px;
    transition: width 1s linear;
}

.radio-time-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-family: 'Archivo', sans-serif;
    font-weight: 700;
    font-size: 10px;
    color: rgba(0, 0, 0, 0.35);
    margin-top: -8px;
}

/* Play controls */
.radio-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.radio-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #00c8d4;
    background: transparent;
    color: #00c8d4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(0, 200, 212, 0.2);
    transition: background 0.2s, box-shadow 0.2s;
    padding: 0;
}
.radio-play-btn:active {
    background: rgba(0, 200, 212, 0.15);
    box-shadow: 0 0 24px rgba(0, 200, 212, 0.35);
}
.radio-play-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Volume */
.radio-volume-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 200px;
}
.radio-volume-row svg {
    width: 16px;
    height: 16px;
    fill: rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}
.radio-volume-slider {
    flex: 1;
    height: 4px;
    accent-color: #00c8d4;
    cursor: pointer;
}

/* Listener count */
.radio-listeners {
    font-family: 'Figtree', sans-serif;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 5px;
}
.radio-listeners .listener-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00c8d4;
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Connect Spotify button */
.radio-connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 100px;
    border: none;
    background: #1DB954;
    color: #fff;
    font-family: 'Figtree', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.radio-connect-btn:active {
    background: #1aa34a;
    transform: scale(0.97);
}
.radio-connect-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Free tier message */
.radio-free-msg {
    display: none;
    text-align: center;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.45);
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    line-height: 1.4;
}
.radio-free-msg.visible {
    display: block;
}

/* ─── Keyframes ───────────────────────────────────────────── */
@keyframes eq-bounce {
    0% { height: 4px; }
    100% { height: 100%; }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
