/* ==================== 重置样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== 头部导航 ==================== */
.header {
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: opacity 0.2s;
}

.logo a:hover {
    opacity: 0.9;
}

.nav {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(20, 20, 20, 0.7);
    padding: 4px;
    border-radius: 60px;
    backdrop-filter: blur(4px);
}

.nav a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 18px;
    border-radius: 40px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 用户欢迎语 & 会员标签 */
.user-greeting {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffd966;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 18px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
}

.vip-tag {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 4px;
}

.vip-tag.normal {
    background: #2a2a2a;
    color: #aaa;
}

/* ==================== 分类导航栏 ==================== */
.category-bar {
    background: #0f0f0f;
    border-bottom: 1px solid #1f1f1f;
    padding: 12px 0;
    position: sticky;
    top: 72px;
    z-index: 99;
}

.category-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 4px;
}

.category-scroll::-webkit-scrollbar {
    height: 4px;
}

.category-scroll::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.category-scroll::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.cat-item {
    display: inline-block;
    padding: 6px 18px;
    background: #1a1a1a;
    border-radius: 40px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.cat-item:hover {
    background: #2a2a2a;
    color: #fff;
}

.cat-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* 分类标题区 */
.category-title {
    margin: 32px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
}

.category-title h2 {
    font-size: 1.6rem;
    font-weight: 600;
    background: linear-gradient(135deg, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.category-title span {
    color: #888;
    font-size: 0.85rem;
}

/* ==================== 视频网格（桌面4列） ==================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 32px 0 48px;
}

/* 响应式：屏幕 ≤1200px 时改为3列 */
@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 响应式：屏幕 ≤900px 时改为2列 */
@media (max-width: 900px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 响应式：屏幕 ≤600px 时减小间距 */
@media (max-width: 600px) {
    .video-grid {
        gap: 16px;
    }
}

/* 视频卡片 */
.video-card {
    background: #121212;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

/* 移除卡片内链接的下划线 */
.video-card a,
.video-card a:hover,
.video-card a:visited,
.video-card a:active {
    text-decoration: none;
}

/* 封面容器（16:9 横版） */
.cover {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #1e1e1e;
}

.cover img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.video-card:hover .cover img {
    transform: scale(1.05);
}

/* 播放按钮（悬停显示） */
.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
    font-size: 24px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.video-card:hover .play-btn {
    opacity: 1;
}

/* 视频信息区 */
.video-info {
    padding: 12px;
}

/* 视频标题 */
.video-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #f0f0f0;
    letter-spacing: -0.2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em;
}

/* 元信息（分类、备注、播放量） */
.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.7rem;
    color: #aaa;
}

.video-meta .type,
.video-meta .remarks,
.video-meta .views {
    background: #2a2a2a;
    padding: 2px 8px;
    border-radius: 20px;
}

.video-meta .views {
    background: #1e1e1e;
    color: #ffd966;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 40px 0 60px;
}

.page-link,
.page-current {
    display: inline-block;
    padding: 8px 20px;
    background: #1a1a1a;
    border-radius: 40px;
    text-decoration: none;
    color: #ddd;
    font-weight: 500;
    transition: all 0.2s;
}

.page-link:hover {
    background: #2a2a2a;
    color: white;
}

.page-current {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* ==================== 页脚 ==================== */
.footer {
    background: #050505;
    padding: 32px 0;
    text-align: center;
    color: #555;
    font-size: 0.8rem;
    border-top: 1px solid #1a1a1a;
}

/* ==================== 移动端导航适配 ==================== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    .header .container {
        flex-direction: column;
        align-items: stretch;
    }
    .logo {
        text-align: center;
    }
    .nav {
        justify-content: center;
        flex-wrap: wrap;
        border-radius: 48px;
        background: rgba(20, 20, 20, 0.8);
    }
    .nav a,
    .user-greeting {
        padding: 6px 14px;
        font-size: 0.8rem;
    }
    .category-bar {
        top: auto;
    }
    .category-scroll {
        gap: 8px;
    }
    .cat-item {
        padding: 4px 14px;
        font-size: 0.75rem;
    }
}

/* ==================== 播放页额外样式 ==================== */
.breadcrumb {
    margin: 20px 0 10px;
    font-size: 0.85rem;
    color: #888;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.player-wrapper {
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.player-section video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    min-height: 400px;
    object-fit: contain;
    background: #000;
}

.no-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #111;
    color: #ff6b6b;
    font-size: 1.2rem;
    gap: 12px;
}

.no-player p:first-child {
    font-size: 1.5rem;
    font-weight: 600;
}

.video-detail {
    background: #121212;
    border-radius: 20px;
    padding: 24px;
    margin: 30px 0;
    border: 1px solid #2a2a2a;
}

.detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
    letter-spacing: -0.3px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 20px;
}

.meta-item {
    font-size: 0.85rem;
    color: #aaa;
    background: #1e1e1e;
    padding: 4px 12px;
    border-radius: 20px;
}

.meta-item.remark {
    background: #2a2a2a;
    color: #ffd966;
}

.recommend-section {
    margin: 40px 0 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.more-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}

.more-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .player-section video {
        min-height: 250px;
        max-height: 50vh;
    }
    .detail-title {
        font-size: 1.4rem;
    }
    .detail-meta {
        gap: 12px;
    }
    .meta-item {
        font-size: 0.75rem;
    }
    .section-header h2 {
        font-size: 1.2rem;
    }
}