/* 缓存和错误通知样式 */
.cache-notice, .quota-notice, .fallback-notice {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #495057;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.cache-notice {
    border-left: 4px solid #28a745;
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.quota-notice {
    border-left: 4px solid #ffc107;
    color: #856404;
    background-color: rgba(255, 193, 7, 0.1);
}

.fallback-notice {
    border-left: 4px solid #17a2b8;
    color: #0c5460;
    background-color: rgba(23, 162, 184, 0.1);
}

/* YouTube page specific styles */
/* Remove override styles, use default navbar styles from comm.css */
.nav-categories {
    position: relative;
    z-index: 10;
}

/* Main content area styles */
main {
    width: 100%;
    margin: 0 auto;
    background-color: #44668c;
    padding: 5px;
    min-height: calc(100vh - 200px);
    margin-top: 0;
    position: relative;
}

@media (min-width: 1440px) {
    main {
        max-width: 1440px;
    }
}

/* Ensure sufficient spacing between content container and navbar */
.youtube-channel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

/* Video Player Container Styles */
.video-player-container {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Player Placeholder Styles */
.player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.player-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(68, 102, 140, 0.05) 0%, rgba(68, 102, 140, 0.1) 100%);
}

.placeholder-content {
    text-align: center;
    color: #666;
    z-index: 1;
    padding: 20px;
}

.placeholder-content i {
    font-size: 64px;
    color: #495057;
    margin-bottom: 20px;
    opacity: 0.7;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.player-placeholder:hover i {
    transform: scale(1.15) rotate(15deg);
    color: #EE4222;
    opacity: 1;
}

.placeholder-content p {
    font-size: 20px;
    color: #343a40;
    margin: 0;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Video Player Styles */
.video-player {    
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #f0f0f0; /* 浅色背景替代黑色 */
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Details Styles */
.video-details {
    padding: 25px;
    background: white;
    border-radius: 16px;
    margin-top: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

#current-video-title {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 700;
    color: #212529;
    line-height: 1.3;
}

.video-meta-info {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.video-meta-info::before {
    content: '📅';
    font-size: 16px;
}

#current-video-description {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #495057;
    padding-top: 8px;
}

/* Video Grid Styles */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-top: 25px;
    justify-items: stretch;
    align-items: start;
}

/* PC端紧凑优化 */
@media (min-width: 992px) {
    .video-grid {
        gap: 20px;
        margin-top: 15px;
    }
}


/* 视频列表样式 - 全新设计 */
.video-item, .video-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: auto;
    border: 1px solid #eaeaea;
}

.video-item:hover, .video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: #44668c;
}

.video-item.selected, .video-card.selected {
    border-color: #EE4222;
    box-shadow: 0 0 0 2px rgba(238, 66, 34, 0.2);
}

/* 视频缩略图样式 */
.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 46.25%; /* 减少高度，约20:9宽高比 */
    background-color: #f5f5f5;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 2px;
    width: calc(100% - 2px); /* 保持整体宽度不变 */
    height: 100%;
    object-fit: cover;
    border-radius: 10px; /* 与父容器.video-card相同的圆角 */
    transition: transform 0.3s ease;
}

.video-item:hover .video-thumbnail img, 
.video-card:hover .video-thumbnail img {
    transform: scale(1.03);
}

/* 播放图标 */
.video-thumbnail::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(238, 66, 34, 0.9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    padding-left: 5px;
}

.video-item:hover .video-thumbnail::after, 
.video-card:hover .video-thumbnail::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
}

/* 视频时长标签 */
.video-thumbnail::before {
    content: attr(data-duration);
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1;
}

/* 视频信息区域 */
.video-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
}

.video-title, .video-info h3 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.video-item:hover .video-title, 
.video-card:hover .video-info h3 {
    color: #44668c;
}

/* 视频描述 */
.video-description, .video-info p {
    margin: 0 0 6px 0;
    font-size: 12px;
    line-height: 1.3;
    color: #6c757d;
    /* 移除省略样式，显示全部描述 */
    display: block;
    overflow: visible;
    text-overflow: clip;
}

/* 视频元信息 */
.video-meta {
    font-size: 11px;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 4px;
    border-top: 1px solid #f0f0f0;
}

.video-meta .views {
    font-weight: 500;
    color: #495057;
}

.video-meta .date {
    font-style: italic;
}

/* 频道头部样式 - 左右两栏布局 */
.channel-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    gap: 30px;
}

.channel-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* 左侧主信息区域 - 调整比例避免过大 */
.channel-main-info {
    flex: 2;
    min-width: 0;
    max-width: 100%;
    min-width: 300px;
}

/* 右侧边栏区域 - 调整比例确保在小屏幕上也能正确显示 */
.channel-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    max-width: 300px;
    margin-left: 20px;
}

/* 响应式布局调整 */
@media (max-width: 768px) {
    .channel-header {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .channel-main-info {
        width: 100%;
        min-width: auto;
        max-width: 100%;
    }
    
    .channel-sidebar {
        width: 100%;
        max-width: 100%;
    }
    
    .channel-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .channel-avatar img {
        width: 100px;
        height: 100px;
    }
}

.channel-info {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    width: 100%;
}

/* 频道头像样式 */
.channel-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: visible;
    margin-right: 25px;
    border: 4px solid #EE4222;
    box-shadow: 0 6px 16px rgba(238, 66, 34, 0.35);
    transition: all 0.3s ease;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.channel-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(238, 66, 34, 0.45);
}

.channel-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
    background: white;
    transition: all 0.3s ease;
}

.channel-avatar:hover img {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 频道头像YouTube标志装饰 */
.channel-avatar::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    background: #EE4222;
    border-radius: 50%;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.channel-avatar::after {
    content: '▶';
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 3px;
}

/* 频道详情样式 */
.channel-details h1 {
    font-size: 30px;
    color: #212529;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(90deg, #212529, #495057);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.channel-details p {
    color: #666;
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

/* 右侧边栏区域 - 调整比例 */
.channel-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    max-width: 300px;
}

/* 访问频道按钮样式 */
.btn-visit {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(90deg, #EE4222, #FF7A50);
    color: white;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(238, 66, 34, 0.3);
    border: none;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    z-index: 1;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

.btn-visit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.5s ease;
    z-index: -1;
}

.btn-visit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(238, 66, 34, 0.45);
    background: linear-gradient(90deg, #d6381e, #e86a4b);
}

.btn-visit:hover::before {
    left: 100%;
}

.btn-visit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-visit:hover {
    background: #d43a1e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 66, 34, 0.4);
}

.btn-visit:hover::before {
    left: 100%;
}

/* 频道统计信息样式 - 美化版 */
.channel-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: transparent;
    padding: 0;
    margin: 0;
    width: 100%;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #EE4222;
    transition: color 0.3s ease;
    line-height: 1;
}

.stat-item:nth-child(1) .stat-number {
    color: #EE4222;
}

.stat-item:nth-child(2) .stat-number {
    color: #39a706;
}

.stat-item:nth-child(3) .stat-number {
    color: #7d03ba;
}

.stat-item:hover .stat-number {
    color: #44668c;
    transform: scale(1.1);
    display: inline-block;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* 视频部分标题 - 美化版 */
.section-title {
    font-size: 26px;
    color: #212529;
    margin: 40px 0 25px 0;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #EE4222, #FF7A50);
    border-radius: 2px;
}

.section-title:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: linear-gradient(90deg, #f8f9fa, #dee2e6);
}

/* 分页控件样式 - 与genre.js保持一致 */
.section-title {
    margin-bottom: 20px;
    color: #1F2030;
    font-size: 24px;
    font-weight: 700;
    width: 100%;
    box-sizing: border-box;
}

#video-container {
    position: relative;
    margin-bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    box-sizing: border-box;
}

/* 确保视频网格在容器内正确显示 */
#video-container > div:not(.pagination) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 10px 0;
}

/* 视频加载状态样式 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #666;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误提示样式 */
.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #d32f2f;
    text-align: center;
}

.error button {
    margin-top: 15px;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.error button:hover {
    background: #0056b3;
}

/* 无视频提示样式 */
.no-videos {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
    text-align: center;
    font-size: 16px;
}

.section-title::before {
    content: '▶';
    color: #EE4222;
    margin-right: 15px;
    font-size: 20px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.section-title:hover::before {
    transform: scale(1.2);
}

/* 视频播放器区域样式 */
.video-player-section {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: #f8f9fa;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    transition: all 0.3s ease;
}

.video-player-section:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.video-player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 恢复16:9宽高比，保证视频播放时的正确显示 */
    height: 0;
    background: #f8f9fa; /* 浅色背景 */
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    transition: opacity 0.3s ease;
}

/* 视频网格布局 - 全新设计 */
.video-list, .video-container, #video-container > div:not(.pagination) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 10px 0;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* 视频标题样式 */
.video-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

/* 视频元信息样式 */
.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.video-meta .views {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 响应式设计 - PC端 */
@media (min-width: 1200px) {
    .video-list, .video-container, #video-container > div:not(.pagination) {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .video-info {
        padding: 10px 12px;
        display: flex;
        flex-direction: column;
        height: auto;
    }
    
    .video-title, .video-info h3 {
        font-size: 16px;
        line-height: 1.3;
        -webkit-line-clamp: 2;
        margin-bottom: 4px;
        flex-shrink: 0;
        /* 确保标题容器不会占用过多空间 */
        max-height: 2.6em;
    }
    
    .video-description, .video-info p {
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 8px;
        /* 移除省略样式，显示全部描述 */
        display: block;
        -webkit-box-orient: vertical;
        overflow: visible;
        text-overflow: clip;
        /* 移除固定高度限制，让内容自然展开 */
        min-height: auto;
        flex-grow: 1;
    }
    
    /* 确保元信息自动推到底部 */
    .video-meta {
        margin-top: auto;
    }
}

/* 响应式设计 - 平板端 */
@media (min-width: 768px) and (max-width: 1199px) {
    .video-list, .video-container, #video-container > div:not(.pagination) {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* 调整视频缩略图容器，减少底部空白 */
    .video-thumbnail {
        height: 160px; /* 调整容器高度 */
        padding-top: 0; /* 移除padding-top */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 修复图片底部空白问题，让图片垂直居中 */
    .video-thumbnail img {
        object-position: center center; /* 确保图片垂直居中 */
        height: 100%; /* 确保图片填充整个容器高度 */
        object-fit: cover;
    }
    
    /* 优化标题显示，确保完整显示 */
    .video-title, .video-info h3 {
        font-size: 16px;
        line-height: 1.3;
        -webkit-line-clamp: 3; /* 增加显示行数 */
        margin-bottom: 6px;
        height: auto;
        max-height: 3.9em; /* 为3行文本提供足够空间 */
        word-break: break-word; /* 确保长单词也能正确换行 */
    }
    
    /* 调整视频信息区域的padding */
    .video-info {
        padding: 10px;
    }
}

/* 响应式设计 - 移动端 */
@media (max-width: 767px) {
    .video-list, .video-container, #video-container > div:not(.pagination) {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 10px 0;
    }
    
    .video-item, .video-card {
        border-radius: 8px;
    }
    
    .video-info {
        padding: 8px 10px;
    }
    
    .video-title, .video-info h3 {
        font-size: 15px;
        margin-bottom: 4px;
        -webkit-line-clamp: 2;
    }
    
    .video-description, .video-info p {
        font-size: 12px;
        margin-bottom: 4px;
        /* 移除省略样式，显示全部描述 */
        display: block;
        overflow: visible;
        text-overflow: clip;
        -webkit-line-clamp: none;
    }
    
    /* 移动端播放图标调整 */
    .video-thumbnail::after {
        width: 40px;
        height: 40px;
        font-size: 16px;
        padding-left: 4px;
    }
}
    height: 4px;
    background: linear-gradient(90deg, #EE4222, #39a706, #7d03ba);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

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

.video-card a {
    display: block;
    color: #1F2030;
    text-decoration: none;
    height: 100%;
}

/* 视频缩略图样式 */
.video-thumbnail {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s ease;
}

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

.video-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

/* 播放按钮覆盖层 */
.video-thumbnail::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(238, 66, 34, 0.8);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 2;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail::after {
    transform: translate(-50%, -50%) scale(1);
}

/* 视频信息样式 */
.video-card h3 {
    margin: 0;
    padding: 15px 15px 10px;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    color: #1F2030;
    transition: color 0.3s ease;
    height: 60px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-card:hover h3 {
    color: #EE4222;
}

.video-card span {
    display: block;
    padding: 0 15px 15px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* 加载和错误状态样式 */
.loading,
.error,
.no-videos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #666;
    font-size: 18px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.loading {
    color: #44668c;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #EE4222;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    color: #EE4222;
}

.error button {
    background: #44668c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.error button:hover {
    background: #39a706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(57, 167, 6, 0.3);
}

.no-videos {
    color: #7d03ba;
}

/* 响应式调整 */
@media (max-width: 767px) {
    main {
        padding: 5px;
    }
    
    .youtube-channel {
        padding: 20px;
    }
    
    /* 在移动端变为垂直堆叠布局 */
    .channel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    
    .channel-main-info {
        width: 100%;
    }
    
    .channel-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    /* 移动端头像尺寸调整 */
    .channel-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .channel-details h1 {
        font-size: 26px;
        margin-top: 10px;
    }
    
    .channel-details p {
        font-size: 15px;
        text-align: left;
    }
    
    /* 移动端侧边栏样式 */
    .channel-sidebar {
        min-width: auto;
        padding: 20px;
    }
    
    .channel-stats {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
    }
    
    .stat-item {
        flex: 1;
        padding: 12px 8px;
    }
    
    .stat-number {
        font-size: 22px;
    }
    
    .stat-label {
        font-size: 12px;
        margin-top: 5px;
    }
    
    .btn-visit {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    #video-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-thumbnail {
        height: 200px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    /* 平板端布局调整 */
    .channel-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .channel-details h1 {
        font-size: 28px;
    }
    
    .channel-sidebar {
        min-width: 200px;
        padding: 20px;
    }
    
    #video-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    #video-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    #video-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card {
    animation: fadeInUp 0.5s ease-out;
}

.video-card:nth-child(2) { animation-delay: 0.1s; }
.video-card:nth-child(3) { animation-delay: 0.2s; }
.video-card:nth-child(4) { animation-delay: 0.3s; }
.video-card:nth-child(5) { animation-delay: 0.4s; }
.video-card:nth-child(6) { animation-delay: 0.5s; }
.video-card:nth-child(7) { animation-delay: 0.6s; }
.video-card:nth-child(8) { animation-delay: 0.7s; }
.video-card:nth-child(9) { animation-delay: 0.8s; }

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 分页控件样式 - 响应式设计 */
#pagination-container {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    gap: 15px;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-btn {
    background: #44668c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    touch-action: manipulation;
}

.page-btn:hover:not(.disabled) {
    background: #EE4222;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(238, 66, 34, 0.3);
}

.page-btn:focus {
    outline: 3px solid #44668c;
    outline-offset: 2px;
}

.page-btn.disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-info {
    font-size: 16px;
    font-weight: 600;
    color: #1F2030;
    padding: 0 10px;
    min-width: 80px;
    text-align: center;
}

/* 错误和加载状态样式 */
.error-message {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    margin: 20px 0;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading::after {
    content: ' .';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: #666;
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow:
            .25em 0 0 #666,
            .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow:
            .25em 0 0 #666,
            .5em 0 0 #666;
    }
}

/* 移动端分页样式调整 */
@media (max-width: 767px) {
    #pagination-container {
        margin-top: 20px;
        padding: 15px 0;
    }
    
    .pagination {
        gap: 10px;
        padding: 8px 15px;
        flex-wrap: wrap;
    }
    
    .page-btn {
        padding: 10px 18px;
        font-size: 14px;
        min-width: 80px;
    }
    
    .page-info {
        font-size: 14px;
        min-width: 60px;
    }
}

/* 平板端分页样式调整 */
@media (min-width: 768px) and (max-width: 1023px) {
    .pagination {
        gap: 12px;
    }
    
    .page-btn {
        padding: 11px 20px;
        font-size: 15px;
    }
}

/* 移动端视频弹出层样式 */
.mobile-video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 50px;
    overflow-y: auto;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

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

.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

.modal-player-container {
    width: 100%;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    height: 0;
    background: #000;
}

.modal-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-video-info {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.modal-video-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1F2030;
    line-height: 1.3;
}

.modal-video-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* 确保在非移动设备上隐藏弹出层 */
@media (min-width: 769px) {
    .mobile-video-modal {
        display: none !important;
    }
}

/* 优化移动端视频播放器布局 */
@media (max-width: 768px) {
    /* 隐藏主播放器，使用弹出层替代 */
    .video-player-section {
        margin: 15px 0;
    }
    
    .video-player-container {
        padding-bottom: 60%; /* 移动端稍微增加高度 */
    }
    
    .placeholder-content i {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .placeholder-content p {
        font-size: 16px;
    }
    
    /* 调整视频卡片样式 */
    .video-card h3 {
        font-size: 16px;
        height: auto;
        -webkit-line-clamp: 2;
    }
    
    /* 确保视频列表在移动端正确显示 */
    .video-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}
