/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --main-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --text-color: #fff;
    --section-title-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
body.light {
    --main-gradient: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --text-color: #222;
    --section-title-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
    background: var(--main-gradient);
}
body.dark {
    --main-gradient: linear-gradient(135deg, #232526 0%, #414345 100%);
    --glass-bg: rgba(30, 30, 30, 0.5);
    --text-color: #fff;
    --section-title-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    background: var(--main-gradient);
}
body {
    background: var(--main-gradient);
    color: var(--text-color);
}

.section-title, .hero-title, .hero-subtitle, .download-card h3, .download-card p, .download-item, .game-info h3, .game-info p, .about-content p, .feature h3, .feature p, .play-btn, .download-btn, .nav-link, .nav-logo h2, .card-icon, .game-placeholder, .close {
    color: var(--text-color) !important;
}

/* 背景动画 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 50%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 1s;
}

.shape-5 {
    width: 90px;
    height: 90px;
    top: 80%;
    right: 30%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* 毛玻璃效果 */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo h2 {
    color: white;
    font-weight: 600;
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 1px 0;
    transition: 0.3s;
}

/* 主要内容 */
main {
    padding-top: 80px;
}

/* 首页部分 */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.hero-content {
    padding: 3rem;
    max-width: 600px;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary, .btn-secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* 分区样式 */
.section {
    padding: 5rem 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 3rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 下载分区 */
.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.download-card {
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}
.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.download-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s cubic-bezier(.4,0,.2,1), transform 0.4s cubic-bezier(.4,0,.2,1);
}
.download-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.download-card h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.download-card p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.download-items {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
}

.download-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* 搜索框样式 */
#fileSearchInput {
    width: 280px;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1rem;
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#fileSearchInput:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px) scale(1.05);
}

body.light #fileSearchInput {
    background: rgba(255, 255, 255, 0.3);
    color: #222;
    border-color: rgba(0, 0, 0, 0.2);
}

body.light #fileSearchInput:focus {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px) scale(1.05);
}

body.dark #fileSearchInput {
    background: rgba(30, 30, 30, 0.3);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark #fileSearchInput:focus {
    background: rgba(30, 30, 30, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px) scale(1.05);
}

.download-items.fade-out {
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(.4,0,.2,1);
}
.download-items.fade-in {
    opacity: 1;
    transition: opacity 0.3s cubic-bezier(.4,0,.2,1);
}

/* 游戏分区 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    overflow: hidden;
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.game-thumbnail {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.game-placeholder {
    font-size: 4rem;
    color: white;
    opacity: 0.8;
}

.game-info {
    padding: 1.5rem;
    text-align: center;
}

.game-info h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.game-info p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.play-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 关于部分 */
.about-content {
    padding: 3rem;
    text-align: center;
}

.about-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
}

.feature i {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.feature h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.feature p {
    color: rgba(255, 255, 255, 0.8);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.close:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* 游戏容器 */
#gameContainer {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 导航栏移动端优化 */
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    /* 移动端菜单明暗模式适配 */
    body.light .nav-menu {
        background: rgba(255, 255, 255, 0.8);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
    
    body.dark .nav-menu {
        background: rgba(30, 30, 30, 0.8);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
    }
    
    .nav-link {
        display: block;
        padding: 0.8rem 2rem;
        text-align: center;
    }
    
    /* 移动端导航链接明暗模式适配 */
    body.light .nav-menu .nav-link {
        color: #222;
    }
    
    body.light .nav-menu .nav-link:hover,
    body.light .nav-menu .nav-link.active {
        background: rgba(0, 0, 0, 0.1);
        color: #222;
    }
    
    body.dark .nav-menu .nav-link {
        color: #fff;
    }
    
    body.dark .nav-menu .nav-link:hover,
    body.dark .nav-menu .nav-link.active {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* 汉堡菜单明暗模式适配 */
    body.light .hamburger span {
        background: #222;
    }
    
    body.dark .hamburger span {
        background: #fff;
    }
    
    /* 首页移动端优化 */
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin: 1rem 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    /* 下载中心移动端优化 */
    .downloads-grid,
    .games-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .download-card {
        margin: 0;
        padding: 1.5rem;
    }
    
    .download-item {
        padding: 0.6rem;
        font-size: 0.95rem;
    }
    
    .download-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    /* 搜索框移动端优化 */
    #fileSearchInput {
        width: 100%;
        max-width: 320px;
        font-size: 0.95rem;
        padding: 0.7rem 1rem;
    }
    
    /* 游戏卡片移动端优化 */
    .game-card {
        margin: 0;
    }
    
    .game-thumbnail {
        height: 150px;
    }
    
    .game-info {
        padding: 1.2rem;
    }
    
    .play-btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    /* 服务器信息移动端优化 */
    .about-content {
        padding: 2rem 1.5rem;
    }
    
    .about-content p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    /* 音乐播放器移动端优化 */
    .music-player {
        right: 1rem;
        bottom: 1rem;
        width: 50px;
        height: 50px;
    }
    
    .music-btn {
        font-size: 1.3rem;
    }
    
    /* 模态框移动端优化 */
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
        max-height: 85vh;
    }
    
    /* 通用间距调整 */
    .section {
        padding: 2rem 1rem;
    }
    
    .hero-content {
        padding: 2rem 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Bilibili和YouTube按钮移动端优化 */
    .bilibili-btn, .youtube-btn {
        margin-left: 0.3rem;
    }
    
    .bilibili-btn span, .youtube-btn span {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .download-card h3,
    .game-info h3 {
        font-size: 1.2rem;
    }
    
    .download-card p,
    .game-info p {
        font-size: 0.9rem;
    }
    
    .nav-logo h2 {
        font-size: 1.3rem;
    }
    
    .btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
    
    .download-item {
        font-size: 0.9rem;
    }
    
    .download-btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .play-btn {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
    }
    
    .music-player {
        width: 45px;
        height: 45px;
        right: 0.8rem;
        bottom: 0.8rem;
    }
    
    .music-btn {
        font-size: 1.2rem;
    }
    
    .about-content p {
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
    }
    
    .download-card,
    .game-card {
        padding: 1.2rem;
    }
    
    .nav-container {
        padding: 0 0.8rem;
    }
    
    .bilibili-btn, .youtube-btn {
        margin-left: 0.2rem;
    }
    
    .bilibili-btn span, .youtube-btn span {
        font-size: 0.8rem;
    }
} 

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    margin-left: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}
.theme-toggle:hover {
    color: #ffd700;
} 

.music-player {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 0.8rem;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    width: 60px;
    height: 60px;
    user-select: none;
}
.music-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.music-btn:hover {
    color: #ffd700;
    transform: scale(1.1);
} 

.bilibili-btn, .youtube-btn {
    text-decoration: none !important;
    box-shadow: none !important;
} 

.bilibili-btn span, .youtube-btn span {
    color: #fff !important;
} 

.download-item {
    opacity: 1 !important;
    display: flex !important;
}

/* 移动端触摸优化 */
@media (max-width: 768px) {
    .btn:hover {
        transform: none;
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    }
    
    .download-btn:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
    }
    
    .play-btn:hover {
        transform: none;
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    }
    
    .nav-link:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.15);
    }
    
    .music-btn:hover {
        transform: none;
        color: #ffd700;
    }
    
    .download-card:hover {
        transform: none;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }
    
    .game-card:hover {
        transform: none;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }
    
    /* 增加触摸目标大小 */
    .btn, .download-btn, .play-btn, .nav-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 优化触摸反馈 */
    .btn:active,
    .download-btn:active,
    .play-btn:active,
    .nav-link:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    /* 优化搜索框移动端体验 */
    #fileSearchInput:focus {
        transform: translateY(-1px) scale(1.02);
    }
    
    /* 优化模态框移动端体验 */
    .modal-content {
        border-radius: 12px;
    }
    
    /* 优化音乐播放器移动端体验 */
    .music-player:active {
        transform: scale(0.95);
    }
} 