* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(ellipse at 30% 50%, #2a1a3a 0%, #0a0a10 70%);
    background-size: 200% 200%;
    animation: nebulaDrift 120s ease-in-out infinite;
    color: #E0E0E0;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

.parchment-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse at 30% 50%, #2a1a3a 0%, #0a0a10 70%);
    background-size: 200% 200%;
    animation: nebulaDrift 120s ease-in-out infinite;
}

@keyframes nebulaDrift {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 30%; }
    50% { background-position: 100% 60%; }
    75% { background-position: 50% 80%; }
    100% { background-position: 0% 50%; }
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 10px;
}

@media (min-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* ===== 零重力漂浮动画 ===== */
@keyframes cardFloat {
    0%, 100% { transform: translateY(0px); }
    25% { transform: translateY(-6px); }
    50% { transform: translateY(-3px); }
    75% { transform: translateY(-8px); }
}

.game-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 0 0.5px rgba(255, 215, 0, 0.15);
    animation: cardFloat var(--float-dur, 5s) ease-in-out var(--float-delay, 0s) infinite;
}

/* 通过 JS 设置随机浮动时长 */
.game-card[data-float-dur] {
    --float-dur: calc(attr(data-float-dur) * 1s);
    --float-delay: calc(attr(data-float-delay) * 1s);
}

.game-card:hover {
    transform: translateY(-6px) scale(1.02) !important;
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 25px rgba(255, 215, 0, 0.15);
    animation-play-state: paused;
}

.game-card:hover img {
    transform: scale(1.05);
    filter: brightness(0.75) contrast(1.1) saturate(0.9);
}

/* ===== 触摸反馈 - 金环扩散 ===== */
.card-touch-ring {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    pointer-events: none;
    z-index: 10;
}
.game-card:active .card-touch-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #FFD700;
    transform: translate(-50%, -50%);
    animation: goldRingExpand 0.6s ease-out forwards;
    pointer-events: none;
}
@keyframes goldRingExpand {
    0% { width: 10px; height: 10px; opacity: 1; border-width: 3px; }
    100% { width: 250px; height: 250px; opacity: 0; border-width: 0.5px; }
}

/* ===== 标题金色滚动闪烁光效 ===== */
@keyframes titleShine {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.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;
    }
}

.related-game {
    transition: all 0.4s ease;
    box-shadow: 0 0 0 0.5px rgba(255, 215, 0, 0.15);
}

.related-game:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.15);
}

button {
    transition: all 0.3s ease;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.2);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    transition: all 0.3s ease;
}

::selection {
    background: rgba(255, 215, 0, 0.25);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0A0A0A;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}