/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #0a0a1a;
    background-image: radial-gradient(circle at 10% 20%, rgba(64, 45, 150, 0.2) 0%, rgba(10, 10, 26, 0.8) 90%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: #8a6dff;
    transition: color 0.3s ease;
}

a:hover {
    color: #c3a6ff;
}

/* 头部样式 */
header {
    background-color: rgba(16, 16, 40, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(138, 109, 255, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
}

.logo a::before {
    content: "🎮";
    margin-right: 8px;
}

/* 标签容器样式 */
.tags-container {
    position: relative;
    margin-left: 20px;
}

.tags-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 50%;
    background-color: rgba(138, 109, 255, 0.3);
    width: 40px;
    height: 40px;
    justify-content: center;
}

.tags-btn:hover {
    transform: scale(1.1);
    background-color: rgba(138, 109, 255, 0.5);
}

.tags {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(30, 30, 60, 0.9);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    transition: opacity 0.3s ease;
    z-index: 10;
    width: 400px;
    opacity: 1;
    text-align: center;
}

.tags a {
    background-color: rgba(138, 109, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(138, 109, 255, 0.3);
}

.tags a:hover {
    background-color: rgba(138, 109, 255, 0.4);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(138, 109, 255, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        margin-bottom: 0;
    }

    .tags-container {
        margin-left: 10px;
    }

    .tags {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        display: none;
        border-radius: 0;
        padding: 10px;
        box-shadow: none;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: rgba(30, 30, 60, 0.95);
        z-index: 100;
    }

    .tags a {
        width: 100%;
        text-align: left;
        margin: 5px 0;
        padding: 10px 15px;
        border-radius: 5px;
        font-size: 1rem;
        border: 1px solid rgba(138, 109, 255, 0.3);
    }

    .tags a:hover {
        border: 2px solid rgba(138, 109, 255, 0.5);
    }
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(135deg, rgba(64, 45, 150, 0.8) 0%, rgba(20, 20, 60, 0.9) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}


.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    animation: glow 2s infinite alternate;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px #8a6dff, 0 0 10px #8a6dff;
    }
    to {
        text-shadow: 0 0 10px #8a6dff, 0 0 20px #8a6dff, 0 0 30px #8a6dff;
    }
}

/* 搜索框功能 */
.search-bar {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* 特色游戏滑块 */
.featured-games {
    padding: 60px 0;
    background-color: rgba(16, 16, 40, 0.5);
}

.featured-games h2 {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    font-size: 2rem;
}

.games-slider {
    position: relative;
    overflow: hidden;
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease;
}

.game-card {
    flex: 0 0 calc(25% - 20px);
    margin: 0 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(138, 109, 255, 0.2);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(138, 109, 255, 0.3);
}

.game-image {
    height: 180px;
    background-color: rgba(138, 109, 255, 0.1);
    background-image: linear-gradient(45deg, rgba(138, 109, 255, 0.1) 25%, rgba(100, 70, 200, 0.1) 25%, rgba(100, 70, 200, 0.1) 50%, rgba(138, 109, 255, 0.1) 50%, rgba(138, 109, 255, 0.1) 75%, rgba(100, 70, 200, 0.1) 75%, rgba(100, 70, 200, 0.1));
    background-size: 20px 20px;
}

.game-card h3 {
    padding: 15px 15px 5px;
    font-size: 18px;
    color: white;
}

.game-card p {
    padding: 0 15px 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(138, 109, 255, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.slider-btn:hover {
    background-color: rgba(138, 109, 255, 1);
}

.slider-btn.prev {
    left: 10px;
}

.slider-btn.next {
    right: 10px;
}

/* 新发布游戏 */
.new-releases {
    background-color: rgba(16, 16, 40, 0.5);
}

.new-releases h2 {
    text-align: center;
    margin-bottom: 40px;
    color: white;
    font-size: 2rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* 页脚样式 */
footer {
    background-color: rgba(10, 10, 26, 0.9);
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(138, 109, 255, 0.2);
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 10px;
}

.footer-links a:hover {
    color: white;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .game-card {
        flex: 0 0 calc(33.333% - 20px);
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        text-align: center;
    }

    nav ul li {
        margin: 5px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .game-card {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 576px) {
    .game-card {
        flex: 0 0 calc(100% - 20px);
    }

    .tags {
        gap: 5px;
    }

    .tags a {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}