/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for Design System */
:root {
    --primary-color: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #dc2626;
    --accent-color: #fbbf24;
    --text-primary: #374151;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --background-light: #f0f9ff;
    --background-white: #ffffff;
    --background-gray: #f8fafc;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    scroll-behavior: smooth;
    background-color: var(--background-white);
}

.mark-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Video Center Main Content */
.mark-video-center {
    padding: 20px 0;
    background: var(--background-white);
}

/* Top Navigation */
.mark-video-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.mark-video-nav-tabs {
    display: flex;
    gap: 30px;
}

.mark-video-tab {
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.mark-video-tab.mark-active {
    color: var(--primary-color);
}

.mark-video-tab.mark-active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.mark-breadcrumb {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Main Video Section */
.mark-main-video-section {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: stretch;
    max-height: 480px; /* 进一步减少高度 */
}

/* 主视频播放器增强样式 */
.mark-main-video-player .mark-video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.mark-main-video-player .mark-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.mark-main-video-player .mark-play-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
    transform-origin: center center;
}

.mark-main-video-player .mark-play-button svg {
    color: white;
    margin-left: 4px;
}

.mark-main-video-player .mark-video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 20px 20px;
    color: white;
}

.mark-main-video-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.mark-main-video-desc {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Main Video Player */
.mark-main-video-player {
    background: var(--background-white);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    height: 100%;
    min-height: 480px; /* 进一步减少高度 */
    max-height: 480px; /* 限制最大高度 */
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mark-video-thumbnail {
    width: 100%;
    height: 100%;
    background: var(--background-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.mark-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.mark-play-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.1);
    transform-origin: center center;
}

.mark-play-button svg {
    color: var(--primary-color);
    margin-left: 4px;
}

.mark-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mark-video-time {
    font-size: 14px;
    font-weight: 500;
}

.mark-video-progress {
    flex: 1;
    margin: 0 20px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.mark-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.mark-video-actions {
    display: flex;
    gap: 10px;
}

.mark-control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.mark-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Sidebar Videos */
.mark-sidebar-videos {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 480px; /* 进一步减少高度 */
    max-height: 480px; /* 限制最大高度 */
    position: relative;
}

.mark-sidebar-videos::before {
    content: "推荐视频";
    position: absolute;
    top: -10px;
    left: 15px;
    background: #f8fafc;
    padding: 0 10px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    z-index: 1;
}

.mark-sidebar-video-item {
    background: var(--background-white);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    min-height: 160px; /* 确保有足够高度显示图片 */
    max-height: 180px; /* 适当增加最大高度 */
}

.mark-sidebar-video-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mark-sidebar-thumbnail {
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-height: 120px;
}

.mark-sidebar-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #000;
    display: block;
    min-width: 100%;
    min-height: 100%;
}

.mark-sidebar-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px; /* 进一步减小播放按钮 */
    height: 24px; /* 进一步减小播放按钮 */
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.mark-sidebar-play-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
    transform-origin: center center;
}

.mark-sidebar-play-btn svg {
    color: white;
    margin-left: 2px;
}

.mark-sidebar-info {
    padding: 4px 8px; /* 进一步减少内边距 */
    max-height: 30px; /* 进一步限制信息区域高度 */
    overflow: hidden;
}

.mark-sidebar-title {
    font-size: 11px; /* 进一步减小字体大小 */
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2; /* 进一步减小行高 */
    display: -webkit-box;
    -webkit-line-clamp: 1; /* 只显示一行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.mark-sidebar-time {
    position: absolute;
    bottom: 2px; /* 进一步调整位置 */
    left: 2px; /* 进一步调整位置 */
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1px 3px; /* 进一步减少内边距 */
    border-radius: 2px; /* 进一步减小圆角 */
    font-size: 9px; /* 进一步减小字体 */
    font-weight: 500;
}

/* Content Sections */
.mark-content-section {
    display: none;
}

.mark-content-section.mark-active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Video Categories */
.mark-video-categories {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.mark-category-tab {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.mark-category-tab.mark-active {
    color: var(--primary-color);
}

.mark-category-tab.mark-active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Video Grid */
.mark-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.mark-video-grid:not(.mark-active) {
    display: none;
}

.mark-video-card {
    background: var(--background-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
}

.mark-video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.mark-video-card-thumbnail {
    position: relative;
    width: 100%;
    height: 160px; /* 减少缩略图高度 */
    background: var(--background-gray);
    overflow: hidden;
}

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

.mark-card-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.mark-card-play-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
    transform-origin: center center;
}

.mark-card-play-btn svg {
    color: white;
    margin-left: 3px;
}

.mark-video-badge,
.mark-video-featured,
.mark-graphic-badge,
.mark-graphic-featured {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
}

.mark-video-featured,
.mark-graphic-featured {
    background: #f59e0b;
    top: 40px;
}

.mark-video-card-content {
    padding: 15px; /* 减少内边距 */
}

.mark-video-title,
.mark-graphic-title {
    font-size: 16px; /* 减小字体大小 */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px; /* 减少下边距 */
    line-height: 1.3; /* 减小行高 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mark-video-description,
.mark-graphic-description {
    color: var(--text-secondary);
    font-size: 13px; /* 减小字体大小 */
    line-height: 1.4; /* 减小行高 */
    margin-bottom: 12px; /* 减少下边距 */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 减少显示行数 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mark-video-meta,
.mark-graphic-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px; /* 减少上边距 */
    font-size: 11px; /* 减小字体大小 */
    color: var(--text-secondary);
}

.mark-video-stats,
.mark-graphic-stats {
    display: flex;
    gap: 10px;
}

.mark-video-tags,
.mark-graphic-tags {
    margin-top: 8px; /* 减少上边距 */
    display: flex;
    flex-wrap: wrap;
    gap: 4px; /* 减少标签间距 */
}

.mark-tag {
    background: #f3f4f6;
    color: var(--text-secondary);
    padding: 2px 6px; /* 减少内边距 */
    border-radius: 8px; /* 减小圆角 */
    font-size: 10px; /* 减小字体大小 */
}

/* Graphic Grid */
.mark-graphic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.mark-graphic-grid:not(.mark-active) {
    display: none;
}

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

.mark-graphic-card {
    background: var(--background-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.mark-graphic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.mark-graphic-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    background: var(--background-gray);
    overflow: hidden;
}

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

.mark-graphic-content {
    padding: 20px;
}

.mark-graphic-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.mark-graphic-title a:hover {
    color: var(--primary-color);
}

/* Pagination */
.mark-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.mark-page-btn {
    padding: 8px 16px;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.mark-page-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.mark-page-btn.mark-active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.mark-page-info {
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.mark-no-data {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Video Modal */
.mark-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mark-video-modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.mark-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.mark-modal-content {
    position: relative;
    background: var(--background-white);
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    z-index: 10001;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.mark-video-modal.show .mark-modal-content {
    transform: scale(1);
}

.mark-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}

.mark-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.mark-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.mark-modal-close:hover {
    background: var(--background-gray);
    color: var(--text-primary);
}

.mark-modal-video-container {
    padding: 20px 30px;
    background: #000;
}

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

.mark-modal-footer {
    padding: 20px 30px;
    background: var(--background-white);
    border-top: 1px solid var(--border-color);
}

.mark-modal-footer p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 14px;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .mark-video-modal {
        padding: 10px;
    }
    
    .mark-modal-content {
        max-height: 95vh;
    }
    
    .mark-modal-header {
        padding: 15px 20px;
    }
    
    .mark-modal-header h3 {
        font-size: 18px;
    }
    
    .mark-modal-footer {
        padding: 15px 20px;
    }
    
    .mark-modal-video-container video {
        max-height: 50vh;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .mark-main-video-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mark-sidebar-videos {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        height: auto;
        min-height: auto;
    }
    
    .mark-sidebar-video-item {
        min-height: 140px;
    }
    
    .mark-video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .mark-graphic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* H5端响应式设计 - 主视频在上，三个视频并排在下面 */
@media (max-width: 768px) {
    .mark-video-nav {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .mark-video-nav-tabs {
        gap: 20px;
    }
    
    .mark-video-categories {
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .mark-main-video-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mark-main-video-player {
        order: 1;
        min-height: 250px;
    }
    
    .mark-sidebar-videos {
        order: 2;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        height: auto;
        min-height: auto;
    }
    
    .mark-sidebar-video-item {
        min-height: 120px;
    }
    
    .mark-sidebar-thumbnail {
        min-height: 100px;
    }
    
    .mark-sidebar-play-btn {
        width: 35px;
        height: 35px;
    }
    
    .mark-sidebar-play-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .mark-video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mark-graphic-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mark-video-card-content {
        padding: 15px;
    }
    
    .mark-video-title,
    .mark-graphic-title {
        font-size: 16px;
    }
    
    .mark-video-description,
    .mark-graphic-description {
        font-size: 13px;
    }
    
    /* 分页组件移动端样式 */
    .mark-pagination {
        flex-wrap: wrap;
        gap: 8px;
        padding: 0 10px;
        margin-top: 30px;
    }
    
    .mark-page-btn {
        padding: 6px 12px;
        font-size: 12px;
        min-width: auto;
        flex: 0 0 auto;
    }
    
    .mark-page-info {
        padding: 6px 12px;
        font-size: 12px;
        order: 1;
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    .mark-container {
        padding: 0 15px;
    }
    
    .mark-main-video-section {
        gap: 15px;
    }
    
    .mark-main-video-player {
        min-height: 200px;
    }
    
    .mark-sidebar-videos {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .mark-sidebar-video-item {
        min-height: 100px;
    }
    
    .mark-sidebar-thumbnail {
        min-height: 80px;
    }
    
    .mark-sidebar-play-btn {
        width: 30px;
        height: 30px;
    }
    
    .mark-sidebar-play-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .mark-main-video-title {
        font-size: 18px;
    }
    
    .mark-main-video-desc {
        font-size: 12px;
    }
    
    /* 分页组件小屏幕样式 */
    .mark-pagination {
        gap: 6px;
        padding: 0 5px;
        margin-top: 20px;
    }
    
    .mark-page-btn {
        padding: 5px 10px;
        font-size: 11px;
        min-width: 35px;
    }
    
    .mark-page-info {
        font-size: 11px;
        padding: 5px 10px;
        margin: 8px 0;
    }
}