/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.site-header {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.home-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    margin-bottom: 10px;
}

.logo {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.site-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

.site-subtitle p {
    font-size: 16px;
    opacity: 0.9;
    margin-top: 5px;
}

/* 主内容区 */
.main-content {
    padding: 30px 0 50px;
}

/* 分类标签 */
.category-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    flex: 1;
    padding: 18px 20px;
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tab-btn:hover {
    background-color: #f8f9fa;
    color: #1a237e;
}

.tab-btn.active {
    color: #1a237e;
    border-bottom: 3px solid #1a237e;
    background-color: #f0f4ff;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.category-description {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.category-description h2 {
    font-size: 24px;
    color: #1a237e;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.category-description p {
    color: #666;
    font-size: 16px;
}

/* 分类网格 */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.category-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #eaeaea;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    border-color: #1a237e;
}

.category-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 比例 */
    overflow: hidden;
}

.category-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-info {
    padding: 20px;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-score {
    font-size: 14px;
    color: #ff6b6b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.category-description-text {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.category-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.view-btn {
    padding: 8px 16px;
    background: #1a237e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-btn:hover {
    background: #283593;
}

/* 外部链接标识 */
.external-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 全景标识 */
.panorama-badge {
    background: #4CAF50;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

/* 模态框样式 */
.modal, .player-modal, .image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    overflow-y: auto;
    padding: 20px;
}

.modal-content, .player-content, .image-content {
    background-color: white;
    margin: 30px auto;
    border-radius: 12px;
    max-width: 1200px;
    width: 95%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

.player-content, .image-content {
    background-color: #111;
    color: white;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header, .player-header, .image-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.player-header, .image-header {
    background-color: #222;
    border-bottom-color: #333;
}

.modal-header h2, .player-header h3, .image-header h3 {
    font-size: 22px;
    color: #1a237e;
}

.player-header h3, .image-header h3 {
    color: white;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: #333;
    background-color: #f0f0f0;
}

.player-header .close-btn:hover, .image-header .close-btn:hover {
    color: white;
    background-color: #333;
}

.modal-body, .player-body, .image-body {
    padding: 30px;
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
    gap: 25px;
}

.video-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
}

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

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-item:hover .play-overlay {
    opacity: 1;
}

.play-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a237e;
    font-size: 24px;
}

.video-thumbnail .external-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.video-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* 播放器样式 */
.player-body .video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

#main-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    outline: none;
}

.video-info p {
    color: #ccc;
    line-height: 1.6;
}

/* 图片查看器样式 */
.image-body .image-wrapper {
    position: relative;
    width: 100%;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

#full-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-info p {
    color: #ccc;
    line-height: 1.6;
    text-align: center;
}

/* 图片查看器导航按钮 */
.image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 1002;
    transition: background 0.3s;
}

.image-nav:hover {
    background: rgba(0, 0, 0, 0.9);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1002;
}

/* 瀑布流页面 */
.waterfall-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    z-index: 999;
    overflow-y: auto;
}

.waterfall-header {
    position: sticky;
    top: 0;
    background: white;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-btn {
    padding: 8px 16px;
    background: #1a237e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.back-btn:hover {
    background: #283593;
}
#back-to-video-list {
    background: #1a237e;
    color: white;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    width: auto;
    min-width: 120px;
    height: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
}

#back-to-video-list:hover {
    background: #283593;
    color: white;
}

#back-to-video-list i {
    font-size: 14px;
}

#waterfall-title {
    font-size: 22px;
    color: #1a237e;
}

.waterfall-container {
    padding: 20px;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1a237e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 瀑布流相关样式 */
.waterfall-column {
    float: left;
    padding: 0 10px;
    box-sizing: border-box;
}

.waterfall-item {
    margin-bottom: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.waterfall-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.item-image {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
	object-fit: contain;
}

.image-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.image-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid #1a237e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 错误状态 */
.image-error {
    color: #666;
    font-size: 14px;
}

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

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.waterfall-item:hover .item-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
}

.overlay-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.overlay-content p {
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.view-btn-small {
    display: inline-block;
    padding: 8px 16px;
    background: #1a237e;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.item-info {
    padding: 15px;
}

.item-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.item-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.panorama-item .item-image {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    display: flex;
	aspect-ratio: 16/9;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.panorama-item .item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.panorama-icon {
    position: relative;
}

.panorama-icon i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    color: rgba(255, 255, 255, 0.9);
    z-index: 2;
}

.panorama-icon img {
    opacity: 0.7;
}

.view-panorama-btn {
    padding: 8px 16px;
    background: #1a237e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.3s;
}

.view-panorama-btn:hover {
    background: #283593;
}
/* 响应式调整 */
@media (max-width: 768px) {
    .waterfall-item {
        margin-bottom: 15px;
    }
    
    .item-image {
        /* 在移动端可以设置最小高度 */
        min-height: 200px;
    }
}