* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

:root {
    --primary: #e50914;
    --primary-dark: #b20710;
    --dark: #0f0f0f;
    --dark-light: #1a1a1a;
    --gray: #2d2d2d;
    --light-gray: #8c8c8c;
    --white: #ffffff;
    --card-bg: #1f1f1f;
    --text-light: #f0f0f0;
    --transition: all 0.3s ease;
    --ripple-color: rgba(229, 9, 20, 0.4);
}

body {
    background-color: var(--dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 移动设备顶部导航 */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    max-width: 1000px;
    margin: 0 auto;
}

.mobile-header .logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-header .logo i {
    font-size: 24px;
}

.mobile-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-actions i {
    font-size: 20px;
    color: var(--white);
}

.search-icon {
    position: relative;
}

/* 轮播图部分 - 移动优化 */
.carousel-container {
    position: relative;
    height: 220px;
    overflow: hidden;
    margin: 0 -16px;
    width: auto;
}

.carousel {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.carousel-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 20px 16px;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.carousel-content h2 {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.carousel-content p {
    color: var(--light-gray);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.carousel-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--white);
    color: var(--white);
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--primary);
    transform: scale(1.3);
}

/* 内容区域 */
.container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    background: rgba(15, 15, 15, 0.9);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    backdrop-filter: blur(10px);

    padding: 0 16px 100px;
}

.section-title {
    font-size: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.section-title a {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 网格视频列表 - 替换水平滚动 */
.video-grid-container {
    margin-bottom: 30px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 5px 0 15px;
}

.video-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.video-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.video-card:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* 涟漪效果 */
.video-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--ripple-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.video-card.ripple::after {
    animation: rippleEffect 0.6s ease-out;
}

@keyframes rippleEffect {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

.video-thumb {
    position: relative;
    height: 100px;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.video-card:hover .video-thumb img {
    transform: scale(1.05);
}

.duration {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    z-index: 2;
}

.video-info {
    padding: 10px;
    position: relative;
    z-index: 2;
    background: var(--card-bg);
}

.video-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: var(--light-gray);
    font-size: 11px;
}

.video-meta span:first-child {
    color: var(--primary);
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 8px;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--dark-light);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn.active, .page-btn:hover {
    background: var(--primary);
}

/* 分类导航 */
.category-nav {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin-bottom: 20px;
    padding: 5px 0 15px;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-btn {
    background: var(--dark-light);
    color: var(--light-gray);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    transition: var(--transition);
    cursor: pointer;
}

.category-btn.active, .category-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* 页脚 */
.mobile-footer {
    background: #0a0a0a;
    padding: 30px 16px 20px;
    position: relative;
    margin-top: 20px;
}

.mobile-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #ff6b6b);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.footer-column h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--white);
}

.footer-links-list {
    list-style: none;
}

.footer-links-list li {
    margin-bottom: 8px;
}

.footer-links-list a {
    color: var(--light-gray);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.footer-links-list a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    justify-content: center;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gray);
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
    font-size: 16px;
}

.social-links a:hover {
    background: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--gray);
    color: var(--light-gray);
    font-size: 12px;
    line-height: 1.6;
}

.link-reset {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Sitemap链接样式 */
.sitemap-link {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 15px 0;
}

.sitemap-link a {
    color: var(--light-gray);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.sitemap-link a:hover {
    color: var(--primary);
}

.sitemap-link i {
    font-size: 16px;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    z-index: 199;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}


/* 响应式设计 - 平板和桌面 */
@media (min-width: 768px) {
    .mobile-header {
        padding: 15px 30px;
    }
    
    .carousel-container {
        height: 350px;
        margin: 0 -30px;
    }
    
    .carousel-content {
        padding: 30px;
    }
    
    .carousel-content h2 {
        font-size: 28px;
    }
    
    .carousel-content p {
        font-size: 16px;
        max-width: 70%;
    }
    
    .container {
        padding: 30px 30px 100px;
    }
    
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .video-thumb {
        height: 140px;
    }
    
    .mobile-footer {
        padding: 40px 30px 30px;
    }
    
    .footer-links {
        grid-template-columns: repeat(4, 1fr);
    }

    .back-to-top {
        bottom: 90px;
        /*right: 30px;*/
        right: calc(50% - 500px + 20px);
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .video-thumb {
        height: 120px;
    }
}

/* PWA安装提示样式 */
.pwa-install-banner {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 12px 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    z-index: 999;
    display: none;
    border-radius: 8px 8px 0 0;
    margin: 0 auto;
    width: 55%;
    max-width: 550px;
}
.pwa-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 550px;
    margin: 0 auto;
}
.pwa-banner-text {
    display: flex;
    align-items: center;
    flex: 1;
}
.pwa-banner-text i {
    margin-right: 10px;
    font-size: 1.2rem;
}
.pwa-banner-actions {
    display: flex;
    gap: 10px;
}
.pwa-install-btn, .pwa-close-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}
.pwa-install-btn {
    background-color: white;
    color: #6e8efb;
}
.pwa-close-btn {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
}

/* 调整底部导航栏位置，为PWA提示留出空间 */
.mobile-nav {
    bottom: 0;
    z-index: 1000;
}

/* 调整回到顶部按钮位置 */
.back-to-top.visible {
    bottom: 80px;
}

@media (max-width: 768px) {
    .pwa-banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .pwa-banner-actions {
        align-self: flex-end;
    }
}

