* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F5F8FC;
    color: #2C3E50;
    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(180deg, #F5F8FC, #EDF2FA, #F0F4FB, #E8EEF8, #F5F8FC);
    background-size: 400% 400%;
    animation: auroraFlowBg 25s ease-in-out infinite;
    overflow: hidden;
}

@keyframes auroraFlowBg {
    0%   { background-position: 0% 50%; }
    25%  { background-position: 40% 80%; }
    50%  { background-position: 100% 50%; }
    75%  { background-position: 60% 20%; }
    100% { background-position: 0% 50%; }
}

/* 冰蓝色光点 */
.parchment-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 15%, rgba(176, 200, 232, 0.16) 4px, transparent 4px),
        radial-gradient(circle at 25% 78%, rgba(192, 208, 224, 0.14) 5px, transparent 5px),
        radial-gradient(circle at 42% 34%, rgba(168, 190, 216, 0.13) 4px, transparent 4px),
        radial-gradient(circle at 58% 66%, rgba(176, 200, 232, 0.18) 7px, transparent 7px),
        radial-gradient(circle at 73% 22%, rgba(192, 208, 224, 0.14) 4px, transparent 4px),
        radial-gradient(circle at 88% 84%, rgba(168, 190, 216, 0.16) 6px, transparent 6px),
        radial-gradient(circle at 15% 52%, rgba(176, 200, 232, 0.12) 3px, transparent 3px),
        radial-gradient(circle at 33% 85%, rgba(168, 190, 216, 0.14) 4px, transparent 4px),
        radial-gradient(circle at 50% 46%, rgba(192, 208, 224, 0.17) 5px, transparent 5px),
        radial-gradient(circle at 67% 18%, rgba(176, 200, 232, 0.12) 3px, transparent 3px),
        radial-gradient(circle at 82% 54%, rgba(192, 208, 224, 0.14) 4px, transparent 4px);
    animation: frostSparkles 14s ease-in-out infinite alternate;
}

@keyframes frostSparkles {
    0%   { opacity: 0.35; }
    25%  { opacity: 0.65; }
    50%  { opacity: 0.45; }
    75%  { opacity: 0.82; }
    100% { opacity: 0.55; }
}

/* 冰蓝色光带（模糊椭圆）以极慢速度漂移 */
.parchment-bg::after {
    content: '';
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(ellipse at 18% 22%, rgba(200,220,250,0.10) 0%, transparent 45%),
        radial-gradient(ellipse at 72% 68%, rgba(190,210,240,0.09) 0%, transparent 42%),
        radial-gradient(ellipse at 82% 28%, rgba(180,200,235,0.07) 0%, transparent 38%),
        radial-gradient(ellipse at 12% 78%, rgba(195,215,245,0.08) 0%, transparent 40%);
    animation: auroraBandDrift 35s ease-in-out infinite;
}

@keyframes auroraBandDrift {
    from { transform: translateX(-1.5%) translateY(-1%); }
    to   { transform: translateX(1.5%) translateY(1%); }
}

.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;
    }
}

/* ===== 漂浮冰晶动画（rotate ±0.3deg，周期9s）===== */
@keyframes cardFloat {
    0%, 100% { transform: rotate(var(--tilt, 0deg)) translateY(0px); }
    45% { transform: rotate(calc(var(--tilt, 0deg) * -1)) translateY(-3px); }
    90% { transform: rotate(calc(var(--tilt, 0deg) * 0.7)) translateY(1.5px); }
}

.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 32px rgba(176,200,232,0.24), 0 0 24px rgba(192,208,224,0.15), inset 0 0 10px rgba(255,255,255,0.08);
    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(176, 200, 232, 0.10) 45%,
        rgba(176, 200, 232, 0.20) 50%,
        rgba(176, 200, 232, 0.10) 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.06),
        0 4px 24px rgba(176, 200, 232, 0.22),
        0 0 36px rgba(176, 200, 232, 0.10);
}

/* ===== 触摸反馈 - 银蓝色光晕扩散 ===== */
.card-touch-ring {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    border-radius: 20px;
}
.game-card:active .card-touch-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #B0C8E8;
    transform: translate(-50%, -50%);
    animation: silverRingExpand 0.6s ease-out forwards;
    pointer-events: none;
}
@keyframes silverRingExpand {
    0% { width: 10px; height: 10px; opacity: 1; border-width: 3px; }
    100% { width: 280px; height: 280px; 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.35s ease;
    border-radius: 20px;
}

.related-game:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(176, 200, 232, 0.22), 0 0 22px rgba(192, 208, 224, 0.15);
}

button {
    transition: all 0.3s ease;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(176, 200, 232, 0.28);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    transition: all 0.3s ease;
}

::selection {
    background: rgba(176, 200, 232, 0.3);
    color: #2C3E50;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #EDF2FA;
}

::-webkit-scrollbar-thumb {
    background: rgba(176, 200, 232, 0.38);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(176, 200, 232, 0.58);
}