/* ============================================================
   在线电台栏目 · 王牌DJ音乐网 WPDJ.WANG 风格皮肤
   配色 / 组件 / 页头页脚 对齐 https://wpdj.wang/
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-orange: #f97316;
    --primary-orange-dark: #ea580c;
    --primary-orange-darker: #c2410c;
    --bg-light: #fff7ed;
    --bg-white: #ffffff;
    --bg-gray: #f3f4f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-white: #ffffff;
    --border-light: #fed7aa;
    --border-gray: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dark {
    --bg-light: #111827;
    --bg-white: #1f2937;
    --bg-gray: #374151;
    --text-dark: #f9fafb;
    --text-light: #d1d5db;
    --border-light: #4b5563;
    --border-gray: #374151;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 50%, var(--bg-light) 100%);
    min-height: 100vh;
    color: var(--text-dark);
    transition: all 0.3s ease;
    padding-bottom: 96px; /* 给底部固定播放器留空间 */
}

body.dark {
    background: linear-gradient(135deg, #111827 0%, #1f2937 50%, #111827 100%);
}

a {
    color: inherit;
    text-decoration: none;
    outline: none;
    transition: all 0.2s ease;
}

button { font-family: inherit; }
input, select { font-family: inherit; }

:focus-visible {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* ---------------- 导航栏 ---------------- */
nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow);
}

body.dark nav {
    background: rgba(31, 41, 55, 0.95);
    border-bottom-color: var(--border-gray);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg { width: 100%; height: 100%; }

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    white-space: nowrap;
}

.logo-domain {
    font-size: 12px;
    color: var(--primary-orange);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-item {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
    cursor: pointer;
    padding: 8px 0;
    font-size: 15px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-orange);
}

.nav-item.home { color: var(--primary-orange); font-weight: 600; }

.nav-item .dropdown-arrow {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    vertical-align: -3px;
    transition: transform 0.2s;
}

.nav-item:hover .dropdown-arrow { transform: rotate(180deg); }

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    padding: 8px 0;
    z-index: 60;
}

body.dark .dropdown { background: #1f2937; border-color: var(--border-gray); }

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

body.dark .dropdown-item { color: var(--text-light); }

.dropdown-item:hover { background: var(--bg-light); color: var(--primary-orange); }
body.dark .dropdown-item:hover { background: #374151; color: var(--primary-orange); }

/* 主题切换按钮 */
.theme-toggle {
    padding: 8px;
    border-radius: 50%;
    background: var(--bg-gray);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 40px;
    min-height: 40px;
}

.theme-toggle:hover { background: var(--bg-light); }
body.dark .theme-toggle:hover { background: #374151; }

.theme-toggle svg { width: 20px; height: 20px; color: var(--text-dark); }

.sun-icon { color: #fbbf24; }
.moon-icon { color: #4b5563; }

/* 移动端菜单按钮 - PC 隐藏 */
.mobile-menu-btn { display: none; }

/* ---------------- 搜索标题 ---------------- */
.search-header-section {
    text-align: center;
    padding: 40px 20px 16px;
    max-width: 900px;
    margin: 0 auto;
}

.search-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.search-description {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

.highlight-text {
    color: var(--primary-orange);
    font-weight: bold;
    font-size: 1.1em;
    display: inline-block;
    margin: 0 4px;
}

.search-title .highlight-text { font-size: 1.2em; }

/* ---------------- 搜索框区域 ---------------- */
.search-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 8px;
}

.search-container {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
}

body.dark .search-container { background: #1f2937; border-color: var(--border-gray); }

.search-box { display: flex; gap: 12px; align-items: stretch; }

.search-input-wrapper {
    flex: 1;
    position: relative;
    min-width: 0;
}

.search-input {
    width: 100%;
    padding: 14px 60px 14px 20px;
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    background: var(--bg-gray);
    color: var(--text-dark);
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
    height: 48px;
    box-sizing: border-box;
}

body.dark .search-input { background: #374151; border-color: #4b5563; color: var(--text-light); }

.search-input:focus { border-color: var(--primary-orange); background: var(--bg-white); }
body.dark .search-input:focus { background: #1f2937; }

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 12px;
    background: var(--primary-orange);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 36px;
}

.search-btn:hover {
    background: var(--primary-orange-dark);
    transform: translateY(-50%) scale(1.05);
}

.search-btn svg { width: 20px; height: 20px; color: white; }

/* 电台筛选行 */
.radio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.radio-filters select {
    flex: 1 1 150px;
    min-width: 0;
    padding: 10px 12px;
    border: 2px solid var(--border-gray);
    border-radius: 12px;
    background: var(--bg-gray);
    color: var(--text-dark);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

body.dark .radio-filters select { background: #374151; border-color: #4b5563; color: var(--text-light); }
.radio-filters select:focus { border-color: var(--primary-orange); }

.switch {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    padding: 4px 2px;
}

.switch input { accent-color: var(--primary-orange); width: 16px; height: 16px; }

.primary-btn {
    padding: 10px 22px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-orange), #ff8c00);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.25);
    white-space: nowrap;
}

.primary-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* 快捷栏 */
.quick-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

body.dark .quick-bar { border-top-color: var(--border-gray); }

.chip {
    padding: 7px 14px;
    border: 1px solid var(--border-gray);
    border-radius: 20px;
    background: var(--bg-gray);
    color: var(--text-dark);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

body.dark .chip { background: #374151; border-color: #4b5563; color: var(--text-light); }

.chip:hover { border-color: var(--primary-orange); color: var(--primary-orange); }

.chip.active {
    background: linear-gradient(135deg, var(--primary-orange), #ff8c00);
    border-color: var(--primary-orange);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.25);
}

.divider {
    width: 1px;
    height: 20px;
    background: var(--border-gray);
    margin: 0 4px;
}

/* ---------------- 内容区 ---------------- */
.content-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px 32px;
}

.result-bar {
    margin: 8px 2px 14px;
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.stats { font-size: 12px; color: var(--text-light); }

/* 卡片网格 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
    position: relative;
    overflow: hidden;
}

body.dark .card { background: #1f2937; border-color: var(--border-gray); }

/* 卡片顶部橙色渐变细条，呼应网站卡片头 */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fb923c, var(--primary-orange), var(--primary-orange-dark));
    opacity: 0;
    transition: opacity 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-orange);
    box-shadow: var(--shadow-lg);
}

.card:hover::before { opacity: 1; }

.card.playing {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 1px var(--primary-orange);
}

.card.playing::before { opacity: 1; }

.card.card-disabled { opacity: 0.6; }

.card-head { display: flex; align-items: flex-start; gap: 10px; }

.favicon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--bg-gray);
    flex-shrink: 0;
}

.card-title { flex: 1; min-width: 0; }

.card-title h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title .sub {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fav-btn {
    background: none;
    border: none;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    padding: 2px;
    opacity: 0.55;
    transition: opacity 0.15s, transform 0.15s;
}

.fav-btn:hover { opacity: 1; transform: scale(1.15); }
.fav-btn.on { opacity: 1; }

.card-tags { display: flex; flex-wrap: wrap; gap: 5px; min-height: 20px; }

.tag {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 12px;
    background: var(--bg-light);
    color: var(--primary-orange-darker);
    border: 1px solid var(--border-light);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark .tag { background: #374151; border-color: #4b5563; color: #fdba74; }

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.badges {
    font-size: 11px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.play-btn {
    padding: 7px 18px;
    border: 1px solid var(--primary-orange);
    border-radius: 8px;
    background: transparent;
    color: var(--primary-orange);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
    min-height: 32px;
}

.play-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-orange), #ff8c00);
    color: white;
}

.play-btn:disabled { border-color: var(--border-gray); color: var(--text-light); cursor: not-allowed; }

.warn {
    font-size: 11px;
    color: #d9534f;
    background: rgba(217, 83, 79, 0.08);
    border-radius: 6px;
    padding: 5px 8px;
}

/* 空态 / 分页 */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 14px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 26px 0 10px;
    font-size: 14px;
}

.pager button {
    padding: 8px 18px;
    border: 1px solid var(--border-gray);
    border-radius: 9px;
    background: var(--bg-white);
    color: var(--text-dark);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.pager button:hover:not(:disabled) { border-color: var(--primary-orange); color: var(--primary-orange); }
.pager button:disabled { opacity: 0.45; cursor: not-allowed; }

/* 骨架屏 */
.card.skeleton {
    height: 148px;
    background: linear-gradient(90deg, var(--bg-white) 25%, var(--bg-gray) 50%, var(--bg-white) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
}

.card.skeleton::before { display: none; }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------------- 播放器（固定底部） ---------------- */
.player {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 12px 24px;
}

/* 顶部橙色渐变细条，呼应网站卡片头 */
.player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fb923c, var(--primary-orange), var(--primary-orange-dark));
}

body.dark .player { background: #1f2937; border-top-color: var(--border-gray); }

.player-inner {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    min-height: 44px;
}

/* 左侧：播放状态 + 电台信息 */
.player-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
    /* 预留居中音频控件宽度，避免长标题与之重叠 */
    padding-right: calc(min(480px, 42vw) / 2 + 24px);
}

.player-status {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-orange);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.player-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.18);
}

.player-status:empty { display: none; }

.player-info { flex: 1; min-width: 0; }

.player-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dark);
}

.player-meta {
    font-size: 12px;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 3px;
}

/* 音频控件：相对整条播放条水平绝对居中，便于操作 */
#audio {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, 42vw);
    height: 40px;
}

/* ---------------- 友情链接 ---------------- */
.friend-links-section {
    margin-top: 48px;
    padding: 32px 20px 24px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
}

body.dark .friend-links-section { background: #1f2937; border-top-color: var(--border-gray); }

.friend-links-area {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.friend-links-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

body.dark .friend-links-title { color: var(--text-dark); }

.friend-link-items { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }

.friend-link {
    padding: 6px 14px;
    background: var(--bg-gray);
    color: var(--text-light);
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

body.dark .friend-link { background: #374151; color: var(--text-light); }
.friend-link:hover { background: var(--bg-light); color: var(--primary-orange); }
body.dark .friend-link:hover { background: #4b5563; color: var(--primary-orange); }

/* ---------------- 页脚 ---------------- */
.site-footer {
    background: var(--bg-white);
    padding: 0 20px 32px;
}

body.dark .site-footer { background: #1f2937; }

.footer-content { max-width: 1400px; margin: 0 auto; }

.copyright-area {
    padding-top: 24px;
    border-top: 1px dashed var(--border-gray);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

body.dark .copyright-area { border-top-color: #4b5563; }

.copyright-text {
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.9;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--border-gray);
        box-shadow: var(--shadow-lg);
        padding: 20px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        transform: translateY(-110%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 49;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    body.dark .nav-menu { background: #1f2937; border-bottom-color: #374151; }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-item {
        padding: 12px 16px;
        background: var(--bg-gray);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    body.dark .nav-item { background: #374151; }

    .nav-item .dropdown-arrow { margin-left: auto; }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: var(--shadow);
        border: 1px solid var(--border-gray);
        min-width: 100%;
        margin-top: 8px;
        padding: 8px 0;
        display: none;
        background: var(--bg-white);
        border-radius: 8px;
    }

    body.dark .dropdown { background: #2d3748; border-color: #4a5568; }
    .nav-item:hover .dropdown { display: none; }
    .nav-item.active .dropdown { display: block; }

    .dropdown-item { padding: 13px 20px; font-size: 15px; border-bottom: 1px solid var(--border-light); }
    body.dark .dropdown-item { border-bottom-color: #4a5568; }
    .dropdown-item:last-child { border-bottom: none; }
    .dropdown-item:hover { background: var(--primary-orange); color: white; padding-left: 24px; }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: var(--bg-gray);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
        color: var(--text-dark);
        flex-shrink: 0;
    }

    .mobile-menu-btn:hover { background: var(--primary-orange); color: white; }
    .mobile-menu-btn svg { width: 20px; height: 20px; }
}

@media (max-width: 720px) {
    .search-title { font-size: 26px; }
    .search-header-section { padding-top: 30px; }
    .search-section { padding: 16px 12px 4px; }
    .search-container { padding: 18px; }
    .content-section { padding: 12px 12px 24px; }
    .nav-container { padding: 0 14px; }
    .logo-name { font-size: 16px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .card { padding: 10px; }

    .player { padding: 10px 16px; }
    .player-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        min-height: 0;
    }
    #audio {
        position: static;
        transform: none;
        width: 100%;
        height: 40px;
        order: 1;
    }
    .player-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding-right: 0;
        order: 2;
    }
    body { padding-bottom: 180px; }
}

/* 月亮 / 太阳图标切换 */
.dark .moon-icon { display: none; }
.sun-icon { display: none; }
.dark .sun-icon { display: block; }
