* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #FFFDF7;
    color: #6B5012;
    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:
        /* 基底乳酪白 */
        #FFF9F0,
        /* 柔和金色渐变条纹 */
        repeating-linear-gradient(
            90deg,
            #FFF9F0 0px,
            #FFF3E0 2px,
            #FFF9F0 4px
        );
    background-size: 200% 100%;
    animation: stripeDrift 25s linear infinite;
}

@keyframes stripeDrift {
    0% { background-position-x: 0; }
    100% { background-position-x: 200%; }
}

/* ===== 柔和金色光晕装饰 ===== */
.parchment-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        /* 左上暖光 */
        radial-gradient(ellipse at 20% 15%, rgba(255,248,220,0.5) 0%, transparent 50%),
        /* 右下柔金 */
        radial-gradient(ellipse at 80% 85%, rgba(232,201,107,0.12) 0%, transparent 45%),
        /* 中央微光 */
        radial-gradient(circle at 50% 50%, rgba(212,168,67,0.04) 0%, transparent 60%);
    animation: softGlowPulse 8s ease-in-out infinite alternate;
}

@keyframes softGlowPulse {
    0%   { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ===== 柔和金点装饰 ===== */
.parchment-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        /* 稀疏暖色光点 */
        radial-gradient(circle at 10% 15%, rgba(255, 245, 210, 0.7) 1.5px, transparent 2.5px),
        radial-gradient(circle at 25% 70%, rgba(255, 238, 190, 0.6) 2px, transparent 3px),
        radial-gradient(circle at 45% 25%, rgba(255, 240, 200, 0.55) 1.5px, transparent 2.5px),
        radial-gradient(circle at 60% 75%, rgba(255, 243, 205, 0.65) 2px, transparent 3px),
        radial-gradient(circle at 78% 20%, rgba(255, 237, 195, 0.58) 1.5px, transparent 2.5px),
        radial-gradient(circle at 90% 60%, rgba(255, 241, 198, 0.62) 2px, transparent 3px);
    animation: softSparkle 12s ease-in-out infinite alternate;
}

@keyframes softSparkle {
    0%   { opacity: 0.5; }
    50%  { opacity: 0.85; }
    100% { opacity: 0.6; }
}

/* ===== 柔和顶部光晕 ===== */
body::before {
    content: '';
    position: fixed;
    top: -15%;
    left: -10%;
    width: 120%;
    height: 130%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 50% -5%, rgba(255,248,230,0.15) 0%, transparent 60%);
    animation: topGlowBreath 16s ease-in-out infinite alternate;
}

@keyframes topGlowBreath {
    0%   { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ===== 微弱环境装饰 ===== */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse at 15% 85%, rgba(232,201,107,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 15%, rgba(212,168,67,0.03) 0%, transparent 45%);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 10px;
    scroll-snap-type: x proximity;
}

@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: rotate(var(--tilt, 0deg)) translateY(0px); }
    45% { transform: rotate(calc(var(--tilt, 0deg) * -1)) translateY(-4px); }
    90% { transform: rotate(calc(var(--tilt, 0deg) * 0.7)) translateY(2px); }
}

.game-card {
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 20px;
    animation: cardFloat var(--float-dur, 9s) ease-in-out var(--float-delay, 0s) infinite;
    cursor: pointer;
}

.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;
    box-shadow: 0 12px 28px rgba(212,168,67,0.20), 0 4px 16px rgba(232,201,107,0.10);
    animation-play-state: paused !important;
}

.game-card:hover img {
    transform: scale(1.03);
}

/* ===== 对角扫光动画 (8秒周期) - 金色 ===== */
.card-sweep-light {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(212, 168, 67, 0.08) 45%,
        rgba(212, 168, 67, 0.18) 50%,
        rgba(212, 168, 67, 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.98) translateY(2px) rotate(0deg) !important;
    box-shadow:
        inset 4px 4px 18px rgba(0, 0, 0, 0.04),
        0 4px 24px rgba(212, 168, 67, 0.22),
        0 0 36px rgba(212, 168, 67, 0.10);
}

.card-touch-petal {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    border-radius: 20px;
}
.game-card:active .card-touch-petal::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 0 #D4A843;
    animation: petalBurstExpand 0.6s ease-out forwards;
    transform: translate(-50%, -50%);
}

@keyframes petalBurstExpand {
    0% { box-shadow: 0 0 0 0 rgba(212,168,67,0.5); opacity: 1; }
    100% { box-shadow: 0 0 0 35px rgba(212,168,67,0), 0 0 0 55px rgba(232,201,107,0); opacity: 0; }
}

/* ===== 标题滚动闪烁光效 ===== */
@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.35s ease;
    border-radius: 20px;
}

.related-game:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(212, 168, 67, 0.18), 0 4px 12px rgba(232, 201, 107, 0.10);
}

button {
    transition: all 0.3s ease;
}

/* 轮廓香槟金线框按钮 - 药丸形 */
.gem-btn-outline:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 28px rgba(212, 168, 67, 0.22);
    background: rgba(212, 168, 67, 0.08);
}
.gem-btn-outline:active {
    background: linear-gradient(135deg, #D4A843, #E8C96B);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.28);
    transform: scale(0.98);
}

button:not(.gem-btn-outline):hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(212, 168, 67, 0.28);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    transition: all 0.3s ease;
}

::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #8B6914;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #FFF5E8;
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 67, 0.38);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 67, 0.58);
}