/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html,body{
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 容器样式 */
.container {
    width: 1300px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 大屏幕容器优化 */
@media (min-width: 1400px) {
    .container {
        width: 85%;
        max-width: 1600px;
    }
}

@media (min-width: 1920px) {
    .container {
        width: 80%;
        max-width: 1800px;
    }
}

@media (min-width: 2560px) {
    .container {
        width: 75%;
        max-width: 2200px;
    }
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
    height: 100px;
}

.header h1 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 300;
    margin: 0;
}

.header p {
    text-align: center;
    opacity: 0.9;
    font-size: 1.1rem;
}
.header .logo {
    /* width: 80%; */
    
    height: calc(100% - 20px);
    margin: 4px auto 0;
    display: block;
}
/* 主要内容区域 */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: 
        "video"
        "list";
    gap: 2rem;
    margin-top: 2rem;
    flex: 1;
    overflow: hidden;
}

/* 设置网格区域 */
.list-section {
    grid-area: list;
}

.video-section {
    grid-area: video;
}

/* 桌面端布局：左边列表，右边播放区 */
@media (min-width: 769px) {
    .main-content {
        grid-template-columns: 1fr 2.5fr;
        grid-template-areas: "list video";
        height: calc(100vh - 140px);
        margin-top: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    /* 桌面端左右高度一致 */
    .list-section, .video-section {
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    /* 列表区域内容自适应 */
    .list-section .accordion {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        max-height: calc(100vh - 200px);
    }
    
    /* 视频区域内容自适应 */
    .video-section {
        justify-content: flex-start;
    }
    
    /* 确保视频信息区域不超出容器 */
    .video-info {
        flex: 1;
        overflow-y: auto;
        max-height: 250px;
        /* min-height: 150px; */
    }
    
    /* 桌面端手风琴内容高度调整 */
    .accordion-content.active {
        max-height: calc(100vh - 400px);
        overflow-y: auto;
    }
}

/* 大屏幕优化 */
@media (min-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr 2.5fr;
        gap: 2rem;
        height: calc(100vh - 140px);
    }
    
    /* 大屏幕手风琴内容高度调整 */
    .accordion-content.active {
        max-height: calc(100vh - 380px);
        overflow-y: auto;
    }
    
    /* 大屏幕视频信息区域调整 */
    .video-info {
        max-height: 220px;
        /* min-height: 140px; */
    }
    
    /* 大屏幕视频容器调整 */
    .video-container {
        /* padding-bottom: 35%; */
    }
    
    /* 大屏幕列表区域调整 */
    .list-section .accordion {
        max-height: calc(100vh - 180px);
    }
}

/* 超大屏幕优化 */
@media (min-width: 1600px) {
    .main-content {
        grid-template-columns: 1fr 3fr;
        gap: 3rem;
    }
    
    /* 超大屏幕视频容器调整 */
    .video-container {
        /* padding-bottom: 30%; */
    }
    
    /* 超大屏幕视频信息区域调整 */
    .video-info {
        max-height: 280px;
        /* min-height: 160px; */
    }
}

/* 4K屏幕优化 */
@media (min-width: 2560px) {
    .main-content {
        grid-template-columns: 1fr 3.5fr;
        gap: 4rem;
    }
    
    /* 4K屏幕视频容器调整 */
    .video-container {
        /* padding-bottom: 25%; */
    }
    
    /* 4K屏幕视频信息区域调整 */
    .video-info {
        max-height: 350px;
        /* min-height: 200px; */
    }
    
    /* 4K屏幕字体调整 */
    .video-info h2 {
        font-size: 1.8rem;
    }
    
    .video-info p {
        font-size: 1.1rem;
    }
    
    .accordion-header {
        font-size: 1.2rem;
        padding: 1.5rem;
    }
    
    .video-item {
        padding: 1rem 1.5rem;
    }
    
    .video-title {
        font-size: 1.1rem;
    }
}

/* 视频播放器容器 */
.video-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.video-section:hover {
    transform: translateY(-2px);
}

/* PC端视频区域优化 */
@media (min-width: 769px) {
    .video-section:hover {
        transform: none;
    }
    
    /* 确保PC端body不出现滚动条 */
    body {
        overflow: hidden;
        height: 100vh;
    }
    
    /* 确保视频容器合适的高度 */
    .video-container {
        /* height: 0;
        padding-bottom: 40%; */
    }
}

.video-container {
    position: relative;
    width: 100%;
     /* 减去视频信息区域的高度 */
    /* height: calc(100% - 150px); */
    height: 100%;
    /* padding-bottom:56.25%; */
    background: #000;
}

.video-container video,.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-info {
    display: none;
    padding: 1.5rem;
}

.video-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.video-info p {
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.duration {
    background: #3498db;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 列表区域 */
.list-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.list-section h2 {
    padding: 1.2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 400;
    flex-shrink: 0;
}

/* 手风琴样式 */
.accordion {
    border: none;
    flex: 1;
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid #ecf0f1;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    background: #f8f9fa;
    border: none;
    padding: 1.2rem;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-header.active {
    background: #667eea;
    color: white;
}

.accordion-header.category-active {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E8E 100%);
    color: white;
    border-left: 4px solid #FF4757;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.accordion-header.active.category-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-left: 4px solid #5A67D8;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.accordion-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 600px;
    overflow-y: auto;
}

/* 手风琴内容滚动条样式 */
.accordion-content::-webkit-scrollbar {
    width: 6px;
}

.accordion-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.accordion-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.accordion-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 滚动提示 */
.accordion-content.active {
    position: relative;
}

.accordion-content.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.3));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.accordion-content.active.scrollable::after {
    opacity: 1;
}

.video-list {
    padding: 0;
    list-style: none;
}

.video-item {
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #f1f2f6;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.video-item:hover {
    background: #f8f9fa;
    padding-left: 1.6rem;
}

.video-item:last-child {
    border-bottom: none;
}

.video-item.video-active {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-left: 4px solid #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.video-item.video-active:hover {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    padding-left: 1.6rem;
}

.video-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-title {
    font-size: 1rem;
    font-weight: 500;
    color: #2c3e50;
    flex: 1;
}

.video-duration {
    font-size: 0.8rem;
    color: #3498db;
    font-weight: 500;
    background: #e3f2fd;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: 1rem;
}

/* 详情页样式 */
.detail-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.back-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.detail-video-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.detail-video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    background: #000;
}

.detail-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-video-info {
    padding: 2rem;
}

.detail-video-info h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.3;
}

.detail-video-info p {
    color: #7f8c8d;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.detail-video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #ecf0f1;
}

.detail-duration {
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 0;
        width: calc(100% - 30px);
    }
    .header{
        height: auto;
    }
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    .header .logo {
        width: 90%;
    }
    
    /* 移动端布局：上面播放区，下面列表 */
    .main-content {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "video"
            "list";
        gap: 1.5rem;
        margin-top: 1.5rem;
        height: auto;
        overflow: visible;
    }
    
    .video-container {
        position: relative;
        width: 100%;
        height: 0; /* 减去视频信息区域的高度 */
        padding-bottom:56.25%;
        background: #000;
    }
    .video-container video, .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .video-info {
        display: block;
        padding: 1rem;
    }
    
    .video-info h2 {
        font-size: 1.2rem;
    }
    
    .accordion-header {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    /* 移动端重置高度限制 */
    body {
        overflow: auto !important;
        height: auto !important;
    }
    
    main {
        overflow: visible;
    }
    
    .list-section, .video-section {
        height: auto;
        display: block;
    }
    
    .list-section {
        display: block;
    }
    
    .list-section .accordion {
        flex: none;
        overflow: visible;
        max-height: none;
    }
    
    /* 移动端手风琴内容高度调整 */
    .accordion-content.active {
        max-height: 400px;
        overflow-y: auto;
    }
    
    .video-item {
        padding: 0.75rem 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .video-item:hover {
        padding-left: 1rem;
    }
    
    .video-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .video-duration {
        margin-left: 0;
    }
    
    .detail-container {
        padding: 1rem 15px;
    }
    
    .detail-video-info {
        padding: 1.5rem;
    }
    
    .detail-video-info h1 {
        font-size: 1.5rem;
    }
    
    .detail-video-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .accordion-header {
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    .video-item {
        padding: 0.5rem 0.75rem;
    }
    
    .video-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .video-duration {
        margin-left: 0;
        font-size: 0.7rem;
    }
    
    .detail-video-info {
        padding: 1rem;
    }
    
    .detail-video-info h1 {
        font-size: 1.3rem;
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Footer 样式 */
.footer {
    background: #000;
    color: white;
    padding: 10px 0;
    margin-top: 0;
    text-align: center;
    flex-shrink: 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.footer-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    position: relative;
    transition: color 0.3s ease;
    color: #667eea;
}

.footer-link:hover {
    color: #E0E8F5;
}

.footer-link:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -20px;
    color: white;
    font-weight: normal;
}

.footer-licenses {
    font-size: 14px;
    color: #E0E8F5;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.footer-copyright {
    font-size: 12px;
    color: #E0E8F5;
    margin: 0;
    font-weight: 300;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-link:not(:last-child)::after {
        display: none;
    }
    
    .footer-licenses {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .footer-copyright {
        font-size: 12px;
    }
}

/* AI助手按钮样式 */
.ai-assistant-button {
    position: fixed;
    bottom: 82px;
    right: 10px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 1000;
    flex-direction: column;
    font-size: 10px;
    font-weight: 500;
    overflow: hidden;
}

.ai-assistant-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.ai-assistant-button svg {
    margin-bottom: 2px;
}

.ai-assistant-button span {
    font-size: 9px;
    text-align: center;
    line-height: 1;
}

/* AI助手弹窗样式 */
.ai-assistant-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ai-assistant-panel.active {
    right: 0;
}

.ai-assistant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding:10px 20px;
    border-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #667eea;
    border-bottom: 1px solid #e0e0e0;
}

.ai-assistant-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.close-button {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.ai-assistant-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.ai-assistant-content iframe {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ai-assistant-button {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 9px;
    }
    
    .ai-assistant-button svg {
        width: 18px;
        height: 18px;
    }
    
    .ai-assistant-button span {
        font-size: 8px;
    }
    
    .ai-assistant-panel {
        width: 100%;
        right: -100%;
    }
}

/* 动画效果 */
@keyframes slideIn {
    from {
        right: -450px;
    }
    to {
        right: 0;
    }
}

@keyframes slideOut {
    from {
        right: 0;
    }
    to {
        right: -450px;
    }
}

/* 返回主页 */
.back-home-btn{
    position: fixed;
    top: 0;
    left: calc(100% - 70px);
    bottom: 0;
    right: 0;
    margin:auto 0;

    width: 60px;
    height: 60px;
    font-size: 9px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.back-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}