* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent;
    color: #2C3E50;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===== 银穹·极光白钻 - 冷白基底 + 流动极光虹彩 ===== */
.rainbow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: linear-gradient(180deg, #EDF2F7, #E5ECF4, #EAF0F8, #E0E8F2, #EDF2F7);
    background-size: 400% 400%;
    animation: baseShift 25s ease infinite;
    overflow: hidden;
}

@keyframes baseShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 旋转虹彩光环 - conic-gradient 叠加冰蓝、淡紫、浅青，18秒旋转 */
.rainbow-bg::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: conic-gradient(
        from 0deg,
        rgba(180, 210, 250, 0.5),
        rgba(200, 180, 235, 0.5),
        rgba(160, 210, 240, 0.5),
        rgba(180, 210, 250, 0.5)
    );
    animation: rotateHue 18s linear infinite;
    filter: blur(60px);
}

@keyframes rotateHue {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 独立光斑1 - 淡蓝色，22秒周期漂移缩放 */
.rainbow-bg::after {
    content: '';
    position: absolute;
    top: 20%;
    left: 30%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(170, 200, 245, 0.65) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatBlob1 22s ease-in-out infinite;
    filter: blur(40px);
}

@keyframes floatBlob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -30px) scale(1.2); }
    50% { transform: translate(-20px, 50px) scale(0.9); }
    75% { transform: translate(-50px, -20px) scale(1.1); }
}

/* 独立光斑2 - 淡紫色，20秒周期 */
.blob-2 {
    position: absolute;
    bottom: 15%;
    right: 20%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(200, 170, 225, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatBlob2 20s ease-in-out infinite;
    filter: blur(45px);
}

@keyframes floatBlob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, -40px) scale(1.3); }
    66% { transform: translate(25px, 30px) scale(0.8); }
}

/* 独立光斑3 - 浅青色，24秒周期 */
.blob-3 {
    position: absolute;
    top: 50%;
    left: 10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(140, 215, 240, 0.55) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatBlob3 24s ease-in-out infinite;
    filter: blur(42px);
}

@keyframes floatBlob3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, -20px) scale(1.2); }
}

.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);
}