/* PC端视频页样式 */

.main-content {
    flex: 1; /* 占据剩余空间 */
    overflow-y: auto; /* 允许内容区域垂直滚动 */
}

.main-content .container {
    max-width: none;
    width: 100vw; /* 使用视口宽度 */
    min-height: 100vh; /* 最小高度为视口高度，支持内容扩展 */
    margin: 0;
    padding: 0.3rem 0.2rem; /* 极小的左右内边距 */
    box-sizing: border-box;
}

/* B站风格的内容分隔和卡片设计 */
.video-content {
    background: transparent;
}

.comments-section {
    margin-top: 1rem;
}

/* 改进的卡片样式 */
.video-info, .comments-section {
    transition: box-shadow 0.2s ease;
}

.video-info:hover, .comments-section:hover {
    box-shadow: 0 4px 20px var(--shadow);
}

.video-container {
    display: grid;
    grid-template-columns: 1fr 360px; /* 稍微缩小侧边栏 */
    grid-template-rows: minmax(0, 1fr) auto auto;
    gap: 0.3rem; /* 进一步减少间距 */
    margin-bottom: 0;
    width: 100%;
    min-height: calc(100vh - 4rem); /* 减去header高度，支持内容扩展 */
}

/* B站风格布局：主要内容区域 */
.main-video {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-height: 400px; /* 最小高度确保播放器可见 */
}

/* 视频信息区域 */
.video-content {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    /* 移除高度限制，允许内容自然展开 */
}

/* 评论区域 */
.comments-section {
    grid-column: 1;
    grid-row: 3;
    min-height: 200px;
    /* 移除高度限制，允许评论内容自然展开 */
}

.video-sidebar {
    grid-column: 2;
    grid-row: 1 / 4;
    position: sticky;
    top: 0;
    max-height: 100vh; /* 最大高度为视口高度 */
    overflow-y: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* 主视频区域覆盖默认样式 */
.main-video {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 20px var(--shadow);
    min-height: 600px; /* 确保主视频区域有足够高度 */
}

/* 修改播放器容器样式，确保正确渲染 */
.video-player {
    position: relative;
    background: #000;
    width: 100%;
    flex: 1;
    /* 移除固定最小高度，让容器根据视频比例自适应 */
    overflow: hidden;
    border-radius: 0 0 8px 8px;
    border: 1px solid var(--border-color);
    border-top: none;
    /* 使用flex布局确保内容居中 */
    display: flex;
    align-items: center;
    justify-content: center;
    /* 使用aspect-ratio属性让容器根据视频比例自适应 */
}

.video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* DPlayer容器样式 */
#dplayer {
    width: 100%;
    height: 100%;
    background: #000;
    /* 使用flex布局使内容居中 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 修复DPlayer过高显示问题 */
.dplayer-video-wrap {
    position: relative;
    background: #000;
    width: 100%;
    height: 100%;
    /* 使用flex布局使视频居中 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.dplayer-video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-player {
        min-height: 200px;
    }
    
    .video-container {
        grid-template-columns: 1fr; /* 单列布局 */
        grid-template-rows: auto auto auto auto;
        gap: 1.5rem;
    }
    
    .main-video {
        grid-column: 1;
        grid-row: 1;
    }
    
    .video-content {
        grid-column: 1;
        grid-row: 2;
    }
    
    .comments-section {
        grid-column: 1;
        grid-row: 3;
    }
    
    .video-sidebar {
        grid-column: 1;
        grid-row: 4;
        position: static;
        max-height: none;
    }
}

/* 播放器标题栏 */
.player-title-bar {
    padding: 0.8rem 1.5rem; /* 减少内边距 */
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem; /* 减少间距 */
    border-radius: 8px 8px 0 0; /* 更小的圆角 */
    border: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.player-video-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.player-video-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.player-view-count,
.player-danmaku-count,
.player-upload-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.player-danmaku-count {
    color: #00a1d6;
}

@media (max-width: 768px) {
    .player-title-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .player-video-title {
        font-size: 1.1rem;
    }
    
    .player-video-stats {
        gap: 0.75rem;
    }
    
    .player-view-count,
    .player-danmaku-count,
    .player-upload-date {
        font-size: 0.75rem;
    }
}

/* 视频信息 */
.video-info {
    padding: 1rem; /* 减少内边距 */
    background: var(--card-bg);
    border-radius: 8px; /* 小一些的圆角 */
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow);
    margin-top: 0.8rem;
    flex-shrink: 0;
}

.video-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.video-tags {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
}

.tag-item {
    background: rgba(0, 161, 214, 0.1);
    color: #00a1d6;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(0, 161, 214, 0.2);
    transition: all 0.2s ease;
    cursor: pointer;
}

.tag-item:hover {
    background: rgba(0, 161, 214, 0.2);
    border-color: #00a1d6;
}

.tag-placeholder {
    background: rgba(107, 114, 128, 0.1) !important;
    color: #6b7280 !important;
    border-color: rgba(107, 114, 128, 0.2) !important;
    font-style: italic;
}

.tag-placeholder:hover {
    background: rgba(107, 114, 128, 0.15) !important;
    border-color: #6b7280 !important;
}

/* 操作按钮 */
.video-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--highlight);
    color: white;
}

.btn-primary:hover {
    background: #d43851;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background-color: rgba(56, 139, 253, 0.1);
}

/* 点赞按钮激活状态 */
.like-btn.liked {
    background: #00a1d6 !important;
    color: white !important;
    transform: scale(1.05);
}

.like-btn.liked .fas {
    animation: likeAnimation 0.3s ease;
}

@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* 视频描述 */
.video-description {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.video-description h3 {
    color: var(--text);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.video-description p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* 评论区域 */
.comments-section {
    margin-top: 0;
    padding: 1rem; /* 减少内边距 */
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow);
    /* 移除固定高度和overflow限制，让内容自然展开 */
}

.comments-header {
    margin-bottom: 1rem;
}

.comments-header h3 {
    color: var(--text);
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comments-header i {
    color: var(--accent);
}

.comment-form {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.comment-form textarea::placeholder {
    color: var(--text-muted);
}

.comment-form button {
    align-self: flex-start;
}

.comments-list {
    min-height: 100px;
}

.no-comments {
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* 减少间距 */
    /* 移除固定高度，让内容自适应 */
}

.sidebar-section {
    background: var(--card-bg);
    border-radius: 8px; /* 小一些的圆角 */
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow);
    /* 移除flex-shrink限制，允许内容自适应 */
}

/* 扩展模式：无剧集时的侧边栏区域 */
.sidebar-section-expanded {
    /* 无剧集时，推荐视频区域可以占用更多空间 */
    flex: 1;
    min-height: calc(100vh - 150px); /* 最小高度确保能显示更多内容 */
}

.sidebar-header {
    padding: 0.8rem 1rem; /* 减少内边距 */
    border-bottom: 1px solid var(--border-color);
    background: var(--secondary);
}

.sidebar-header h3 {
    color: var(--text);
    font-size: 1.1rem;
    margin: 0;
}

.sidebar-content {
    padding: 0.8rem; /* 减少内边距 */
    max-height: calc(100vh - 120px); /* 设置最大高度，留出一些空间给header和其他元素 */
    overflow-y: auto; /* 允许垂直滚动 */
}

/* 相关视频 */
.related-videos {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* 默认显示6个相关推荐 */
    max-height: calc(6 * (68px + 24px)); /* 每个项目高度为缩略图高度(68px) + padding(12px*2) + margin(12px) = 104px */
    overflow-y: auto; /* 启用垂直滚动 */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

/* 扩展模式：无剧集时显示更多推荐视频 */
.related-videos-expanded {
    /* 扩展显示20个相关推荐，使用更大的高度 */
    max-height: calc(100vh - 200px); /* 使用视口高度减去header和其他元素的空间 */
}

/* 无剧集时扩展模式的内容区域 */
.sidebar-section-expanded .sidebar-content {
    max-height: calc(100vh - 180px); /* 扩展内容区域高度 */
    padding: 1rem; /* 稍微增加内边距以更好地展示内容 */
}

.related-videos::-webkit-scrollbar {
    width: 6px;
}

.related-videos::-webkit-scrollbar-track {
    background: transparent;
}

.related-videos::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.related-video-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px var(--shadow);
}

/* 移除相关推荐缩略图上的时长显示 */

.related-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: var(--highlight);
}

.related-video-thumbnail {
    position: relative;
    width: 120px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.3rem;
    padding: 0.2rem 0;
}

.related-video-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-video-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.related-video-stats .views-count {
    color: var(--text-muted);
}

.related-video-stats .duration {
    color: var(--text-muted);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-weight: 600;
}

.related-video-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* PC端观看次数样式 - 透明背景 */
.views-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: transparent;
    color: var(--text);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* 白色模式下的文字阴影 */
:root .views-badge {
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8), 
                 -1px -1px 2px rgba(255, 255, 255, 0.6),
                 1px 1px 2px rgba(255, 255, 255, 0.6);
}

/* 黑色模式下的文字阴影 */
[data-theme="dark"] .views-badge {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 
                 -1px -1px 2px rgba(0, 0, 0, 0.6),
                 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .video-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 1.5rem;
    }
    
    .main-video {
        grid-column: 1;
        grid-row: 1;
    }
    
    .video-content {
        grid-column: 1;
        grid-row: 2;
    }
    
    .comments-section {
        grid-column: 1;
        grid-row: 3;
    }
    
    .video-sidebar {
        grid-column: 1;
        grid-row: 4;
        position: static;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .video-info {
        padding: 1rem;
    }
    
    .video-title {
        font-size: 1.25rem;
    }
    
    .related-video-thumbnail {
        width: 100px;
        height: 56px;
    }
}

/* ===== 剧集功能样式 ===== */

/* 剧集控制按钮 */
.episodes-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.episode-indicator {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0 8px;
    white-space: nowrap;
}

/* 剧集列表侧边栏 */
.series-episodes {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* 移除固定高度，允许自适应内容长度 */
}

.series-episodes .sidebar-header {
    position: relative;
}

/* 剧集标题行 */
.series-title-row {
    margin-bottom: 0.8rem;
}

.series-title-row h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text);
}

/* 剧集统计信息行 */
.series-stats-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.series-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-shrink: 0;
}

.total-views,
.total-danmaku {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #f5f5f5;
    transition: all 0.3s ease;
}

.total-views {
    color: #00a1d6;
}

.total-views:hover {
    background: #e3f2fd;
    border-color: #00a1d6;
    transform: translateY(-1px);
}

.total-views i {
    color: #00a1d6;
    font-size: 0.9rem;
}

.total-danmaku {
    color: #ff6b35;
}

.total-danmaku:hover {
    background: #fff3e0;
    border-color: #ff6b35;
    transform: translateY(-1px);
}

.total-danmaku i {
    color: #ff6b35;
    font-size: 0.9rem;
}

/* 自动连播开关 */
.auto-play-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.4rem 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #f5f5f5;
    transition: all 0.3s ease;
}

.auto-play-toggle:hover {
    background: #e3f2fd;
    border-color: #00a1d6;
    transform: translateY(-1px);
}

/* 深色主题适配 */
[data-theme="dark"] .total-views,
[data-theme="dark"] .total-danmaku,
[data-theme="dark"] .auto-play-toggle {
    border-color: #4a4a4a;
    background: #2a2a2a;
}

[data-theme="dark"] .total-views:hover {
    background: #1e3a5f;
    border-color: #00a1d6;
}

[data-theme="dark"] .total-danmaku:hover {
    background: #3d2317;
    border-color: #ff6b35;
}

[data-theme="dark"] .auto-play-toggle:hover {
    background: #1e3a5f;
    border-color: #00a1d6;
}

.toggle-label {
    font-size: 0.8rem;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
}

.toggle-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 40px;
    height: 20px;
    background: var(--border-color);
    border-radius: 20px;
    transition: background 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
    background: #00a1d6;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* 剧集简介区域 */
.series-description {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.description-label {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 600;
    flex-shrink: 0;
}

.series-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    flex: 1;
}

.episodes-list {
    /* 只显示3个项目并支持上下滑动 */
    max-height: calc(3 * (68px + 24px)); /* 每个项目高度为缩略图高度(68px) + padding(12px*2) + margin(12px) = 104px */
    overflow-y: auto; /* 启用垂直滚动 */
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.episodes-list::-webkit-scrollbar {
    width: 6px;
}

.episodes-list::-webkit-scrollbar-track {
    background: transparent;
}

.episodes-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.episode-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    position: relative;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px var(--shadow);
    margin-bottom: 1rem;
}

.episode-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: var(--highlight);
}

.episode-item.current {
    background: var(--highlight);
    color: white;
    border-color: var(--highlight);
}

.episode-item.current:hover {
    background: #d63850;
}

.episode-thumbnail {
    position: relative;
    width: 120px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.episode-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 剧集信息区域样式 */

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.episode-number {
    font-weight: 600;
    font-size: 0.9rem;
}

.episode-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.episode-item:hover .episode-overlay {
    opacity: 1;
}

.episode-overlay i {
    color: white;
    font-size: 1.2rem;
}

.current-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--highlight);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    z-index: 2;
    padding: 4px;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 5px var(--highlight);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 15px var(--highlight), 0 0 25px rgba(233, 69, 96, 0.5);
        transform: scale(1.05);
    }
}

.playing-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 12px;
    height: 8px;
}

.wave-bar {
    width: 2px;
    background: white;
    border-radius: 1px;
    animation: waveAnimation 1.2s ease-in-out infinite;
}

.wave-bar:nth-child(1) {
    height: 2px;
    animation-delay: 0s;
}

.wave-bar:nth-child(2) {
    height: 4px;
    animation-delay: 0.3s;
}

.wave-bar:nth-child(3) {
    height: 6px;
    animation-delay: 0.6s;
}

.wave-bar:nth-child(4) {
    height: 3px;
    animation-delay: 0.9s;
}

@keyframes waveAnimation {
    0%, 100% {
        transform: scaleY(0.4);
        opacity: 0.7;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.episode-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.3rem;
    padding: 0.2rem 0;
}

.episode-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-item.current .episode-title {
    color: white;
}

.episode-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.episode-stats .views-count {
    color: var(--text-muted);
}

.episode-stats .duration {
    color: var(--text-muted);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-weight: 600;
}

.episode-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.episode-item.current .episode-stats,
.episode-item.current .episode-date {
    color: rgba(255, 255, 255, 0.8);
}

.episode-item.current .episode-stats .views-count,
.episode-item.current .episode-stats .duration {
    color: rgba(255, 255, 255, 0.8);
}

/* PC端响应式适配 - 针对不同分辨率优化 */

/* 超宽屏幕 (2560px+) */
@media (min-width: 2560px) {
    .main-content .container {
        padding: 0.4rem 0.1rem; /* 极小左右内边距 */
    }
    
    .video-container {
        grid-template-columns: 1fr 480px;
        gap: 0.4rem;
    }
    
    .video-player {
        min-height: 500px;
    }
    
    .sidebar-content {
        padding: 1rem;
    }
}

/* 大屏幕 (1920px+) */
@media (min-width: 1920px) {
    .main-content .container {
        padding: 0.4rem 0.1rem; /* 极小左右内边距 */
    }
    
    .video-container {
        grid-template-columns: 1fr 420px;
        gap: 0.4rem;
    }
    
    .video-player {
        min-height: 400px;
    }
    
    /* 大屏幕下的扩展模式 */
    .related-videos-expanded {
        max-height: calc(100vh - 180px);
    }
    
    .sidebar-section-expanded .sidebar-content {
        max-height: calc(100vh - 160px);
        padding: 1.2rem;
    }
}

/* 中大屏幕 (1440-1919px) */
@media (min-width: 1440px) and (max-width: 1919px) {
    .main-content .container {
        padding: 0.3rem 0.1rem; /* 极小左右内边距 */
    }
    
    .video-container {
        grid-template-columns: 1fr 400px;
        gap: 0.3rem;
    }
    
    .video-player {
        min-height: 350px;
    }
    
    /* 中大屏幕下的扩展模式 */
    .related-videos-expanded {
        max-height: calc(100vh - 200px);
    }
    
    .sidebar-section-expanded .sidebar-content {
        max-height: calc(100vh - 180px);
        padding: 1rem;
    }
}

/* 标准PC屏幕 (1200-1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .main-content .container {
        padding: 0.3rem 0.1rem; /* 极小左右内边距 */
    }
    
    .video-container {
        grid-template-columns: 1fr 360px;
        gap: 0.3rem;
    }
    
    .video-player {
        min-height: 320px;
    }
    
    /* 标准PC屏幕下的扩展模式 */
    .related-videos-expanded {
        max-height: calc(100vh - 220px);
    }
    
    .sidebar-section-expanded .sidebar-content {
        max-height: calc(100vh - 200px);
        padding: 0.9rem;
    }
}

/* 小PC屏幕 (1024-1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .main-content .container {
        padding: 0.2rem 0.05rem; /* 极小左右内边距 */
    }
    
    .video-container {
        grid-template-columns: 1fr 320px;
        gap: 0.2rem;
    }
    
    .video-player {
        min-height: 280px;
    }
    
    .episode-thumbnail {
        width: 100px;
        height: 56px;
    }
    
    .episode-title {
        font-size: 0.8rem;
    }
    
    .sidebar-header {
        padding: 0.6rem 0.8rem;
    }
    
    .sidebar-content {
        padding: 0.6rem;
    }
}

/* 最小PC屏幕支持 (1024px以下不支持移动端) */
@media (max-width: 1023px) {
    .main-content .container {
        padding: 0.2rem 0.05rem; /* 极小左右内边距 */
        min-width: 1000px;
    }
    
    .video-container {
        grid-template-columns: 1fr 280px;
        gap: 0.2rem;
    }
    
    .video-player {
        min-height: 240px;
    }
    
    .episode-thumbnail {
        width: 90px;
        height: 50px;
    }
    
    .episode-title {
        font-size: 0.75rem;
    }
    
    .sidebar-header {
        padding: 0.5rem 0.6rem;
    }
    
    .sidebar-content {
        padding: 0.5rem;
    }
    
    body {
        min-width: 1000px;
        overflow-x: auto;
    }
}

/* 自动播放通知动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.auto-play-notification {
    animation: slideInRight 0.3s ease;
}

.auto-play-notification .notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auto-play-notification .cancel-auto-play {
    background: var(--primary);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.auto-play-notification .cancel-auto-play:hover {
    background: var(--primary-dark);
}