﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    margin-right: 30px;
}

.logo i {
    margin-right: 8px;
    color: #ffd700;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

/* 语言切换 */
.language-switcher {
    display: flex;
    align-items: center;
    margin-right: 20px;
    gap: 10px;
}

.language-btn {
    background: linear-gradient(to bottom, #5a7fbb, #3a5f9e);
    border: none;
    color: white;
    padding: 6px 0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 0 #2c3e50, 0 3px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    top: 0;
    width: 60px;
    height: 32px;
    flex-direction: column;
}

.language-btn:hover {
    background: linear-gradient(to bottom, #6a8fcb, #4a6fae);
}

.language-btn:active {
    box-shadow: 0 1px 0 #2c3e50, 0 2px 3px rgba(0, 0, 0, 0.2);
    top: 2px;
}

.language-btn.active {
    background: linear-gradient(to bottom, #ffd700, #e5bf00);
    color: #2c3e50;
    box-shadow: 0 2px 0 #ccaa00, 0 3px 5px rgba(0, 0, 0, 0.2);
}

.language-btn.active:active {
    box-shadow: 0 1px 0 #ccaa00, 0 2px 3px rgba(0, 0, 0, 0.2);
}

.language-btn i {
    font-size: 0.7rem;
    margin-bottom: 2px;
}

.language-btn span {
    line-height: 1;
    font-size: 0.7rem;
    display: block;
}

/* 导航样式 */
nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 8px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffd700;
}

nav ul li a.active {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

nav ul li a i {
    margin-right: 4px;
    font-size: 0.8rem;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
}

/* 页面主标题区 */
.page-hero {
    padding: 40px 0 30px;
    text-align: center;
    background: linear-gradient(rgba(255,255,255,0.9), rgba(255,255,255,0.9)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="%234a6491" opacity="0.1" width="50" height="50"/><rect fill="%234a6491" opacity="0.1" x="50" y="50" width="50" height="50"/></svg>');
    background-size: 300px;
    width: 100%;
}

.page-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.page-hero p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* 主视频播放器 */
.main-video {
    padding: 30px 0;
}

.video-player-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.video-player {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
}

.video-player video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 70vh;
    object-fit: contain;
}

.video-info {
    padding: 25px;
}

.video-info h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.video-info p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.video-stats {
    display: flex;
    gap: 20px;
    color: #888;
    font-size: 0.9rem;
}

.video-stats span {
    display: flex;
    align-items: center;
}

.video-stats i {
    margin-right: 5px;
}

/* 视频章节 */
.video-chapters {
    padding: 40px 0;
}

.video-chapters h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.4rem;
    border-left: 4px solid #4a6491;
    padding-left: 15px;
}

.chapters-list {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.chapter-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.chapter-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.chapter-item.active {
    background-color: #eef5ff;
    border-left: 4px solid #4a6491;
}

.chapter-item:last-child {
    border-bottom: none;
}

.chapter-icon {
    margin-right: 15px;
    color: #4a6491;
    font-size: 1.5rem;
    transition: all 0.3s;
}

.chapter-item:hover .chapter-icon {
    color: #2c3e50;
    transform: scale(1.1);
}

.chapter-content {
    flex: 1;
}

.chapter-content h4 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.chapter-content p {
    color: #666;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.chapter-time {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 相关视频 */
.related-videos {
    padding: 40px 0 60px;
}

.related-videos h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.4rem;
    border-left: 4px solid #4a6491;
    padding-left: 15px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.related-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.related-thumbnail {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: #000;
}

.related-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.related-card:hover .related-thumbnail video {
    transform: scale(1.05);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.related-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 2.5rem;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.related-card:hover .play-overlay i {
    transform: scale(1.1);
}

.related-info {
    padding: 20px;
}

.related-info h4 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1rem;
    line-height: 1.4;
}

.related-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.video-duration {
    background: #4a6491;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* 页脚样式 */
footer {
    background: #2c3e50;
    color: white;
    padding: 15px 0 10px;
    text-align: center;
    margin-top: auto;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-section {
    text-align: center;
    margin-bottom: 5px;
    width: 100%;
}

.footer-section h3 {
    margin-bottom: 8px;
    color: #ffd700;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-section ul li {
    margin-bottom: 5px;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.footer-section a:hover {
    color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
}

.footer-section a i {
    margin-right: 6px;
}

.copyright {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* 提示框样式 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    max-width: 80%;
    text-align: center;
}

.toast.show {
    opacity: 1;
}

/* 视频模态框样式 */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 2% auto;
    padding: 20px;
    width: 95%;
    max-width: 1000px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 1001;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.close-modal:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.modal-video-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

#modalVideo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.video-modal-info {
    padding: 15px 10px 0;
    flex-shrink: 0;
}

.video-modal-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.video-modal-info p {
    color: #666;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    nav ul li {
        margin-left: 6px;
    }
    
    nav ul li a {
        font-size: 0.8rem;
        padding: 5px 8px;
    }
}

@media (max-width: 992px) {
    nav ul li {
        margin-left: 5px;
    }
    
    nav ul li a {
        font-size: 0.75rem;
        padding: 4px 6px;
    }
    
    .language-btn {
        width: 55px;
        height: 30px;
        font-size: 0.65rem;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 900px) {
    nav ul li a span.nav-text {
        display: none;
    }
    
    nav ul li a i {
        margin-right: 0;
    }
    
    nav ul li {
        margin-left: 4px;
    }
    
    nav ul li a {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .page-hero h1 {
        font-size: 1.8rem;
    }
    
    .page-hero p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #2c3e50;
        display: none;
        padding: 15px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 8px 0;
    }
    
    nav ul li a {
        justify-content: center;
        padding: 8px;
        font-size: 0.9rem;
    }
    
    nav ul li a span.nav-text {
        display: inline;
    }
    
    nav ul li a i {
        margin-right: 8px;
    }
    
    .page-hero {
        padding: 30px 0 20px;
    }
    
    .main-video {
        padding: 20px 0;
    }
    
    .video-info {
        padding: 20px;
    }
    
    .video-info h2 {
        font-size: 1.3rem;
    }
    
    .video-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .video-chapters {
        padding: 30px 0;
    }
    
    .related-videos {
        padding: 30px 0 50px;
    }
    
    .language-btn {
        font-size: 0.6rem;
        width: 50px;
        height: 28px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .header-left {
        order: 1;
        width: 100%;
        justify-content: space-between;
        margin-bottom: 10px;
    }
    
    nav {
        order: 3;
        width: 100%;
    }
    
    .menu-toggle {
        order: 2;
    }
    
    .footer-section ul {
        flex-direction: row;
        gap: 15px;
    }
    
    .footer-section a {
        font-size: 0.85rem;
    }
    
    /* 移动端模态框调整 */
    .modal-content {
        margin: 1% auto;
        width: 98%;
        padding: 15px;
        max-height: 98vh;
    }
    
    .video-modal-info h3 {
        font-size: 1.1rem;
    }
    
    .modal-video-container {
        min-height: 50vh;
    }
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: row;
        align-items: center;
    }
    
    .header-left {
        order: 1;
        width: auto;
        justify-content: flex-start;
        margin-bottom: 0;
        flex-wrap: nowrap;
    }
    
    .logo {
        margin-right: 15px;
        margin-bottom: 0;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
    }
    
    .language-switcher {
        order: 2;
        flex-direction: row;
        justify-content: flex-start;
        margin-right: 0;
        margin-bottom: 0;
        width: auto;
        gap: 8px;
        margin-left: 10px;
    }
    
    .menu-toggle {
        order: 3;
        align-self: center;
        margin-top: 0;
        margin-left: 15px;
        display: flex;
        align-items: center;
        padding: 6px 10px;
    }
    
    .page-hero h1 {
        font-size: 1.6rem;
    }
    
    .page-hero p {
        font-size: 0.9rem;
    }
    
    .chapter-item {
        padding: 15px;
    }
    
    .chapter-icon {
        font-size: 1.3rem;
        margin-right: 12px;
    }
    
    .chapter-content h4 {
        font-size: 1rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .language-btn {
        width: 45px;
        height: 26px;
        font-size: 0.55rem;
    }
    
    .footer-section ul {
        flex-direction: row;
        gap: 15px;
    }
    
    .video-player video {
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .page-hero h1 {
        font-size: 1.4rem;
    }
    
    .page-hero p {
        font-size: 0.85rem;
    }
    
    .page-hero {
        padding: 25px 0 15px;
    }
    
    .main-video {
        padding: 15px 0;
    }
    
    .video-info {
        padding: 15px;
    }
    
    .video-info h2 {
        font-size: 1.2rem;
    }
    
    .video-chapters {
        padding: 20px 0;
    }
    
    .related-videos {
        padding: 20px 0 40px;
    }
    
    .language-btn {
        width: 40px;
        height: 24px;
        font-size: 0.5rem;
        padding: 2px 0;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .footer-section ul {
        flex-direction: row;
        gap: 10px;
    }
    
    .footer-section ul li {
        margin-bottom: 3px;
    }
    
    .footer-section a {
        font-size: 0.8rem;
    }
    
    .footer-section h3 {
        margin-bottom: 8px;
        font-size: 1.1rem;
    }
    
    .copyright {
        margin-top: 10px;
        padding-top: 10px;
        font-size: 0.8rem;
    }
    
    .play-overlay i {
        font-size: 2rem;
        width: 50px;
        height: 50px;
    }
    
    .related-thumbnail {
        height: 140px;
    }
    
    .modal-content {
        padding: 10px;
        margin: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .close-modal {
        right: 10px;
        top: 10px;
        background: rgba(0, 0, 0, 0.5);
        color: white;
    }
}

@media (max-width: 360px) {
    .header-left {
        flex-wrap: nowrap;
    }
    
    .logo {
        margin-bottom: 0;
        font-size: 1rem;
    }
    
    .language-switcher {
        width: auto;
        justify-content: flex-start;
        gap: 6px;
        margin-left: 8px;
    }
    
    .menu-toggle {
        margin-left: 12px;
    }
    
    .chapter-item {
        padding: 12px;
    }
    
    .chapter-icon {
        font-size: 1.2rem;
        margin-right: 10px;
    }
    
    .language-btn {
        width: 38px;
        height: 22px;
        font-size: 0.45rem;
    }
    
    .menu-toggle {
        padding: 5px 8px;
        font-size: 1.3rem;
    }
    
    .footer-section ul {
        flex-direction: row;
        gap: 8px;
    }
    
    .related-thumbnail {
        height: 120px;
    }
}

/* 修复右侧白色块问题 */
html, body {
    overflow-x: hidden;
    width: 100%;
}

main {
    width: 100%;
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 滚动条样式优化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 视频加载状态 */
.video-loading {
    position: relative;
}

.video-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4a6491;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 无障碍访问优化 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 焦点样式 */
button:focus,
a:focus,
.language-btn:focus {
    outline: 2px solid #4a6491;
    outline-offset: 2px;
}

/* 横屏模式优化 */
@media (orientation: landscape) and (max-height: 500px) {
    .modal-content {
        margin: 1% auto;
        max-height: 98vh;
    }
    
    .modal-video-container {
        min-height: 70vh;
    }
    
    .video-modal-info {
        padding: 10px 10px 0;
    }
    
    .video-modal-info h3 {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }
    
    .video-modal-info p {
        font-size: 0.9rem;
    }
}

/* 打印样式 */
@media print {
    .menu-toggle,
    .language-switcher,
    .play-overlay,
    .toast,
    .video-modal,
    video {
        display: none !important;
    }
    
    .related-card {
        break-inside: avoid;
    }
}