* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent;
    color: #334155;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===== 星轨·气泡流光 - 彩虹极光彩带背景 ===== */
.star-orbit-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #F8F6FC;
    overflow: hidden;
}

/* 极光彩带 - 主层 */
.star-orbit-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 20%,
        rgba(255, 200, 180, 0.3) 30%,
        rgba(180, 210, 255, 0.3) 50%,
        rgba(220, 190, 255, 0.25) 70%,
        transparent 80%
    );
    animation: auroraFlow 15s ease-in-out infinite;
}

/* 极光彩带 - 副层（略偏移） */
.star-orbit-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 30%,
        rgba(180, 220, 255, 0.25) 40%,
        rgba(255, 190, 210, 0.25) 60%,
        transparent 70%
    );
    animation: auroraFlow2 20s ease-in-out infinite;
}

/* 星点粒子（使用多个 box-shadow 绘制） */
.star-orbit-bg .particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star-orbit-bg .particles::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(180, 190, 255, 0.8);
    border-radius: 50%;
    box-shadow:
        30px 60px 0 rgba(255, 200, 180, 0.6),
        80px 120px 0 rgba(180, 200, 255, 0.7),
        200px 35px 0 rgba(220, 180, 255, 0.5),
        280px 180px 0 rgba(255, 190, 170, 0.8),
        320px 80px 0 rgba(160, 210, 240, 0.6),
        60px 250px 0 rgba(255, 210, 190, 0.5),
        150px 200px 0 rgba(200, 180, 255, 0.7),
        250px 290px 0 rgba(180, 220, 200, 0.6),
        340px 250px 0 rgba(255, 180, 200, 0.7),
        10px 320px 0 rgba(170, 200, 255, 0.6),
        100px 350px 0 rgba(255, 190, 160, 0.5),
        210px 330px 0 rgba(190, 210, 255, 0.6),
        300px 60px 0 rgba(220, 170, 240, 0.7),
        130px 80px 0 rgba(180, 230, 220, 0.5),
        270px 140px 0 rgba(255, 200, 160, 0.6);
    animation: starTwinkle 3s ease-in-out infinite;
}

@keyframes auroraFlow {
    0% { transform: translateX(-25%); }
    50% { transform: translateX(25%); }
    100% { transform: translateX(-25%); }
}

@keyframes auroraFlow2 {
    0% { transform: translateX(25%); }
    50% { transform: translateX(-25%); }
    100% { transform: translateX(25%); }
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 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;
    }
}

/* ===== 星轨·气泡流光 - 纯白磨砂卡片动画（6秒周期浮动+自转）===== */
@keyframes cardFloat {
    0%, 100% { transform: rotate(var(--tilt, 0deg)) translateY(0px); }
    33% { transform: rotate(calc(var(--tilt, 0deg) + 1deg)) translateY(-4px); }
    66% { transform: rotate(calc(var(--tilt, 0deg) - 1deg)) translateY(2px); }
}

.game-card {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 24px;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: cardFloat var(--float-dur, 6s) ease-in-out var(--float-delay, 0s) infinite;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.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(220,180,255,0.18), 0 0 24px rgba(220,180,255,0.12), inset 0 0 10px rgba(220,180,255,0.08);
    animation-play-state: paused !important;
    backdrop-filter: blur(12px);
}

.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(220, 180, 255, 0.15) 45%,
        rgba(220, 180, 255, 0.25) 50%,
        rgba(220, 180, 255, 0.15) 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(220, 180, 255, 0.18),
        0 0 36px rgba(220, 180, 255, 0.12);
}

.card-star-ring {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    border-radius: 24px;
}
.game-card:active .card-star-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px dashed #DCB8FF;
    transform: translate(-50%, -50%);
    animation: starRingExpand 0.6s ease-out forwards;
    pointer-events: none;
}
@keyframes starRingExpand {
    0% { width: 10px; height: 10px; opacity: 1; border-width: 3px; transform: translate(-50%, -50%) rotate(0deg); }
    100% { width: 280px; height: 280px; opacity: 0; border-width: 0.5px; transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== 标题滚动闪烁光效 ===== */
@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: 24px;
}

.related-game:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(220,180,255,0.26), 0 0 22px rgba(220,180,255,0.18);
}

button {
    transition: all 0.3s ease;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(220,180,255,0.32);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    transition: all 0.3s ease;
}

::selection {
    background: rgba(220, 180, 255, 0.3);
    color: #334155;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #F8F6FC;
}

::-webkit-scrollbar-thumb {
    background: rgba(220, 180, 255, 0.38);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 180, 255, 0.58);
}