/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 使用现代化字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #e0f7ff 0%, #f0f9ff 50%, #ffffff 100%);
    min-height: 100vh;
    color: #1a1a1a;
    overflow-x: hidden;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header,
header {
    padding: 20px 40px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.3rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.header-text {
    width: 80px;
    height: auto;

    .header-content {
        flex: 1;
    }

}

.header-content {
    flex: 1;
}

.header-content h1,
.header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
}

.header-content p,
.subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.qr-code-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.qr-code {
    height: 180px;
    width: auto;
    object-fit: contain;
}

.category-selector {
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0;
}

.category-selector legend {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    padding: 0 1rem;
    text-align: center;
    margin: 0 auto;
}

.category-selector select,
.category-dropdown {
    width: 100%;
    padding: 0.7rem 2.5rem 0.7rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
}

.category-selector select:hover,
.category-dropdown:hover {
    background-color: white;
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-selector select:focus,
.category-dropdown:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    flex: 0 0 auto;
    width: 320px;
}

.download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: rgba(255, 255, 255, 0.95);
    color: #3b82f6;
    text-decoration: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.download-button:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.download-button svg {
    width: 18px;
    height: 18px;
}

/* 主内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 25px;
    align-items: start;
}

/* 视频区域 */
.video-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 宽高比 */
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-info {
    margin-top: 25px;
    padding: 20px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.video-info h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1a1a1a;
}

.video-info p {
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.6;
}

/* 播放列表侧边栏 */
.playlist-sidebar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
    max-height: 800px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

.sidebar-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a1a1a;
}

.playlist-count {
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.6);
    background: rgba(59, 130, 246, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

.playlist-container {
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
}

/* 自定义滚动条 */
.playlist-container::-webkit-scrollbar {
    width: 8px;
}

.playlist-container::-webkit-scrollbar-track {
    background: rgba(59, 130, 246, 0.05);
    border-radius: 10px;
}

.playlist-container::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 10px;
    transition: background 0.3s;
}

.playlist-container::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.8);
}

/* 播放列表项 */
.playlist-item {
    background: rgba(59, 130, 246, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.playlist-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.15), transparent);
    transition: left 0.5s;
}

.playlist-item:hover::before {
    left: 100%;
}

.playlist-item:hover {
    background: rgba(59, 130, 246, 0.15);
    transform: translateX(5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

.playlist-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    border-color: #3b82f6;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.playlist-item-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-right: 12px;
    vertical-align: middle;
    color: #ffffff;
}

.playlist-item.active .playlist-item-number {
    background: linear-gradient(135deg, #06b6d4, #0284c7);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(6, 182, 212, 0);
    }
}

.playlist-item-content {
    display: inline-block;
    vertical-align: middle;
    width: calc(100% - 45px);
}

.playlist-item-title {
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-item-duration {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.5);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr 350px;
    }
}

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .playlist-sidebar {
        max-height: 500px;
    }

    /* 移动端头部改为垂直排列 */
    .header,
    header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .header-left {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .header-right {
        width: 100%;
        max-width: 400px;
        align-items: center;
    }

    .qr-code {
        height: 150px;
        /* 移动端减小二维码 */
        margin: 10px 0;
    }

    .header h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 15px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .logo {
        height: 60px;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .container {
        padding: 10px;
    }

    .video-section,
    .playlist-sidebar {
        padding: 15px;
    }
}