* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --page-bg: rgb(220, 248, 246);
    --text-color: rgb(14, 58, 56);
    --dyn-color1: rgb(14, 58, 56);
    --dyn-color2: rgb(220, 248, 246);
    --dyn-rgb1: 14, 58, 56;
    --dyn-rgb2: 220, 248, 246;
    --radius: 20px;
    --border: rgba(255, 255, 255, 0.14);
    --surface: rgba(255, 255, 255, 0.12);
    --shadow-normal: 0 10px 30px rgba(0, 0, 0, 0.18);
    --primary: #39c5bb;
    --dyn-primary: var(--dyn-color1);
    --text-secondary: rgba(0, 0, 0, 0.65);
}

body[data-theme="dark"] {
    --text-secondary: rgba(255, 255, 255, 0.62);
}

body.empty-state {
    background: rgb(57, 197, 187);
    color: #ffffff;
}

body.empty-state .card {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

body.empty-state .song-title,
body.empty-state .song-artist,
body.empty-state .lyric-wrap {
    color: #ffffff;
}

body.empty-state .back-home {
    color: #ffffff;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Helvetica Neue, sans-serif;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text-color);
    transition: background 0.4s ease, color 0.4s;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.back-home {
    color: inherit;
    text-decoration: none;
    font-size: 16px;
}

#theme {
    border: 1px solid color-mix(in srgb, var(--dyn-color1) 65%, transparent);
    background: color-mix(in srgb, var(--dyn-color1) 18%, var(--surface));
    color: var(--dyn-color1);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
}

#theme:hover {
    background: var(--dyn-color1);
    color: #ffffff;
    border-color: var(--dyn-color1);
}

body[data-theme="dark"] #theme {
    border-color: color-mix(in srgb, var(--dyn-color2) 65%, transparent);
    background: color-mix(in srgb, var(--dyn-color2) 18%, var(--surface));
    color: var(--dyn-color2);
}

body[data-theme="dark"] #theme:hover {
    background: var(--dyn-color2);
    color: var(--dyn-color1);
    border-color: var(--dyn-color2);
}

.container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 80px);
    padding: 12px;
}

.card {
    width: min(920px, calc(100vw - 24px));
    background: color-mix(in srgb, var(--page-bg) 62%, transparent);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid color-mix(in srgb, var(--border) 45%, transparent);
    box-shadow: var(--shadow-normal);
}

.radio-inner {
    display: flex;
    gap: 24px;
    align-items: center;
    min-width: 0;
}

.media-card {
    container-type: inline-size;
    width: 100%;
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 22px;
    border-radius: 20px;
    background: color-mix(in srgb, #ffffff 30%, var(--page-bg));
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.16),
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    transition: background 0.4s ease, box-shadow 0.4s ease;
    min-width: 0;
}

body[data-theme="dark"] .media-card {
    background: color-mix(in srgb, #000000 32%, var(--page-bg));
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.34),
        0 2px 8px rgba(0, 0, 0, 0.18),
        0 0 22px rgba(80, 220, 210, 0.10),
        inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.radio-cover-wrap {
    flex: 0 0 auto;
    width: min(30cqw, 240px);
    aspect-ratio: 1 / 1;
    min-width: 110px;
    max-width: 240px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.12);
}

.radio-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.radio-right {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.text-scroll-mask {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.song-title {
    font-size: clamp(18px, 2.6cqw, 24px);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.song-artist {
    font-size: clamp(14px, 2cqw, 16px);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.scroll-marquee {
    display: inline-block;
    animation: marquee 9s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    50% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.lyric-box {
    width: 100%;
    height: clamp(140px, 22cqw, 200px);
    overflow: hidden;
    background: color-mix(in srgb, var(--text-color) 10%, var(--page-bg));
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lyric-wrap {
    width: 100%;
    max-height: 100%;
    text-align: center;
    line-height: 1.7;
    overflow: hidden;
}

.lyric-line {
    margin: 3px 0;
    transition: all 0.25s;
}

.lyric-line.active {
    font-weight: bold;
    transform: scale(1.04);
}

.control-group {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.btn-icon {
    width: clamp(44px, 6cqw, 52px);
    height: clamp(44px, 6cqw, 52px);
    border-radius: 50%;
    border: none;
    background: rgba(var(--dyn-rgb1), 0.22);
    backdrop-filter: blur(6px);
    cursor: pointer;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease;
}

.btn-icon svg {
    width: clamp(20px, 3cqw, 24px);
    height: clamp(20px, 3cqw, 24px);
    pointer-events: none;
}

.btn-play {
    width: clamp(52px, 7.5cqw, 64px);
    height: clamp(52px, 7.5cqw, 64px);
    background: rgba(var(--dyn-rgb1), 0.75);
}

.btn-play svg {
    width: clamp(24px, 3.6cqw, 30px);
    height: clamp(24px, 3.6cqw, 30px);
    pointer-events: none;
}

.btn-icon:hover {
    transform: scale(1.08);
}

.btn-icon:active {
    transform: scale(0.94);
}

.like-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.like-count-text {
    font-size: clamp(14px, 2cqw, 16px);
}

@media (max-width: 720px) {
    .radio-inner {
        flex-direction: column;
        min-width: 0;
    }

    .media-card {
        flex-direction: column;
        gap: 16px;
        padding: 18px;
        min-width: 0;
    }

    .card {
        padding: 16px;
    }

    .radio-cover-wrap {
        width: min(72cqw, 240px);
        max-width: 72cqw;
    }

    .radio-right {
        width: 100%;
        min-width: 0;
    }
}
