* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #F2E0CE;
    color: #4A3028;
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== 沙丘·暮光流金 - 动态沙丘暮光背景 ===== */
.desert-dusk-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #F2E0CE;
    overflow: hidden;
}

/* 暮光光斑 - 深橙 */
.desert-dusk-bg::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(240, 140, 80, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(90px);
    animation: duskGlow1 22s ease-in-out infinite;
}

@keyframes duskGlow1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-15px, 25px) scale(1.2); }
}

/* 暮光光斑 - 玫瑰金 */
.desert-dusk-bg::after {
    content: '';
    position: absolute;
    bottom: -8%;
    left: -5%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(230, 150, 130, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(95px);
    animation: duskGlow2 26s ease-in-out infinite;
}

@keyframes duskGlow2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -15px) scale(1.15); }
}

/* 暮光光斑 - 淡紫 */
.desert-dusk-bg .glow-lavender {
    position: absolute;
    top: 40%;
    left: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(180, 150, 180, 0.45) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    animation: duskGlow3 24s ease-in-out infinite;
}

@keyframes duskGlow3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -10px) scale(1.25); }
}

/* 沙丘曲线层1 */
.desert-dusk-bg .dune-1 {
    position: absolute;
    bottom: 20%;
    left: -10%;
    width: 120%;
    height: 300px;
    background: radial-gradient(ellipse at 50% 100%, rgba(190, 140, 100, 0.3) 0%, transparent 70%);
    border-radius: 50% 50% 0 0;
    filter: blur(30px);
    animation: duneShift1 16s ease-in-out infinite;
}

@keyframes duneShift1 {
    0%, 100% { transform: translateX(0) scale(1); }
    50% { transform: translateX(3%) scale(1.03); }
}

/* 沙丘曲线层2 */
.desert-dusk-bg .dune-2 {
    position: absolute;
    bottom: 30%;
    right: -15%;
    width: 130%;
    height: 250px;
    background: radial-gradient(ellipse at 40% 100%, rgba(210, 160, 110, 0.25) 0%, transparent 70%);
    border-radius: 40% 60% 0 0;
    filter: blur(35px);
    animation: duneShift2 20s ease-in-out infinite;
}

@keyframes duneShift2 {
    0%, 100% { transform: translateX(0) scale(1); }
    50% { transform: translateX(-3%) scale(1.02); }
}

/* 金色沙粒层 */
.desert-dusk-bg .gold-sand {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    box-shadow:
        30px 60px 0 rgba(230, 180, 130, 0.6),
        120px 200px 0 rgba(200, 150, 100, 0.5),
        250px 80px 0 rgba(220, 170, 120, 0.7),
        340px 250px 0 rgba(180, 130, 90, 0.5),
        80px 300px 0 rgba(240, 190, 140, 0.6),
        200px 350px 0 rgba(210, 160, 110, 0.5),
        310px 150px 0 rgba(190, 140, 100, 0.6),
        60px 180px 0 rgba(230, 180, 130, 0.5),
        170px 50px 0 rgba(200, 150, 100, 0.7),
        280px 300px 0 rgba(220, 170, 120, 0.6);
    animation: sandFloat 12s ease-in-out infinite;
}
.desert-dusk-bg .gold-sand::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    box-shadow:
        15px 90px 0 rgba(255, 220, 170, 0.5),
        100px 30px 0 rgba(255, 210, 160, 0.6),
        220px 120px 0 rgba(255, 200, 150, 0.5),
        300px 200px 0 rgba(255, 230, 180, 0.4),
        40px 240px 0 rgba(255, 190, 140, 0.5),
        180px 280px 0 rgba(255, 220, 170, 0.6);
    animation: sandFloat 14s ease-in-out infinite reverse;
}

@keyframes sandFloat {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-6px); 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: #FDF8F2;
    border-radius: 24px;
    box-shadow: 4px 6px 20px rgba(180, 130, 90, 0.25);
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    animation: desertCardFloat 8s ease-in-out infinite;
}

@keyframes desertCardFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        box-shadow: 4px 6px 20px rgba(180, 130, 90, 0.25);
    }
    50% {
        transform: translateY(-4px) rotate(0.5deg);
        box-shadow: 6px 10px 28px rgba(180, 130, 90, 0.35);
    }
}

/* 左上角沙粒圆点角标 */
.desert-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-desert, #C86A30), transparent);
    opacity: 0.55;
    transition: all 0.3s ease;
}

/* 触摸反馈 - 角标变亮 */
.game-card:active .desert-badge,
.related-game:active .desert-badge {
    transform: rotate(25deg);
    opacity: 1;
    background: linear-gradient(135deg, var(--card-desert, #C86A30) 0%, #E69682 100%);
}

.game-card:hover,
.related-game:hover {
    transform: translateY(-8px) rotate(-0.8deg);
    box-shadow:
        8px 14px 35px rgba(180, 130, 90, 0.4),
        0 0 0 3px solid rgba(220, 170, 110, 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(180, 130, 90, 0.5),
        inset 0 0 30px rgba(240, 140, 80, 0.25),
        0 0 0 3px solid rgba(220, 170, 110, 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(240, 160, 100, 0.95),
        transparent
    );
    z-index: 10;
    pointer-events: none;
    opacity: 1;
    animation: desertDuskSweep 0.6s ease-out forwards;
}

@keyframes desertDuskSweep {
    0% { left: -100%; opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* 标题文字 - 深赭色+小沙粒圆点前缀 */
.desert-card-title {
    position: relative;
    display: inline-block;
    font-weight: 500;
    color: #4A3028;
    letter-spacing: 0.3px;
}

.desert-card-title::before {
    content: '●';
    margin-right: 5px;
    font-size: 0.8em;
    color: #C86A30;
}

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(240, 140, 80, 0.25), rgba(230, 150, 130, 0.25));
    border: 2px solid rgba(220, 170, 110, 0.6);
    color: #4A3028;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    cursor: pointer;
    border-radius: 50px;
    box-shadow: 3px 3px 10px rgba(180, 130, 90, 0.25);
}

button:hover {
    transform: translateY(-2px);
    box-shadow:
        5px 5px 15px rgba(180, 130, 90, 0.35),
        0 0 15px rgba(220, 170, 110, 0.3);
    border-color: #B496B4;
}

img {
    max-width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

a {
    transition: all 0.4s ease;
    color: #5C3D2E;
}

a:hover {
    color: #C86A30;
}

::selection {
    background: rgba(240, 140, 80, 0.35);
    color: #fff;
}

::-webkit-scrollbar {
    width: 14px;
}

::-webkit-scrollbar-track {
    background: #F2E0CE;
    border-left: 2px solid rgba(220, 170, 110, 0.15);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(240, 140, 80, 0.7), rgba(230, 150, 130, 0.7));
    border-radius: 7px;
    border: 2px solid rgba(180, 150, 180, 0.35);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(240, 140, 80, 0.9), rgba(230, 150, 130, 0.9));
}