/* 基础样式和变量 */
:root {
    --bg-color: #0d1117;
    --primary-color: #00ffc8;
    --secondary-color: #1a2a40;
    --text-color: #ffffff;
    --highlight-color: #ff33c8;
    --border-color: #2e445a;
    --font-main: 'Orbitron', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --gap-size: 2.5rem;
    --card-transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 重置和通用样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--highlight-color);
}

.glitch-text {
    animation: glitch-effect 2s infinite linear alternate;
}

@keyframes glitch-effect {
    0% { text-shadow: 2px 2px var(--primary-color), -2px -2px var(--highlight-color); transform: translate(0); }
    20% { text-shadow: -2px 2px var(--primary-color), 2px -2px var(--highlight-color); transform: translate(-2px); }
    40% { text-shadow: 2px -2px var(--primary-color), -2px 2px var(--highlight-color); transform: translate(2px); }
    60% { text-shadow: -2px -2px var(--primary-color), 2px 2px var(--highlight-color); transform: translate(-2px); }
    80% { text-shadow: 2px 2px var(--primary-color), -2px -2px var(--highlight-color); transform: translate(0); }
    100% { text-shadow: -2px -2px var(--primary-color), 2px 2px var(--highlight-color); transform: translate(0); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 头部 */
.glitch-header {
    background: linear-gradient(180deg, var(--secondary-color), var(--bg-color));
    padding: 2rem 0;
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 255, 200, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    font-family: var(--font-main);
    font-size: 2.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.header-logo a {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.header-logo span {
    color: var(--highlight-color);
    font-size: 1.2em;
}

.search-module {
    display: flex;
    align-items: center;
    background-color: #0f1c2b;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 200, 0.2);
    transition: all 0.3s ease;
}

.search-module:focus-within {
    box-shadow: 0 0 20px var(--highlight-color);
    border-color: var(--highlight-color);
}

.search-module form {
    display: flex;
    align-items: center;
}

.search-module .search-input {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    width: 200px;
    padding-left: 0.5rem;
    font-family: var(--font-body);
}

.search-module .search-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    cursor: pointer;
    padding-right: 0.5rem;
}

.search-module .search-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 0.5rem;
}

/* 主要内容 */
.main-content {
    padding: var(--gap-size) 0;
}

.section-header {
    font-family: var(--font-main);
    font-size: 1.8rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.site-description {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    margin-bottom: var(--gap-size);
    box-shadow: 0 0 20px rgba(0, 255, 200, 0.15);
    position: relative;
    overflow: hidden;
}

.site-description p {
    position: relative;
    z-index: 1;
}

.site-description::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: rgba(0, 255, 200, 0.1);
    transform: rotate(45deg);
}

/* 标签 */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tag-chip {
    background-color: var(--secondary-color);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 500;
    transition: var(--card-transition);
    box-shadow: 0 0 8px rgba(0, 255, 200, 0.1);
}

.tag-chip:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--primary-color);
    transform: translateY(-3px);
}

/* 游戏列表 */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card-link {
    display: block;
}

.game-card {
    background-color: var(--secondary-color);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: var(--card-transition);
    position: relative;
    cursor: pointer;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(0, 255, 200, 0.05) 0%, transparent 50%, rgba(255, 51, 200, 0.05) 100%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover::before {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 255, 200, 0.3);
}

.card-image {
    width: 100%;
    height: 200px;
    background-color: #111; /* Placeholder */
    border-radius: 10px;
    border: 1px solid var(--border-color);
    object-fit: cover;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.card-title {
    font-family: var(--font-main);
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 700;
}

.card-excerpt {
    color: #b0c2d6;
    font-size: 0.9rem;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #7f91a2;
}

.meta-item {
    background-color: #1a324b;
    padding: 0.25rem 0.6rem;
    border-radius: 5px;
}

/* 底部 */
.cyber-footer {
    background-color: #0c1521;
    padding: 2rem 0;
    margin-top: var(--gap-size);
    border-top: 2px solid var(--border-color);
    box-shadow: 0 -4px 15px rgba(0, 255, 200, 0.1);
    text-align: center;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-nav a {
    color: #8b949e;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
    position: relative;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.footer-nav a:hover::after {
    width: 100%;
}

.footer-text {
    color: #58616c;
    font-size: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .header-logo {
        font-size: 1.8rem;
    }

    .search-module {
        width: 100%;
    }

    .search-module .search-input {
        width: 100%;
    }

    .main-content {
        padding: 2rem 1rem;
    }

    .section-header {
        font-size: 1.5rem;
    }

    .site-description {
        padding: 1.5rem;
    }

    .game-grid {
        grid-template-columns: 1fr;
    }

    .footer-nav {
        flex-direction: column;
        gap: 0.8rem;
    }
}