/* ===== 全局样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #0f0f1a;
    color: #fff;
    min-height: 100vh;
}

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

/* ===== 标签页导航 ===== */
.tabs-nav {
    display: flex;
    background: #1a1a2e;
    padding: 3px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 0 0 auto;
    padding: 4px 10px;
    margin-right: 1px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.25s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 1.3;
    max-width: 90px;
}

.tab-btn:last-child {
    margin-right: 0;
}

.tab-btn.active {
    max-width: 250px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.tab-btn.active:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* ===== 标签页内容 ===== */
.tabs-content {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

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

/* ===== abc介绍标签 ===== */
.media-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.media-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== 主媒体容器（统一视频和图片尺寸） ===== */
.main-media {
    margin-bottom: 20px;
}

.main-media video,
.main-media .single-image-wrapper img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: #000;
    object-fit: cover;
}

/* ===== 视频播放器 ===== */
.video-player-container {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 20px;
}

.main-video video {
    width: 100%;
    border-radius: 12px;
    background: #000;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.video-title {
    margin-top: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

/* ===== 视频列表 ===== */
.video-list-section {
    margin-top: 30px;
}

.video-list-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #fff;
}

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

.video-item {
    background: #252542;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.video-item.active {
    border: 2px solid #667eea;
}

.video-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    overflow: hidden;
}

.video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #252542 100%);
}

.thumb-placeholder span {
    font-size: 40px;
    color: rgba(255, 255, 255, 0.3);
}

.video-info {
    padding: 12px;
}

.video-name {
    font-size: 14px;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-size {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* ===== 左视频右文字 ===== */
.video-text-container {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 20px;
}

.left-video {
    width: 100%;
    margin-bottom: 20px;
}

.left-video video {
    width: 100%;
    border-radius: 12px;
    background: #000;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.right-text {
    background: #252542;
    border-radius: 12px;
    padding: 24px;
}

.text-content {
    font-size: 16px;
    line-height: 1.8;
    color: #ddd;
    margin-bottom: 24px;
    white-space: pre-wrap;
}

.download-btn {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

@media (min-width: 768px) {
    .video-text-container {
        display: flex;
        gap: 24px;
        align-items: flex-start;
    }
    
    .left-video {
        flex: 1.5;
        margin-bottom: 0;
    }
    
    .right-text {
        flex: 1;
    }
}

/* ===== 图片网格（标签C） ===== */
.grid-container {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 20px;
}

.grid-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.grid-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 8px;
    background: #252542;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
}

.grid-btn:hover {
    background: #2d2d50;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.grid-btn-image {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.grid-btn-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-btn-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.grid-btn-text {
    font-size: 13px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* ===== 图片按钮网格（标签D） ===== */
.image-grid-container {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 20px;
}

.image-grid-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.image-grid-btn {
    display: block;
    background: #252542;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
}

.image-grid-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.image-grid-img {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.image-grid-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-grid-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #252542 0%, #1a1a2e 100%);
    color: #666;
    font-size: 16px;
}

.image-grid-title {
    padding: 16px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

/* ===== 单图展示（标签E） ===== */
.single-image-container {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 20px;
}

.single-image-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.single-image-wrapper img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    object-fit: cover;
}

/* ===== 图片画廊 ===== */
.image-gallery-section {
    margin-top: 30px;
}

.image-gallery-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: #fff;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: #252542;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ===== 空状态提示 ===== */
.no-video-tip,
.no-image-tip {
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.no-video-tip.small {
    padding: 40px 20px;
}

.tip-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-video-tip p,
.no-image-tip p {
    font-size: 18px;
    margin-bottom: 8px;
}

.tip-sub {
    font-size: 14px !important;
    color: #555 !important;
}

/* ===== 图片查看器 ===== */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-viewer.show {
    opacity: 1;
    visibility: visible;
}

.image-viewer img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.image-viewer-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .tabs-nav {
        padding: 6px;
        gap: 2px;
    }
    
    .tab-btn {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .video-player-container,
    .video-text-container,
    .grid-container,
    .image-grid-container,
    .single-image-container {
        padding: 12px;
        border-radius: 12px;
    }
    
    .grid-buttons {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }
    
    .grid-btn {
        padding: 12px 6px;
    }
    
    .grid-btn-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .video-list {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .media-tag {
        padding: 4px 10px;
        font-size: 12px;
    }
}