* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #E4F2F5;
    color: #1E383C;
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== 珊瑚·海底花园 - 动态珊瑚礁光影背景 ===== */
.coral-reef-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #E4F2F5;
    overflow: hidden;
}

/* 海底波纹 */
.coral-reef-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.3) 0px,
        rgba(255, 255, 255, 0.3) 1px,
        transparent 1px,
        transparent 6px
    );
    animation: rippleShift 8s linear infinite;
}

@keyframes rippleShift {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* 珊瑚橙大光斑 */
.coral-reef-bg::after {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255, 140, 100, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(85px);
    animation: coralGlow1 20s ease-in-out infinite;
    z-index: 1;
}

@keyframes coralGlow1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-15px, 20px) scale(1.2); }
}

/* 暖粉光斑 */
.coral-reef-bg .glow-pink {
    position: absolute;
    bottom: -10%;
    left: 5%;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 170, 150, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(90px);
    animation: coralGlow2 24s ease-in-out infinite;
    z-index: 2;
}

@keyframes coralGlow2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -15px) scale(1.15); }
}

/* 浅杏光斑 */
.coral-reef-bg .glow-apricot {
    position: absolute;
    top: 40%;
    left: 20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 200, 160, 0.45) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(75px);
    animation: coralGlow3 22s ease-in-out infinite;
    z-index: 2;
}

@keyframes coralGlow3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -10px) scale(1.25); }
}

/* 淡紫光斑（水底阴影）*/
.coral-reef-bg .glow-lavender {
    position: absolute;
    top: 50%;
    right: 15%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(200, 180, 210, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(70px);
    animation: coralGlow4 26s ease-in-out infinite;
    z-index: 2;
}

@keyframes coralGlow4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10px, 25px) scale(1.1); }
}

/* 漂浮微小气泡/鱼群光点 */
.coral-reef-bg .reef-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    box-shadow:
        30px 50px 0 rgba(255, 200, 150, 0.6),
        120px 150px 0 rgba(255, 140, 100, 0.5),
        250px 80px 0 rgba(255, 180, 130, 0.7),
        340px 220px 0 rgba(255, 160, 140, 0.4),
        60px 300px 0 rgba(200, 180, 210, 0.5),
        180px 320px 0 rgba(255, 200, 160, 0.6),
        290px 350px 0 rgba(255, 170, 150, 0.5),
        80px 180px 0 rgba(255, 220, 180, 0.4);
    animation: particleDrift 12s ease-in-out infinite;
    z-index: 3;
}
.coral-reef-bg .reef-particles::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    box-shadow:
        10px 80px 0 rgba(255, 255, 255, 0.5),
        160px 40px 0 rgba(255, 255, 255, 0.6),
        270px 180px 0 rgba(255, 255, 255, 0.4),
        330px 100px 0 rgba(255, 255, 255, 0.7),
        40px 250px 0 rgba(255, 255, 255, 0.5),
        200px 270px 0 rgba(255, 255, 255, 0.6);
    animation: particleDrift 14s ease-in-out infinite reverse;
}

@keyframes particleDrift {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-8px); opacity: 0.8; }
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 10px;
}

@media (min-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

/* ===== 珊瑚·海底花园 - 珊瑚形圆角装饰卡片 ===== */
.game-card,
.related-game {
    background: #FDF9F6;
    border-radius: 24px;
    box-shadow:
        0 6px 18px rgba(255,140,100,0.2),
        0 0 0 1px rgba(100,180,200,0.2);
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    animation: coralCardFloat 7s ease-in-out infinite;
}

@keyframes coralCardFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        box-shadow:
            0 6px 18px rgba(255,140,100,0.2),
            0 0 0 1px rgba(100,180,200,0.2);
    }
    50% {
        transform: translateY(-3px) rotate(0.5deg);
        box-shadow:
            0 10px 28px rgba(255,140,100,0.35),
            0 0 0 2px rgba(100,180,200,0.35);
    }
}

/* 左上角珊瑚枝形角标 */
.coral-badge {
    position: absolute;
    top: -2px;
    left: -2px;
    width: 32px;
    height: 38px;
    z-index: 10;
    pointer-events: none;
    border-radius: 55% 45% 60% 40% / 40% 60% 45% 55%;
    background: linear-gradient(135deg, var(--card-coral, #FF8C64), transparent);
    opacity: 0.55;
    transition: all 0.3s ease;
}

/* 触摸反馈 - 角标变亮 */
.game-card:active .coral-badge,
.related-game:active .coral-badge {
    transform: rotate(25deg);
    opacity: 1;
    background: linear-gradient(135deg, var(--card-coral, #FF8C64) 0%, #FFC8A0 100%);
}

.game-card:hover,
.related-game:hover {
    transform: translateY(-8px) rotate(-0.8deg);
    box-shadow:
        0 16px 40px rgba(255,140,100,0.4),
        0 0 0 3px solid rgba(255,170,150,0.4);
}

.game-card:hover img,
.related-game:hover img {
    transform: scale(1.08);
}

/* 触摸反馈 - 暖橙光波扫过+气泡扩散 */
.game-card:active,
.related-game:active {
    box-shadow:
        4px 4px 20px rgba(255,140,100,0.5),
        inset 0 0 30px rgba(255,180,120,0.25),
        0 0 0 3px solid rgba(255,170,150,0.45);
    animation: none !important;
    transition: all 0.2s ease;
    transform: scale(0.98);
}

.game-card:active::after,
.related-game:active::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 180, 130, 0.95),
        transparent
    );
    z-index: 10;
    pointer-events: none;
    opacity: 1;
    animation: coralWaveSweep 0.6s ease-out forwards;
}

@keyframes coralWaveSweep {
    0% { left: -100%; opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* 标题文字 - 深蓝绿+珊瑚小图标前缀 */
.coral-title {
    position: relative;
    display: inline-block;
    font-weight: 500;
    color: #1E383C;
    letter-spacing: 0.3px;
}

.coral-title::before {
    content: '🪸';
    margin-right: 5px;
    font-size: 0.9em;
}

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;
    }
}

button {
    transition: all 0.4s ease;
    background: linear-gradient(135deg, rgba(255,140,100,0.2), rgba(255,170,150,0.2));
    border: 2px solid #FF8C64;
    color: #1E383C;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    cursor: pointer;
    border-radius: 50px;
    box-shadow: 3px 3px 10px rgba(255,140,100,0.25);
}

button:hover {
    transform: translateY(-2px);
    box-shadow:
        5px 5px 15px rgba(255,140,100,0.35),
        0 0 15px rgba(255,170,150,0.3);
    border-color: #FFAA96;
}

img {
    max-width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

a {
    transition: all 0.4s ease;
    color: #2D4548;
}

a:hover {
    color: #FF8C64;
}

::selection {
    background: rgba(255, 140, 100, 0.35);
    color: #fff;
}

::-webkit-scrollbar {
    width: 14px;
}

::-webkit-scrollbar-track {
    background: #E4F2F5;
    border-left: 2px solid rgba(255, 120, 90, 0.15);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255,140,100,0.7), rgba(255,170,150,0.7));
    border-radius: 7px;
    border: 2px solid rgba(200, 180, 210, 0.35);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255,140,100,0.9), rgba(255,170,150,0.9));
}