/* 视频页面样式 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #ffffff;
    color: #2d333a;
    overflow-x: auto;
    min-width: 1500px;
}

/* 主要内容区域 - 带背景图 */
.hero-section {
    width: 100%;
    min-height: 100vh;
    background-color: #ffffff;
    background-image: url('../images/back.jpg');
    background-size: 100% 900px;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding-top: 108px;
    padding-left: 40px;
    padding-right: 40px;
    padding-bottom: 40px;
}

/* 背景遮罩 */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 900px;
    background: rgba(0, 0, 0, 0.1);
}

/* 白色容器 - 视频页面专用 */
.video-page-container.white-container {
    position: relative;
    z-index: 10;
    background: #ffffff;
    border-radius: 20px;
    padding: 0;
    width: 1420px;
    max-width: calc(100% - 80px);
    min-height: 800px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 视频容器 - 左右分栏布局 */
.video-container {
    display: flex;
    flex: 1;
    width: 100%;
    margin: 0;
    background: #f7f7f8;
}

/* 左侧边栏 - 分类导航 */
.video-sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2d333a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header h3 i {
    color: #10a37f;
}

.category-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.category-item {
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #2d333a;
}

.category-item:hover {
    background: #f7f7f8;
}

.category-item.active {
    background: #10a37f;
    color: white;
    font-weight: 500;
}

.category-item .category-count {
    font-size: 12px;
    color: #6e6e80;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
}

.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 右侧主内容区 */
.video-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f7f7f8;
    padding: 24px;
    min-height: calc(100vh - 130px);
}

/* 顶部搜索栏 */
.video-search-bar {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-wrapper {
    display: flex;
    gap: 12px;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #10a37f;
    box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.1);
}

.search-btn {
    padding: 12px 24px;
    background: #10a37f;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #0d8c6d;
}

/* 中间视频展示区 */
.video-content-area {
    flex: 1;
    background: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 400px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* 视频卡片 - 高端设计 */
.video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
    border-color: rgba(16, 163, 127, 0.15);
}

/* 标题区域 */
.video-card-title-overlay {
    padding: 16px 16px 12px 16px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
    min-height: 60px;
    background: white;
}

/* 缩略图区域 */
.video-card-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例 */
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    overflow: hidden;
}

.video-card-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.video-card-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #2d333a;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.video-card-body {
    padding: 18px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(249, 250, 251, 0.5) 100%);
}

.video-card-description {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
    letter-spacing: 0.1px;
}

.video-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.video-card-category {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(16, 163, 127, 0.08);
    border-radius: 6px;
    color: #10a37f;
    transition: all 0.3s;
}

.video-card:hover .video-card-category {
    background: rgba(16, 163, 127, 0.12);
}

.video-card-views {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(100, 116, 139, 0.08);
    border-radius: 6px;
    transition: all 0.3s;
}

.video-card:hover .video-card-views {
    background: rgba(100, 116, 139, 0.12);
}

.video-card-pinned {
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* 底部分页器 */
.video-pagination {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 16px;
    background: white;
    color: #2d333a;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #f7f7f8;
    border-color: #10a37f;
    color: #10a37f;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #10a37f;
    color: white;
    border-color: #10a37f;
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6e6e80;
}

.pagination-jump input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

.pagination-jump button {
    padding: 6px 12px;
    background: #10a37f;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.pagination-jump button:hover {
    background: #0d8c6d;
}

.pagination-info {
    font-size: 14px;
    color: #6e6e80;
}

/* 视频播放模态框 */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.video-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.video-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 2;
    transition: all 0.2s;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.video-modal-header {
    padding: 24px 24px 16px;
}

.video-modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2d333a;
    margin-bottom: 12px;
}

.video-modal-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #6e6e80;
}

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

.video-modal-meta i {
    color: #10a37f;
}

.video-modal-player {
    background: #000;
    position: relative;
}

.video-modal-player video {
    width: 100%;
    height: auto;
    max-height: 60vh;
    display: block;
}

.video-modal-description {
    padding: 24px;
}

.video-modal-description h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2d333a;
    margin-bottom: 12px;
}

.video-modal-description p {
    font-size: 14px;
    color: #6e6e80;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* 加载状态 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #10a37f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading-state p {
    font-size: 14px;
    color: #6e6e80;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.empty-state-icon {
    font-size: 64px;
    color: #e5e7eb;
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 600;
    color: #2d333a;
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: #6e6e80;
}

/* 滚动条样式 */
.category-list::-webkit-scrollbar,
.video-modal-content::-webkit-scrollbar {
    width: 6px;
}

.category-list::-webkit-scrollbar-track,
.video-modal-content::-webkit-scrollbar-track {
    background: #f7f7f8;
}

.category-list::-webkit-scrollbar-thumb,
.video-modal-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.category-list::-webkit-scrollbar-thumb:hover,
.video-modal-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 响应式设计 */
@media (max-width: 1500px) {
    body {
        min-width: auto;
    }
    
    .hero-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .video-page-container.white-container {
        width: 100%;
        max-width: calc(100% - 40px);
    }
}

@media (max-width: 1024px) {
    .video-container {
        flex-direction: column;
    }
    
    .video-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        max-height: 300px;
    }
    
    .video-main {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 80px;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .video-page-container.white-container {
        max-width: calc(100% - 20px);
        padding: 0;
        border-radius: 12px;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }
    
    .video-search-bar {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-modal-content {
        width: 95%;
        max-height: 90vh;
        padding: 16px;
    }
}