@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #1a0b2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --accent-hot: #ff006e;
    --accent-cool: #00f5ff;
    --accent-warm: #ff9f1c;
    --text-primary: #ffffff;
    --text-secondary: #a8dadc;
    --text-muted: #6c757d;
    --font-headline: 'Orbitron', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
}
a {
  color: inherit;          /* 继承父元素颜色，去掉蓝色 */
  text-decoration: none;   /* 去掉下划线 */
  cursor: pointer;         /* 保持手型光标（可选） */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Rich-text list marker alignment (fix bullet indentation/marker protrusion) */
.container-game-description-text ul,
.container-game-description-text ol,
.description-box ul,
.description-box ol,
.game-description ul,
.game-description ol,
.game-desc ul,
.game-desc ol,
#game-description ul,
#game-description ol,
#overview ul,
#overview ol {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.container-game-description-text ul li,
.description-box ul li,
.game-description ul li,
.game-desc ul li,
#game-description ul li,
#overview ul li {
    list-style-type: disc !important;
    list-style-position: inside !important;
    padding-left: 0 !important;
}

.container-game-description-text ol li,
.description-box ol li,
.game-description ol li,
.game-desc ol li,
#game-description ol li,
#overview ol li {
    list-style-type: decimal !important;
    list-style-position: inside !important;
    padding-left: 0 !important;
}

.brief-comment-game{
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* show one more line to reduce the empty area */
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(26, 11, 46, 0.9), rgba(26, 11, 46, 0.9)),
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 1px,
            rgba(0, 245, 255, 0.05) 1px,
            rgba(0, 245, 255, 0.05) 2px
        );
    pointer-events: none;
    z-index: -1;
}

/* Grid Floor */
.grid-floor {
    position: fixed;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 100%;
    background-image: 
        linear-gradient(var(--accent-hot) 1px, transparent 1px),
        linear-gradient(90deg, var(--accent-hot) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center bottom;
    transform: perspective(500px) rotateX(60deg);
    opacity: 0.1;
    z-index: -2;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}

/* Scanlines Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.1) 50%,
        rgba(0,0,0,0.1)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headline);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.chrome-text {
    background: linear-gradient(to bottom, #fff 0%, #ddd 50%, #fff 51%, #ccc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.neon-text-hot {
    color: var(--text-primary);
    text-shadow: 
        0 0 5px var(--accent-hot),
        0 0 10px var(--accent-hot),
        0 0 20px var(--accent-hot);
}

.neon-text-cool {
    color: var(--text-primary);
    text-shadow: 
        0 0 5px var(--accent-cool),
        0 0 10px var(--accent-cool),
        0 0 20px var(--accent-cool);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(26, 11, 46, 0.7);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
}

.logo {
    font-family: var(--font-headline);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
}

.logo:hover {
    animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: flex-end; /* Align search box baseline with nav text */
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-headline);
    font-size: 0.9rem;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
    line-height: 1;
}

.nav-links .nav-search {
    display: flex;
    align-items: flex-end;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-cool);
    text-shadow: 0 0 10px var(--accent-cool);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

/* Accessibility helper */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header search (desktop & mobile) */
.site-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    height: 34px; /* Keep consistent navbar height for pixel alignment */
}

.site-search input[type="search"] {
    width: 180px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-body);
    height: 22px;
    line-height: 22px;
    padding: 0;
    margin: 0;
}

.site-search input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.site-search button {
    border: none;
    background: transparent;
    color: var(--accent-cool);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    height: 100%;
    width: 28px;
}

.site-search:focus-within {
    border-color: rgba(0, 245, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.12);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    cursor: pointer;
    font-family: var(--font-headline);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, var(--accent-hot), #ff5c8d);
    color: white;
    box-shadow: 0 0 15px rgba(255, 0, 110, 0.5);
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 0, 110, 0.8);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent-cool);
    color: var(--accent-cool);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(0, 245, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

.btn-ghost::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-hot);
    transition: width 0.3s ease;
}

.btn-ghost:hover::after {
    width: 100%;
}

/* Cards */
.game-card {
    background: rgba(22, 33, 62, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        -5px 5px 0 rgba(0, 245, 255, 0.2),
        5px -5px 0 rgba(255, 0, 110, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.game-cover {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-cover {
    transform: scale(1.1);
}

.card-content {
    padding: 1rem;
    position: relative;
    z-index: 1;
    background: rgba(22, 33, 62, 0.9);
}

.game-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--bg-tertiary), var(--bg-secondary));
    border: 1px solid rgba(168, 218, 220, 0.3);
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent-warm);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.play-btn-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
}

.game-card:hover .play-btn-overlay {
    transform: translateY(0);
}

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


.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.module-description {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 0 0 1rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(0, 245, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col h3 {
    color: var(--accent-cool);
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: var(--text-primary);
}

.newsletter-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--text-muted);
    padding: 0.5rem;
    color: white;
    width: 100%;
    font-family: var(--font-body);
    transition: all 0.3s;
}

.newsletter-input:focus {
    border-color: var(--accent-hot);
    outline: none;
    box-shadow: 0 5px 10px -5px rgba(255, 0, 110, 0.3);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease;
        z-index: 999;
        box-shadow: -5px 0 20px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    /* Mobile: search should take full row */
    .nav-links .nav-search {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-links .site-search {
        width: calc(100% - 2rem);
        max-width: 360px;
        margin-top: 0.75rem;
    }

    .nav-links .site-search input[type="search"] {
        width: 100%;
    }
}

/* Glitch Animation Keyframes */
@keyframes glitch {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 2px) }
    40% { transform: translate(-2px, -2px) }
    60% { transform: translate(2px, 2px) }
    80% { transform: translate(2px, -2px) }
    100% { transform: translate(0) }
}

/* Game Modal */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background: #000;
    border: 2px solid var(--accent-cool);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2001;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid var(--accent-hot);
}

.modal-close:hover {
    color: var(--accent-hot);
    background: rgba(0,0,0,0.8);
    transform: rotate(90deg);
}

.game-frame {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        height: 100%;
        border: none;
        border-radius: 0;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        z-index: 2001;
        background: rgba(0,0,0,0.5);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.5rem;
    }
}