* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #E8ECF4;
    color: #1A1E24;
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== 像素·电玩派对 - 动态像素画布背景 ===== */
.pixel-party-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #E8ECF4;
    overflow: hidden;
}

/* 像素网格底纹 */
.pixel-party-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.5) 0px, rgba(255,255,255,0.5) 1px, transparent 1px, transparent 8px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.5) 0px, rgba(255,255,255,0.5) 1px, transparent 1px, transparent 8px);
}

/* 像素云朵 - 粉（左上） */
.pixel-party-bg::after {
    content: '';
    position: absolute;
    top: 15%;
    left: 10%;
    width: 60px;
    height: 30px;
    background: rgba(255, 140, 180, 0.6);
    box-shadow:
        16px -8px 0 rgba(255, 140, 180, 0.6),
        32px 0 0 rgba(255, 140, 180, 0.6),
        48px -4px 0 rgba(255, 140, 180, 0.6),
        8px 8px 0 rgba(255, 140, 180, 0.6),
        24px 8px 0 rgba(255, 140, 180, 0.6),
        40px 8px 0 rgba(255, 140, 180, 0.6);
    animation: pixelFloat 10s ease-in-out infinite;
}

/* 像素云朵 - 蓝（右下）（需额外元素） */
.pixel-party-bg .cloud-blue {
    position: absolute;
    bottom: 20%;
    right: 12%;
    width: 80px;
    height: 24px;
    background: rgba(100, 180, 240, 0.55);
    box-shadow:
        -20px -6px 0 rgba(100, 180, 240, 0.55),
        20px -10px 0 rgba(100, 180, 240, 0.55),
        40px -4px 0 rgba(100, 180, 240, 0.55),
        0px 8px 0 rgba(100, 180, 240, 0.55),
        20px 8px 0 rgba(100, 180, 240, 0.55),
        40px 8px 0 rgba(100, 180, 240, 0.55);
    animation: pixelFloat 12s ease-in-out infinite reverse;
}

/* 浮动像素块（需额外元素） */
.pixel-party-bg .pixel-blocks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    box-shadow:
        40px 60px 0 rgba(255, 100, 150, 0.7),
        90px 20px 0 rgba(255, 100, 150, 0.7),
        130px 80px 0 rgba(255, 100, 150, 0.7),
        280px 50px 0 rgba(0, 200, 240, 0.6),
        320px 100px 0 rgba(0, 200, 240, 0.6),
        350px 70px 0 rgba(0, 200, 240, 0.6),
        50px 200px 0 rgba(255, 220, 50, 0.7),
        120px 250px 0 rgba(255, 220, 50, 0.7),
        180px 210px 0 rgba(255, 220, 50, 0.7),
        300px 280px 0 rgba(100, 230, 100, 0.6),
        340px 320px 0 rgba(100, 230, 100, 0.6),
        250px 350px 0 rgba(100, 230, 100, 0.6),
        10px 320px 0 rgba(200, 130, 255, 0.6),
        70px 360px 0 rgba(200, 130, 255, 0.6);
    animation: blockBounce 6s steps(8) infinite;
}

/* 额外闪烁像素 */
.pixel-party-bg .pixel-spark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    box-shadow:
        100px 150px 0 rgba(255,255,255,0.8),
        200px 100px 0 rgba(255,255,255,0.7),
        310px 180px 0 rgba(255,255,255,0.9),
        25px 270px 0 rgba(255,255,255,0.6),
        170px 320px 0 rgba(255,255,255,0.8);
    animation: sparkle 2s steps(3) infinite;
}

@keyframes pixelFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes blockBounce {
    0% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}

@keyframes sparkle {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.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;
    }
}

/* ===== 像素·电玩派对 - 粗像素边框卡片 ===== */
.game-card,
.related-game {
    background: #FFFFFF;
    border: 3px solid #000000;
    box-shadow: 5px 5px 0 rgba(200, 200, 200, 0.9);
    overflow: hidden;
    transition: all 0.2s steps(2);
    position: relative;
    animation: pixelCardBounce 6s steps(4) infinite;
}

/* 触摸反馈 - 像素扫描线效果 */
.pixel-scan-overlay {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    z-index: 5;
    pointer-events: none;
    opacity: 0;
}

.game-card:active .pixel-scan-overlay,
.related-game:active .pixel-scan-overlay {
    animation: scanLine 0.3s steps(8) forwards;
}

@keyframes scanLine {
    0% { left: -100%; opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.game-card:hover,
.related-game:hover {
    transform: translate(-3px, -3px);
    box-shadow: 8px 8px 0 rgba(200, 200, 200, 1);
}

.game-card:hover img,
.related-game:hover img {
    transform: scale(1.05);
}

/* 触摸反馈 - 边框变亮+阴影加深 */
.game-card:active,
.related-game:active {
    box-shadow: 2px 2px 0 rgba(128, 128, 128, 1), inset 0 0 15px rgba(255, 255, 255, 0.95);
    animation: none !important;
    transition: all 0.1s steps(2);
}

/* 卡片像素级跳动动画 */
@keyframes pixelCardBounce {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 5px 5px 0 rgba(200, 200, 200, 0.9);
    }
    50% {
        transform: translateY(-3px);
        box-shadow: 7px 7px 0 rgba(200, 200, 200, 0.95);
    }
}

/* 标题文字 - 纯黑粗体+像素风格 */
.pixel-title {
    position: relative;
    display: inline-block;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

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.2s steps(2);
    background: linear-gradient(135deg, rgba(255,100,150,0.25), rgba(0,200,240,0.25), rgba(255,220,50,0.25));
    border: 3px solid #000;
    color: #000;
    position: relative;
    overflow: hidden;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
}

button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(200, 200, 200, 0.9);
}

img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s steps(4);
}

a {
    transition: all 0.2s steps(2);
}

::selection {
    background: linear-gradient(90deg, rgba(255, 100, 150, 0.4), rgba(0, 200, 240, 0.4));
    color: #000;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #E8ECF4;
    border-left: 2px solid #000;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 100, 150, 0.8), rgba(0, 200, 240, 0.8));
    border: 2px solid #000;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 100, 150, 1), rgba(0, 200, 240, 1));
}