/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #2C1810 0%, #8B0000 30%, #1A0000 70%, #000000 100%);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: rgba(139, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #FF4500;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar:hover {
    background: rgba(220, 20, 60, 0.98);
    box-shadow: 0 0 20px rgba(255, 69, 0, 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: #FF4500;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.7);
    transition: all 0.3s ease;
}

.nav-logo a:hover {
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.9);
    transform: scale(1.05);
}

.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 {
    color: #FF4500;
    background: rgba(255, 69, 0, 0.2);
    box-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #FF4500;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.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: #FF4500;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.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, #FF4500, #DC143C);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.6);
}

.btn-secondary {
    background: transparent;
    color: #FF4500;
    border: 2px solid #FF4500;
}

.btn-secondary:hover {
    background: #FF4500;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
}

/* 游戏卡片链接 */
.game-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
}

/* 游戏卡片 */
.game-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 69, 0, 0.3);
    position: relative;
}

.game-card-link:hover .game-card {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 69, 0, 0.4);
    border-color: #FF4500;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 69, 0, 0.15), 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, #FF4500, #DC143C);
    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(255, 69, 0, 0.4);
    display: inline-block;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.6);
}

.game-info {
    padding: 20px;
}

.game-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #ffffff;
}

.game-genre {
    color: #FFD700;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    color: #ffd700;
    font-size: 1rem;
}

.rating {
    color: #cccccc;
    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, #FF4500, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 69, 0, 0.7);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 100px;
    height: 3px;
    background: linear-gradient(45deg, #FF4500, #FFD700);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(139, 0, 0, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
        border-bottom: 2px solid #FF4500;
    }

    .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(255, 69, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 69, 0, 0.9);
    }
}

/* 页面加载动画 */
.main-content {
    animation: fadeIn 0.8s ease-out;
}

/* 霓虹效果 */
.neon-text {
    text-shadow: 
        0 0 5px #FF4500,
        0 0 10px #FF4500,
        0 0 15px #FF4500,
        0 0 20px #FF4500;
}

/* 扫描线效果 */
.scan-line {
    position: relative;
    overflow: hidden;
}

.scan-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FF4500, transparent);
    animation: scan 2s infinite;
}

@keyframes scan {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
