/* 拾音电台 - 主要样式 */
:root {
    --color-bg: #0D0D0D;
    --color-bg-card: rgba(255, 255, 255, 0.08);
    --color-bg-card-hover: rgba(255, 255, 255, 0.12);
    --color-text-primary: #FFFFFF;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
    --color-text-tertiary: rgba(255, 255, 255, 0.4);
    --color-accent: #DAA520;
    --color-accent-light: #F0C674;
    --color-tiffany: #0ABAB5;
    --color-tiffany-light: #4FD1C5;
    --color-border: rgba(255, 255, 255, 0.1);
    --color-divider: rgba(255, 255, 255, 0.08);
    --color-on-air: #E74C3C;
    
    --font-serif: 'Songti SC', 'Noto Serif SC', 'Source Han Serif CN', 'ZCOOL XiaoWei', 'Ma Shan Zheng', serif;
    --font-display: 'ZCOOL XiaoWei', 'Ma Shan Zheng', 'Noto Serif SC', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Menlo', monospace;
}

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

body {
    font-family: var(--font-serif);
    background: var(--color-bg);
    color: var(--color-text-primary);
    overflow: hidden;
    height: 100vh;
}

/* 背景光效 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 30% 20%,
        rgba(218, 165, 32, 0.08) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 70% 80%,
        rgba(184, 134, 11, 0.05) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 50% 50%,
        rgba(255, 255, 255, 0.03) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: -1;
}

/* ========== 第一层：初始界面 ========== */
.home-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 32px;
    padding-bottom: 80px;
    background: rgba(13, 13, 13, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* 顶部栏 */
.station-header {
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.station-name {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: 16px;
    color: var(--color-tiffany);
    text-shadow: 0 0 30px rgba(10, 186, 181, 0.4);
    padding-left: 8px;
    font-family: var(--font-display);
}

.on-air-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.on-air-dot {
    width: 8px;
    height: 8px;
    background: var(--color-text-tertiary);
    border-radius: 50%;
    box-shadow: none;
    transition: all 0.3s ease;
}

.on-air-badge.active .on-air-dot {
    background: var(--color-on-air);
    animation: blink 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px var(--color-on-air);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.on-air-text {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--color-text-secondary);
    font-family: var(--font-sans);
}

/* 时间显示 */
.time-display {
    text-align: center;
    margin-bottom: 50px;
}

.current-time {
    font-size: 88px;
    font-weight: 100;
    letter-spacing: 8px;
    color: var(--color-text-primary);
    font-family: var(--font-mono);
    line-height: 1;
    margin-bottom: 16px;
    text-shadow: 0 0 60px rgba(255, 255, 255, 0.1);
}

.date-info {
    font-size: 16px;
    color: var(--color-text-secondary);
    letter-spacing: 2px;
    font-family: var(--font-sans);
}

/* 歌曲信息卡片 */
.track-card {
    width: 100%;
    max-width: 520px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 24px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.4;
    backdrop-filter: blur(15px);
}

.track-card.active {
    opacity: 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.track-card.active:hover {
    background: var(--color-bg-card-hover);
    border-color: rgba(218, 165, 32, 0.3);
    transform: translateY(-2px);
}

/* 小黑胶唱片 */
.vinyl-small {
    width: 72px;
    height: 72px;
    background: radial-gradient(circle,
        #1a1a1a 0%,
        #2a2a2a 30%,
        #1a1a1a 31%,
        #2a2a2a 60%,
        #1a1a1a 100%);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.vinyl-small.playing {
    animation: vinyl-spin 3s linear infinite;
}

@keyframes vinyl-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.vinyl-grooves-small {
    position: absolute;
    top: 15%;
    left: 15%;
    width: 70%;
    height: 70%;
    background: repeating-radial-gradient(
        circle at center,
        transparent 0px,
        transparent 2px,
        rgba(255, 255, 255, 0.05) 2px,
        rgba(255, 255, 255, 0.05) 4px
    );
    border-radius: 50%;
}

.vinyl-center-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22%;
    height: 22%;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(218, 165, 32, 0.5);
}

/* 歌曲信息 */
.track-info-small {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.track-main-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.song-name-small {
    font-size: 24px;
    color: var(--color-text-primary);
    font-weight: 400;
    letter-spacing: 2px;
}

.track-dot {
    font-size: 20px;
    color: var(--color-accent);
    opacity: 0.6;
}

.artist-name-small {
    font-size: 24px;
    color: var(--color-text-secondary);
    font-weight: 300;
    letter-spacing: 2px;
}

.track-hint {
    font-size: 13px;
    color: var(--color-tiffany);
    font-family: var(--font-sans);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.track-hint-hidden {
    display: none;
}

.waiting-text {
    font-size: 20px;
    color: var(--color-text-tertiary);
    font-weight: 300;
    letter-spacing: 4px;
    font-family: var(--font-sans);
}

.hint-icon {
    color: var(--color-tiffany);
    font-size: 14px;
}

/* 音乐可视化 */
.audio-visualizer {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 40px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.track-card.active .audio-visualizer {
    opacity: 1;
}

.audio-visualizer .bar {
    width: 4px;
    height: 12px;
    background: var(--color-accent);
    border-radius: 2px;
    animation: audio-wave 1s ease-in-out infinite;
    animation-fill-mode: both;
}

.track-card:not(.active) .audio-visualizer .bar {
    animation-play-state: paused;
}

@keyframes audio-wave {
    0%, 100% {
        height: 8px;
        opacity: 0.5;
    }
    50% {
        height: 32px;
        opacity: 1;
    }
}

/* DJ独白卡片 */
.narration-card {
    width: 100%;
    max-width: 520px;
    padding: 24px 28px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    margin-bottom: 40px;
    flex: 1;
    overflow-y: auto;
    opacity: 0.4;
    transition: all 0.5s ease;
    backdrop-filter: blur(15px);
    min-height: 150px;
}

.narration-card.active {
    opacity: 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.narration-list {
    display: flex;
    flex-direction: column;
}

.narration-placeholder {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-tertiary);
    text-align: center;
    letter-spacing: 2px;
    padding: 40px 0;
    font-style: italic;
}

.narration-item {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-primary);
    text-align: left;
    letter-spacing: 1px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-divider);
    position: relative;
}

.narration-item:first-child {
    padding-top: 8px;
}

.narration-item:last-child {
    border-bottom: none;
    padding-bottom: 8px;
}

.narration-item::before {
    display: none !important;
    content: none !important;
}
.narration-card::-webkit-scrollbar {
    width: 4px;
}

.narration-card::-webkit-scrollbar-track {
    background: transparent;
}

.narration-card::-webkit-scrollbar-thumb {
    background: rgba(10, 186, 181, 0.3);
    border-radius: 2px;
}

/* 随机按钮 */
.random-btn {
    width: 100%;
    max-width: 520px;
    padding: 20px 32px;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.2), rgba(184, 134, 11, 0.1));
    border: 1px solid rgba(218, 165, 32, 0.3);
    color: var(--color-text-primary);
    border-radius: 50px;
    font-size: 16px;
    font-family: var(--font-sans);
    letter-spacing: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-top: auto;
    backdrop-filter: blur(10px);
}

.random-btn:hover {
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.3), rgba(184, 134, 11, 0.2));
    border-color: rgba(218, 165, 32, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(218, 165, 32, 0.2);
}

.random-btn:active {
    transform: translateY(0);
}

.random-icon {
    width: 20px;
    height: 20px;
    fill: var(--color-accent);
}

/* ========== 第二层：详情弹窗 ========== */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
}

.detail-modal.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.detail-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 680px;
    max-height: 85vh;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s ease;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.close-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--color-text-secondary);
}

/* 详情头部 */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--color-divider);
}

.detail-left {
    flex: 1;
}

.detail-title {
    font-size: 28px;
    font-weight: 400;
    color: var(--color-text-primary);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.detail-artist {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
    font-family: var(--font-sans);
}

.detail-album {
    font-size: 16px;
    color: var(--color-text-secondary);
    font-family: var(--font-sans);
}

.detail-right {
    text-align: right;
}

.detail-credit {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
    font-family: var(--font-sans);
}

.detail-credit span {
    color: var(--color-text-tertiary);
    margin-right: 8px;
}

/* 详情链接 */
.detail-links {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.link-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-sans);
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.link-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.netease-link {
    background: linear-gradient(135deg, #E60012, #C4000E);
}

.netease-link:hover {
    background: linear-gradient(135deg, #FF0018, #E60012);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 0, 18, 0.4);
}

.qq-link {
    background: linear-gradient(135deg, #10B981, #059669);
}

.qq-link:hover {
    background: linear-gradient(135deg, #34D399, #10B981);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* 固定区域 */
.detail-fixed {
    flex-shrink: 0;
}

/* 滚动区域 */
.detail-scroll {
    flex: 1;
    overflow-y: auto;
    margin-top: 16px;
}

/* 文章标题 */
.article-title {
    font-size: 22px;
    font-weight: 400;
    color: var(--color-text-primary);
    margin: 0 0 20px 0;
    letter-spacing: 2px;
    text-align: center;
}

.article-body {
    font-size: 16px;
    line-height: 2;
    color: var(--color-text-secondary);
    letter-spacing: 1px;
}

.article-body p {
    margin-bottom: 16px;
    text-indent: 2em;
    text-align: justify;
}

/* 滚动条样式 */
.detail-content::-webkit-scrollbar {
    width: 6px;
}

.detail-content::-webkit-scrollbar-track {
    background: transparent;
}

.detail-content::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.detail-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========== 响应式设计 ========== */
@media (max-width: 600px) {
    .home-screen {
        padding: 32px 20px;
        padding-bottom: 60px;
    }

    .station-header {
        margin-bottom: 50px;
    }

    .station-name {
        font-size: 22px;
        letter-spacing: 8px;
    }

    .current-time {
        font-size: 64px;
        letter-spacing: 4px;
    }

    .date-info {
        font-size: 14px;
    }

    .time-display {
        margin-bottom: 40px;
    }

    .track-card {
        padding: 20px 16px;
        gap: 16px;
    }

    .vinyl-small {
        width: 56px;
        height: 56px;
    }

    .song-name-small,
    .artist-name-small {
        font-size: 18px;
    }

    .track-dot {
        font-size: 16px;
    }

    .track-hint {
        font-size: 12px;
    }

    .audio-visualizer {
        height: 30px;
    }

    .audio-visualizer .bar {
        width: 3px;
        height: 8px;
    }

    @keyframes audio-wave {
        0%, 100% {
            height: 6px;
        }
        50% {
            height: 24px;
        }
    }

    .narration-card {
        padding: 20px;
        margin-bottom: 30px;
        flex: 1;
    }

    .narration-item {
        font-size: 14px;
        line-height: 1.7;
    }

    .random-btn {
        padding: 16px 24px;
        font-size: 14px;
        letter-spacing: 4px;
    }

    .detail-content {
        padding: 24px 20px;
        top: 10%;
        left: 5%;
        right: 5%;
        bottom: 10%;
        transform: none;
        max-height: 80%;
        width: auto;
    }

    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .detail-header {
        flex-direction: column;
        gap: 16px;
    }

    .detail-right {
        text-align: left;
    }

    .detail-title {
        font-size: 22px;
    }

    .detail-links {
        flex-direction: column;
    }

    .article-title {
        font-size: 18px;
    }

    .article-body {
        font-size: 15px;
    }
}

@media (max-width: 380px) {
    .current-time {
        font-size: 56px;
    }

    .station-name {
        font-size: 18px;
        letter-spacing: 6px;
    }

    .song-name-small,
    .artist-name-small {
        font-size: 16px;
    }
}