/* --- 全局样式 --- */
:root {
    --primary: #EC4899;
    --secondary: #6366F1;
    --tertiary: #8B5CF6;
    --accent-cyan: #06B6D4;
    --accent-orange: #F97316;
    --bg-dark: #121212;
    --bg-panel: #181818;
    --bg-hover: #282828;
    --text-main: #FFFFFF;
    --text-sub: #B3B3B3;
    --text-muted: #666666;
    --text-secondary: #B3B3B3;
    --border-radius: 16px;
    --transition: all 0.3s ease;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(90deg, #6366F1, #8B5CF6, #EC4899);
    --gradient-secondary: linear-gradient(135deg, #06B6D4, #F97316);
    --gradient-accent: linear-gradient(135deg, #6366F1, #EC4899);
    --gradient-cyan-orange: linear-gradient(135deg, #06B6D4, #F97316);
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px var(--primary); }
    50% { box-shadow: 0 0 20px var(--primary), 0 0 30px var(--secondary); }
    100% { box-shadow: 0 0 5px var(--primary); }
}

@keyframes gradient-bg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

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

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

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

/* 图片加载占位符 */
.img-placeholder {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* 图片加载完成动画 */
img.loaded {
    animation: fadeIn 0.3s ease-in;
}

/* 视频加载占位符 */
.video-placeholder {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sub);
}

/* 骨架屏加载效果 */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 8px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- 布局容器 --- */
.container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* --- 侧边栏 --- */
.sidebar {
    width: 240px;
    background-color: #000;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

/* --- 右侧广告栏 --- */
.ad-sidebar {
    width: 200px;
    background: rgba(26, 26, 26, 0.95);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.ad-sidebar.left-ad {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-sidebar:not(.left-ad) {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 51, 102, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: var(--text-sub);
}

.ad-close {
    cursor: pointer;
    transition: all 0.3s ease;
}

.ad-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.ad-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.ad-slot {
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ad-slot:hover {
    opacity: 0.9;
}

.ad-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, rgba(255, 51, 102, 0.1), rgba(51, 204, 255, 0.1));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.ad-placeholder i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.2);
}

.ad-slot p {
    color: var(--text-sub);
    font-size: 13px;
    margin: 0;
}

.ad-slot-1 {
    border-color: rgba(255, 51, 102, 0.3);
}

.ad-slot-2 {
    border-color: rgba(51, 204, 255, 0.3);
}

.ad-contact {
    padding: 15px;
    background: rgba(51, 204, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.ad-contact p {
    color: var(--text-sub);
    font-size: 12px;
    margin: 0;
}

.ad-contact i {
    color: var(--secondary);
    margin-right: 5px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo i { color: var(--primary); }

.nav-menu li {
    padding: 10px 0;
    color: var(--text-sub);
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
}

.nav-menu li:hover, .nav-menu li.active {
    color: var(--text-main);
}

.divider {
    height: 1px;
    background-color: #333;
    margin: 10px 0;
}

.playlist-list li {
    padding: 8px 0;
    color: var(--text-sub);
    font-size: 14px;
    cursor: pointer;
}
.playlist-list li:hover { color: var(--text-main); }

/* --- 主内容区 --- */
.main-content {
    flex: 1;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 20%),
        linear-gradient(135deg, rgba(18, 18, 18, 0.95) 0%, rgba(24, 24, 24, 0.9) 100%);
    background-attachment: fixed;
    overflow-y: auto;
    padding: 20px 30px;
}

/* 顶部导航 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 顶部导航栏 */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(24, 24, 24, 0.9);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.top-nav .nav-menu {
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.top-nav .nav-menu li {
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.top-nav .nav-menu li:hover {
    background: var(--gradient-primary);
    color: var(--text-main);
}

.top-nav .playlist-list {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.top-nav .playlist-list li {
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.top-nav .playlist-list li:hover {
    background: var(--gradient-secondary);
    color: var(--text-main);
}

/* 左侧广告栏 */
.left-ad {
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-arrows i {
    background: rgba(0,0,0,0.7);
    padding: 8px;
    border-radius: 50%;
    margin-right: 10px;
    cursor: pointer;
}

.user-actions button {
    background: var(--text-main);
    color: #000;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
}

.share-btn {
    position: relative;
}

.share-menu {
    position: absolute;
    top: 45px;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 0;
    min-width: 150px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.share-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-sub);
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.share-item i {
    font-size: 18px;
    width: 20px;
}

.share-item i.fa-weixin { color: #07c160; }
.share-item i.fa-weibo { color: #e6162d; }
.share-item i.fa-qq { color: #12b7f5; }
.share-item i.fa-link { color: var(--secondary); }

/* 推荐板块 */
h2 { 
    margin-bottom: 20px; 
    font-size: 22px;
    text-align: center;
}

/* 三栏布局容器 */
.recommendation-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    justify-content: center;
}

/* 侧边列表 */
.side-list {
    flex: 0 0 160px;
    background: var(--bg-panel);
    border-radius: var(--border-radius);
    padding: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    min-height: 320px;
    box-shadow: var(--shadow);
}

.side-list h3 {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--text-main);
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.side-list h3 i {
    color: var(--secondary);
    margin-right: 5px;
}

.song-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.song-list li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.song-list li:last-child {
    border-bottom: none;
}

.song-list li:hover {
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
    padding-left: 5px;
}

.song-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    font-size: 11px;
    color: var(--secondary);
    margin-right: 10px;
    flex-shrink: 0;
}

.song-num.new {
    background: var(--gradient-primary);
    color: white;
    font-size: 9px;
    font-weight: bold;
}

.song-name {
    font-size: 13px;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 中间卡片区域 */
.cards-grid {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0;
    max-width: 700px;
}

.cards-grid .card {
    flex: 0 0 160px;
    max-width: 160px;
}

.card {
    background-color: var(--bg-panel);
    padding: 15px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow);
}

.card:hover {
    background-color: var(--bg-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    animation: glow 2s ease-in-out infinite;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.card-title {
    font-weight: bold;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    color: var(--text-sub);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 播放按钮悬浮效果 */
.play-btn-hover {
    position: absolute;
    right: 15px;
    bottom: 80px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px) scale(0.8);
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
    animation: pulse 2s infinite;
}

.card:hover .play-btn-hover {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: pulse 1s infinite;
}

/* 视频推荐区域 */
.video-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.video-grid .video-card {
    flex: 0 0 150px;
    max-width: 150px;
}

.video-card {
    background-color: var(--bg-panel);
    padding: 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.video-card:hover {
    background-color: var(--bg-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    animation: glow 2s ease-in-out infinite;
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
    transform: scaleX(0);
    transition: var(--transition);
}

.video-card:hover::before {
    transform: scaleX(1);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 12px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.play-overlay {
    position: absolute;
    right: 12px;
    bottom: 70px;
    width: 48px;
    height: 48px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px) scale(0.8);
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(6, 182, 212, 0.4);
    animation: pulse 2s infinite;
}

.play-overlay i {
    color: white;
    font-size: 16px;
    margin-left: 3px;
}

.video-card:hover .play-overlay {
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: pulse 1s infinite;
}

.video-info h3 {
    font-weight: bold;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-info p {
    color: var(--text-sub);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

/* 迷你播放器样式 */
.mini-player {
    width: 100%;
    height: 45px;
    padding: 8px 15px;
    background: linear-gradient(135deg, rgba(24, 24, 24, 0.95), rgba(18, 18, 18, 0.95));
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow), 0 0 20px rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.scroll-text {
    flex: 1;
    height: 30px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.scroll-content {
    white-space: nowrap;
    position: absolute;
    animation: scroll 30s linear infinite;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    will-change: transform;
}

.scroll-text:hover .scroll-content {
    animation-play-state: paused;
}

.mini-player .controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-player .playlist select {
    height: 28px;
    width: 140px;
    padding: 4px 8px;
    background: rgba(42, 42, 42, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 12px;
    cursor: pointer;
    outline: none;
    transition: var(--transition);
}

.mini-player .playlist select:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.mini-player .playlist select option {
    background: var(--bg-panel);
    color: var(--text-main);
}

.mini-player .controls a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 28px;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: rgba(42, 42, 42, 0.6);
}

.mini-player .controls a:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.5);
}

.mini-player .controls a.active {
    background: var(--primary);
    color: white;
}

.mini-player .progress-time-volume {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini-player .progress-container {
    width: 180px;
    height: 6px;
    background: rgba(42, 42, 42, 0.8);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.mini-player .progress-bar {
    width: 0;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.1s linear;
}

.mini-player .time {
    font-size: 11px;
    color: var(--text-sub);
    font-weight: 500;
}

.mini-player .volume-container {
    width: 70px;
    height: 6px;
    background: rgba(42, 42, 42, 0.8);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.mini-player .volume-bar {
    width: 70%;
    height: 100%;
    background: var(--gradient-secondary);
    border-radius: 3px;
    position: absolute;
    top: 0;
    left: 0;
}

.mini-player .volume-control {
    width: 70px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(42, 42, 42, 0.8);
    border-radius: 2px;
    outline: none;
}

.mini-player .volume-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.mini-player .volume-control::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* 分类标签样式 */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    padding: 10px 0;
    overflow-x: auto;
}

.category-tab {
    padding: 10px 20px;
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 14px;
}

.category-tab:hover {
    background: var(--gradient-primary);
    color: var(--text-main);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.category-tab.active {
    background: var(--gradient-primary);
    color: var(--text-main);
    border-color: transparent;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.content-section {
    transition: all 0.3s ease;
}

.content-section.hidden {
    display: none;
}

/* 友谊链接样式 */
.friend-links-section {
    background: transparent !important;
    padding: 0 !important;
    margin-top: 20px !important;
    border: none !important;
}

.friend-links-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-main);
}

.friend-links-section h2 i {
    color: var(--secondary);
    margin-right: 10px;
}

.friend-links-section .links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.friend-links-section .link-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-sub);
    font-size: 14px;
    transition: all 0.3s ease;
}

.friend-links-section .link-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 51, 102, 0.2);
}

.friend-links-section .link-item i {
    font-size: 16px;
    color: var(--secondary);
}

.friend-links-section .apply-link {
    color: var(--text-sub);
    font-size: 13px;
    margin-top: 10px;
}

.friend-links-section .apply-link i {
    color: var(--accent);
    margin-right: 5px;
}

/* 版权信息样式 */
.copyright {
    text-align: center;
    padding: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 20px;
}

.copyright a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.copyright a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ad-sidebar {
        display: none;
    }
    
    /* 移动端容器布局 */
    .container {
        display: block;
        overflow-y: auto;
    }
    
    /* 移动端侧边栏优化 */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 9999;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    /* 添加移动端菜单按钮 */
    .mobile-menu-btn {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 10000;
        background: var(--primary);
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 18px;
    }
    
    /* 移动端主内容区域 */
    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 60px 15px 15px 15px;
    }
    
    /* 移动端遮罩层 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .mini-player {
        flex-direction: column;
        height: auto;
        padding: 12px;
        gap: 10px;
    }
    
    .mini-player .controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .mini-player .playlist select {
        width: 100%;
    }
    
    .mini-player .progress-time-volume {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .mini-player .progress-container {
        width: 100%;
    }
    
    /* 移动端优化 */
    body {
        font-size: 16px;
        -webkit-text-size-adjust: 100%;
    }
    
    /* 增大触摸区域 */
    .nav-menu a,
    .playlist-list a,
    .category-tab,
    .card {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* 优化导航 */
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 15px;
    }
    
    .nav-menu li,
    .playlist-list li {
        padding: 12px 15px;
    }
    
    /* 优化卡片网格 */
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .card-img {
        height: 140px;
    }
    
    /* 优化按钮 */
    .user-actions button {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    /* 优化分享菜单 */
    .share-menu {
        right: -10px;
        min-width: 140px;
    }
    
    .share-item {
        padding: 12px 15px;
    }
    
    /* 优化字体大小 */
    h2 {
        font-size: 18px;
    }
    
    .card h3 {
        font-size: 13px;
    }
    
    .card p {
        font-size: 11px;
    }
    
    /* 优化播放器控件 */
    .mini-player a {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 优化友谊链接 */
    .friend-links-section .link-item {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    /* 隐藏桌面端特定元素 */
    .nav-arrows {
        display: none;
    }
    
    /* 优化内容区域 */
    .main-content {
        padding: 15px;
    }
    
    /* 优化分类标签 */
    .category-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .category-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* 移动端：侧边列表隐藏，卡片区域全宽 */
    .recommendation-wrapper {
        flex-direction: column;
    }
    
    .side-list {
        display: none;
    }
    
    .cards-grid {
        width: 100%;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .cards-grid,
    .video-grid {
        gap: 10px;
    }
    
    .cards-grid .card,
    .video-grid .video-card {
        flex: 0 0 130px;
        max-width: 130px;
    }
    
    .card {
        padding: 10px;
    }
    
    .card-img {
        height: 110px;
    }
    
    .sidebar {
        padding: 10px;
    }
    
    .nav-menu li,
    .playlist-list li {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .user-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .user-actions button {
        width: 100%;
    }
    
    .share-menu {
        right: 0;
        left: 0;
        width: 100%;
    }
    
    .video-info h3 {
        font-size: 13px;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
    }
    
    .card:active {
        transform: scale(0.98);
    }
    
    .link-item:hover {
        transform: none;
    }
    
    .link-item:active {
        transform: scale(0.98);
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .mini-player {
        flex-direction: row;
        height: auto;
        padding: 8px 15px;
    }
    
    .mini-player .controls {
        width: auto;
    }
    
    .mini-player .progress-time-volume {
        width: auto;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img,
    .track-img {
        image-rendering: -webkit-optimize-contrast;
    }
}