* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #F2F5F8;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== 霓虹·故障幻境 - 动态故障画布背景 ===== */
.glitch-neon-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #F2F5F8;
    overflow: hidden;
}

/* 水平扫描线 */
.glitch-neon-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.4) 0px,
        rgba(255, 255, 255, 0.4) 1px,
        transparent 1px,
        transparent 4px
    );
    animation: scanlines 8s linear infinite;
}

/* RGB残影块 - 青 */
.glitch-neon-bg::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 150px;
    height: 100px;
    background: rgba(0, 230, 230, 0.3);
    filter: blur(20px);
    animation: glitchBlock1 5s ease-in-out infinite;
}

/* 粉红残影块 */
.glitch-neon-bg .block-pink {
    position: absolute;
    bottom: 15%;
    right: 15%;
    width: 160px;
    height: 120px;
    background: rgba(255, 80, 150, 0.3);
    filter: blur(25px);
    animation: glitchBlock2 6s ease-in-out infinite;
}

/* 明黄残影块 */
.glitch-neon-bg .block-yellow {
    position: absolute;
    top: 50%;
    left: 40%;
    width: 130px;
    height: 90px;
    background: rgba(200, 200, 0, 0.25);
    filter: blur(18px);
    animation: glitchBlock3 7s ease-in-out infinite;
}

/* 像素闪烁层 */
.glitch-neon-bg .pixel-flicker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    box-shadow:
        50px 80px 0 rgba(255, 100, 200, 0.4),
        200px 150px 0 rgba(0, 255, 200, 0.4),
        300px 40px 0 rgba(200, 200, 0, 0.5),
        100px 300px 0 rgba(255, 0, 150, 0.3),
        250px 350px 0 rgba(0, 200, 255, 0.4),
        320px 250px 0 rgba(150, 255, 100, 0.3),
        80px 200px 0 rgba(255, 150, 0, 0.4),
        180px 100px 0 rgba(0, 255, 255, 0.5);
    animation: pixelBlink 0.8s steps(2) infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes glitchBlock1 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    50% { transform: translate(30px, -15px) scale(1.3); opacity: 0.6; }
}

@keyframes glitchBlock2 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.3; }
    33% { transform: translate(-25px, 10px) scale(0.7); opacity: 0.7; }
    66% { transform: translate(10px, -20px) scale(1.2); opacity: 0.2; }
}

@keyframes glitchBlock3 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.25; }
    50% { transform: translate(-15px, 25px) scale(1.4); opacity: 0.5; }
}

@keyframes pixelBlink {
    0% { opacity: 0.5; }
    50% { opacity: 0; }
    100% { opacity: 0.5; }
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 10px;
}

@media (min-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

/* ===== 霓虹·故障幻境 - RGB色散卡片 ===== */
.game-card,
.related-game {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(200, 200, 200, 0.4);
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        3px 0 0 rgba(0, 230, 230, 0.15),
        -3px 0 0 rgba(255, 80, 150, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    animation: cardGlitch 5s ease-in-out infinite;
}

.game-card:hover,
.related-game:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow:
        4px 0 0 rgba(0, 230, 230, 0.25),
        -4px 0 0 rgba(255, 80, 150, 0.25),
        0 12px 32px rgba(0, 0, 0, 0.12);
    border-color: rgba(180, 180, 180, 0.8);
}

.game-card:hover img,
.related-game:hover img {
    transform: scale(1.08);
}

/* 触摸反馈 - RGB重影消失 */
.game-card:active,
.related-game:active {
    box-shadow: 0 2px 8px rgba(128,128,128,0.35), inset 0 0 20px rgba(255,255,255,0.9);
    animation: none !important;
    transition: all 0.2s ease-out;
}

/* 标题双影文字效果 */
.glitch-title {
    position: relative;
    display: inline-block;
    text-shadow: 1px 0 rgba(0, 230, 230, 0.5), -1px 0 rgba(255, 80, 150, 0.5);
}

/* 卡片水平撕裂动画 */
@keyframes cardGlitch {
    0%, 100% {
        transform: skewX(0deg);
        box-shadow:
            3px 0 0 rgba(0, 230, 230, 0.15),
            -3px 0 0 rgba(255, 80, 150, 0.15),
            0 4px 12px rgba(0, 0, 0, 0.08);
    }
    50% {
        transform: skewX(0.5deg);
        box-shadow:
            4px 0 0 rgba(0, 230, 230, 0.2),
            -4px 0 0 rgba(255, 80, 150, 0.2),
            0 4px 12px rgba(0, 0, 0, 0.08);
    }
}

hr, .divider {
    display: none;
}

hr.dashed, .divider-dashed {
    display: none;
}

.related-games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (min-width: 768px) {
    .related-games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

button {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(0,230,230,0.06), rgba(255,80,150,0.06));
    border: 2px solid transparent;
    color: #333;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg, rgba(0, 230, 230, 0.5), rgba(255, 80, 150, 0.5));
    border-radius: inherit;
    z-index: -1;
    opacity: 0.7;
}

button:hover {
    transform: scale(1.05);
    box-shadow:
        3px 0 0 rgba(0, 230, 230, 0.25),
        -3px 0 0 rgba(255, 80, 150, 0.25);
    animation: buttonFlicker 0.15s steps(2) 2;
}

@keyframes buttonFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

img {
    max-width: 100%;
    height: auto;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

a {
    transition: all 0.3s ease;
}

::selection {
    background: linear-gradient(90deg, rgba(0, 230, 230, 0.2), rgba(255, 80, 150, 0.2));
    color: #333;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(242,245,248,0.95);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0, 230, 230, 0.4), rgba(255, 80, 150, 0.4));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(0, 230, 230, 0.6), rgba(255, 80, 150, 0.6));
}