* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #edecea;
    color: #E8D5B5;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===== 液态黄金质感背景（明亮版） ===== */
.parchment-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(0deg, #db9550, #d8bc8d 15%, #e5b84c 30%, #d1bd87 45%, #e9c67f 60%, #6ad8a6 75%, #dcc690 90%, #dfd09e);
    background-size: 800% 800%;
    animation: liquidGoldFlow 18s ease-in-out infinite;
    overflow: hidden;
}

@keyframes liquidGoldFlow {
    0%   { background-position: 50% 0%; }
    14%  { background-position: 80% 35%; }
    28%  { background-position: 10% 70%; }
    43%  { background-position: 65% 90%; }
    57%  { background-position: 25% 50%; }
    71%  { background-position: 85% 20%; }
    86%  { background-position: 40% 75%; }
    100% { background-position: 50% 0%; }
}

/* 金色气泡从底部缓慢上升 */
.parchment-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 95%, rgba(255,215,0,0.28) 4px, transparent 4px),
        radial-gradient(circle at 25% 88%, rgba(218,165,32,0.24) 5px, transparent 5px),
        radial-gradient(circle at 42% 94%, rgba(184,134,11,0.20) 4px, transparent 4px),
        radial-gradient(circle at 58% 86%, rgba(255,215,0,0.34) 7px, transparent 7px),
        radial-gradient(circle at 73% 92%, rgba(205,133,63,0.22) 4px, transparent 4px),
        radial-gradient(circle at 88% 84%, rgba(218,165,32,0.26) 6px, transparent 6px),
        radial-gradient(circle at 15% 72%, rgba(255,215,0,0.18) 3px, transparent 3px),
        radial-gradient(circle at 33% 65%, rgba(184,134,11,0.22) 4px, transparent 4px),
        radial-gradient(circle at 50% 76%, rgba(218,165,32,0.26) 5px, transparent 5px),
        radial-gradient(circle at 67% 68%, rgba(255,215,0,0.19) 3px, transparent 3px),
        radial-gradient(circle at 82% 74%, rgba(205,133,63,0.22) 4px, transparent 4px);
    animation: goldBubblesRise 12s linear infinite;
}

@keyframes goldBubblesRise {
    0%   { transform: translateY(0) scale(1); opacity: 0; }
    8%   { opacity: 1; }
    50%  { opacity: 0.92; transform: translateY(-50vh) scale(1.15); }
    92%  { opacity: 0.65; transform: translateY(-110vh) scale(0.9); }
    100% { transform: translateY(-130vh) scale(0.8); opacity: 0; }
}

/* 倾斜纹理 + 大范围液态金色光晕 */
.parchment-bg::after {
    content: '';
    position: absolute;
    inset: -50%;
    background:
        repeating-linear-gradient(
            8deg,
            transparent,
            transparent 50px,
            rgba(255, 215, 0, 0.05) 50px,
            rgba(255, 215, 0, 0.05) 51px
        ),
        /* 主光晕 - 更强更明显 */
        radial-gradient(ellipse at 25% 18%, rgba(255,220,120,0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 72% 78%, rgba(230,190,100,0.10) 0%, transparent 42%),
        radial-gradient(ellipse at 85% 32%, rgba(210,170,80,0.08) 0%, transparent 38%),
        radial-gradient(ellipse at 15% 62%, rgba(240,200,110,0.07) 0%, transparent 40%);
    animation: subtleTextureRotate 200s linear infinite;
}

@keyframes subtleTextureRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(1deg); }
}

.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;
    }
}

/* ===== 金箔片漂浮 + ±0.5°摇摆动画 ===== */
@keyframes cardFloat {
    0%, 100% { transform: translateY(0px) rotate(var(--card-swing, 0deg)); }
    25% { transform: translateY(-6px) rotate(calc(var(--card-swing, 0deg) * -0.5)); }
    50% { transform: translateY(-3px) rotate(calc(var(--card-swing, 0deg) * 0.8)); }
    75% { transform: translateY(-8px) rotate(calc(var(--card-swing, 0deg) * -0.3)); }
}

/* 摆摆动画（周期10s，极慢）*/
@keyframes cardGentleSwing {
    0%, 100% { transform: rotate(var(--card-swing, 0deg)); }
    50% { transform: rotate(calc(var(--card-swing, 0deg) * -1)); }
}

.game-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.08);
    border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%;
    animation: 
        cardFloat var(--float-dur, 5s) ease-in-out var(--float-delay, 0s) infinite,
        cardGentleSwing 10s ease-in-out calc(var(--float-delay, 0s) + 2s) infinite;
}

.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) rotate(0deg) !important;
    border-color: rgba(255, 215, 0, 0.55);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35), 0 0 28px rgba(255, 215, 0, 0.18), inset 0 0 10px rgba(255,215,0,0.03);
    animation-play-state: paused !important;
}

.game-card:hover img {
    transform: scale(1.05);
    filter: brightness(0.72) contrast(1.08) saturate(0.92);
}

/* ===== 对角扫光动画 (8秒周期) ===== */
.card-sweep-light {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 215, 0, 0.08) 45%,
        rgba(255, 215, 0, 0.16) 50%,
        rgba(255, 215, 0, 0.08) 55%,
        transparent 80%
    );
    z-index: 8;
    pointer-events: none;
    animation: cardSweepGleam 8s ease-in-out infinite;
}

@keyframes cardSweepGleam {
    0%, 65% { left: -100%; opacity: 0; }
    72% { opacity: 1; }
    85% { left: 200%; opacity: 0; }
    100% { left: 200%; opacity: 0; }
}

/* ===== 触摸反馈 - 缩入效果 ===== */
.game-card:active {
    transform: scale(0.96) translateY(2px) !important;
    box-shadow: 
        inset 4px 4px 18px rgba(0, 0, 0, 0.4), 
        0 0 12px rgba(255, 215, 0, 0.1),
        0 0 24px rgba(255, 215, 0, 0.05);
}

/* ===== 触摸反馈 - 涟漪光晕扩散 ===== */
.card-touch-ring {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%;
}
.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; }
}

/* ===== 去除分割线，用交替金色渐变阴影区分层次 ===== */
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;
    }
}

.related-game {
    transition: all 0.4s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.08);
    border-radius: 70% 30% 30% 70% / 60% 40% 60% 40%;
}

.related-game:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.55);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 22px 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.3);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1408;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}