/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #533483 75%, #c06c84 100%);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(155, 89, 182, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(52, 152, 219, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(46, 204, 113, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(241, 196, 15, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(90deg, rgba(155, 89, 182, 0.95) 0%, rgba(52, 152, 219, 0.95) 50%, rgba(46, 204, 113, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #F1C40F;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar:hover {
    background: linear-gradient(90deg, rgba(155, 89, 182, 1) 0%, rgba(52, 152, 219, 1) 50%, rgba(46, 204, 113, 1) 100%);
    box-shadow: 0 8px 30px rgba(241, 196, 15, 0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 2rem;
    font-weight: bold;
    color: #F1C40F;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.7);
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #F1C40F, #FF6B6B, #3498DB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-logo a:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
    text-shadow: 0 0 20px rgba(241, 196, 15, 0.9);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(45deg, rgba(241, 196, 15, 0.3), rgba(255, 107, 107, 0.3));
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.6);
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #F1C40F, #FF6B6B, #3498DB);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 移动端导航 */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: linear-gradient(90deg, #F1C40F, #FF6B6B);
    transition: all 0.3s ease;
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(241, 196, 15, 0.5);
}

.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 主要内容 */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, #9B59B6, #3498DB, #2ECC71);
    color: white;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(155, 89, 182, 0.6);
}

.btn-secondary {
    background: transparent;
    color: #F1C40F;
    border: 2px solid #F1C40F;
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(241, 196, 15, 0.2), transparent);
    transition: left 0.6s;
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #F1C40F, #FF6B6B);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(241, 196, 15, 0.5);
    border-color: transparent;
}

/* 游戏卡片链接 */
.game-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
}

/* 游戏卡片 */
.game-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(155, 89, 182, 0.3);
    position: relative;
    backdrop-filter: blur(5px);
}

.game-card-link:hover .game-card {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(155, 89, 182, 0.4);
    border-color: #9B59B6;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(241, 196, 15, 0.2), rgba(255, 107, 107, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card-link:hover .game-card::before {
    opacity: 1;
}

.game-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.placeholder-img::before {
    content: '🎮';
    font-size: 3rem;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.game-card-link:hover .game-overlay {
    opacity: 1;
}

.play-btn {
    background: linear-gradient(45deg, #3498DB, #2ECC71, #F1C40F);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.play-btn:hover::before {
    left: 100%;
}

.play-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.6);
}

.game-info {
    padding: 20px;
}

.game-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #ffffff;
}

.game-genre {
    background: linear-gradient(45deg, #F1C40F, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    color: #F1C40F;
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(241, 196, 15, 0.5);
}

.rating {
    color: #e0e0e0;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 游戏网格 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

/* 章节标题 */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(45deg, #9B59B6, #3498DB, #2ECC71, #F1C40F, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 20px rgba(155, 89, 182, 0.5));
    }
    50% {
        filter: brightness(1.2) drop-shadow(0 0 30px rgba(241, 196, 15, 0.7));
    }
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #9B59B6, #3498DB, #2ECC71, #F1C40F, #FF6B6B);
    transform: translateX(-50%);
    border-radius: 2px;
    animation: titleBar 3s ease-in-out infinite;
}

@keyframes titleBar {
    0%, 100% {
        width: 120px;
        opacity: 1;
    }
    50% {
        width: 150px;
        opacity: 0.8;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: linear-gradient(180deg, rgba(155, 89, 182, 0.98), rgba(52, 152, 219, 0.98));
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
        border-bottom: 2px solid #F1C40F;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .container {
        padding: 0 15px;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .section-title {
        font-size: 2rem;
    }

    .nav-logo a {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(155, 89, 182, 0.6);
    }
    50% {
        box-shadow: 0 0 25px rgba(241, 196, 15, 0.9);
    }
}

/* 页面加载动画 */
.main-content {
    animation: fadeIn 0.8s ease-out;
}

/* 霓虹效果 */
.neon-text {
    text-shadow:
        0 0 5px #9B59B6,
        0 0 10px #3498DB,
        0 0 15px #2ECC71,
        0 0 20px #F1C40F,
        0 0 25px #FF6B6B;
    animation: neonFlicker 2s ease-in-out infinite;
}

@keyframes neonFlicker {
    0%, 100% {
        text-shadow:
            0 0 5px #9B59B6,
            0 0 10px #3498DB,
            0 0 15px #2ECC71,
            0 0 20px #F1C40F,
            0 0 25px #FF6B6B;
    }
    50% {
        text-shadow:
            0 0 8px #9B59B6,
            0 0 15px #3498DB,
            0 0 20px #2ECC71,
            0 0 25px #F1C40F,
            0 0 30px #FF6B6B;
    }
}

/* 扫描线效果 */
.scan-line {
    position: relative;
    overflow: hidden;
}

.scan-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #9B59B6, #3498DB, #2ECC71, #F1C40F, #FF6B6B, transparent);
    animation: scan 3s infinite;
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.5);
}

@keyframes scan {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
