* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-card: rgba(18, 18, 42, 0.8);
    --neon-green: #00ff88;
    --neon-pink: #ff00ff;
    --neon-blue: #00ccff;
    --neon-yellow: #ffff00;
    --neon-red: #ff3366;
    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
    --border-glow: rgba(0, 255, 136, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Orbitron', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 160px 120px, #fff, transparent),
        radial-gradient(2px 2px at 200px 50px, rgba(0,255,136,0.6), transparent),
        radial-gradient(1px 1px at 250px 150px, #fff, transparent),
        radial-gradient(2px 2px at 300px 100px, rgba(255,0,255,0.4), transparent);
    background-size: 350px 200px;
    animation: twinkle 8s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.game-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.neon-text {
    color: var(--neon-green);
    text-shadow: 
        0 0 5px var(--neon-green),
        0 0 10px var(--neon-green),
        0 0 20px var(--neon-green),
        0 0 40px var(--neon-green);
    animation: neonFlicker 3s infinite alternate;
}

.neon-text.pink {
    color: var(--neon-pink);
    text-shadow: 
        0 0 5px var(--neon-pink),
        0 0 10px var(--neon-pink),
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-pink);
    animation-delay: 0.5s;
}

@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        opacity: 1;
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 40px currentColor;
    }
    20%, 24%, 55% {
        opacity: 0.8;
        text-shadow: none;
    }
}

.main-content {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
}

.game-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-bar {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 24px;
    text-align: center;
    min-width: 100px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    display: block;
    font-family: 'Press Start 2P', cursive;
    font-size: 1.25rem;
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green);
}

.canvas-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(0, 255, 136, 0.2),
        0 0 60px rgba(0, 255, 136, 0.1),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--neon-green);
}

#gameCanvas {
    display: block;
    background: #050510;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 5, 16, 0.9);
    backdrop-filter: blur(5px);
    z-index: 10;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.overlay-content {
    text-align: center;
    padding: 40px;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.snake-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.overlay-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8rem;
    color: var(--neon-green);
    text-shadow: 0 0 20px var(--neon-green);
    margin-bottom: 20px;
}

.overlay-title.red {
    color: var(--neon-red);
    text-shadow: 0 0 20px var(--neon-red);
}

.overlay-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.rules {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.rule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: var(--glass-bg);
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.rule-icon {
    font-size: 1.2rem;
}

.neon-btn {
    position: relative;
    padding: 14px 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    background: transparent;
    border: 2px solid var(--neon-green);
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.neon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    transition: left 0.5s ease;
}

.neon-btn:hover::before {
    left: 100%;
}

.neon-btn:hover {
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 
        0 0 10px var(--neon-green),
        0 0 20px var(--neon-green),
        inset 0 0 10px rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
}

.neon-btn:active {
    transform: translateY(0);
}

.neon-btn.primary {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 204, 255, 0.2));
    box-shadow: 
        0 0 15px rgba(0, 255, 136, 0.3),
        inset 0 0 15px rgba(0, 255, 136, 0.1);
}

.neon-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--text-secondary);
}

.neon-btn.disabled:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
}

.final-score {
    margin-bottom: 20px;
}

.final-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.final-value {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    color: var(--neon-pink);
    text-shadow: 
        0 0 10px var(--neon-pink),
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-pink);
    animation: scorePop 0.5s ease;
}

@keyframes scorePop {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.new-record {
    display: inline-block;
    font-size: 1.2rem;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow);
    animation: pulse 1s infinite;
    margin-bottom: 25px;
}

.revive-countdown {
    font-family: 'Press Start 2P', cursive;
    font-size: 3rem;
    color: var(--neon-green);
    text-shadow: 0 0 20px var(--neon-green);
    margin: 20px 0;
    animation: scorePop 0.5s ease;
}

.new-record.hidden {
    display: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.controls-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
}

.control-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.3rem;
}

.mobile-controls {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.mobile-row {
    display: flex;
    gap: 8px;
}

.mobile-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-btn:active {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--neon-green);
    transform: scale(0.95);
}

.bottom-ad {
    display: flex;
    justify-content: center;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 300px;
}

.sidebar-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.card-header {
    margin-bottom: 12px;
}

.card-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 255, 136, 0.15);
    color: var(--neon-green);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.card-badge.pink {
    background: rgba(255, 0, 255, 0.15);
    color: var(--neon-pink);
    border-color: rgba(255, 0, 255, 0.3);
}

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.1), rgba(0, 204, 255, 0.1));
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.ad-placeholder.vertical {
    height: 250px;
}

.ad-placeholder.horizontal {
    height: 90px;
    width: 100%;
    max-width: 728px;
}

.ad-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 1;
}

.ad-deco {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.1) 0%, transparent 70%);
    top: -50%;
    right: -30%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, 20px); }
}

.donate-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.donate-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.donate-tab.active {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--neon-green);
    color: var(--neon-green);
}

.donate-tab[data-type="alipay"].active {
    background: rgba(0, 204, 255, 0.1);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.tab-icon {
    font-size: 1rem;
}

.donate-qr {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
    width: 100%;
    height: 180px;
}

.qr-img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 12px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qr-img.active {
    opacity: 1;
}

.donate-tip {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* 赞赏码显示/隐藏 - 仅在主菜单、暂停、结算时显示 */
#donateCard {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

body:not(.welcome):not(.paused):not(.gameover) #donateCard {
    opacity: 0.3;
    pointer-events: none;
    transform: scale(0.95);
}

body.welcome #donateCard,
body.paused #donateCard,
body.gameover #donateCard {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* 游戏结束按钮组 */
.gameover-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.gameover-buttons .neon-btn {
    width: 100%;
    padding: 14px 24px;
}

.neon-btn.secondary {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.2), rgba(0, 204, 255, 0.2));
    border-color: var(--neon-pink);
    box-shadow: 
        0 0 15px rgba(255, 0, 255, 0.3),
        inset 0 0 15px rgba(255, 0, 255, 0.1);
}

.neon-btn.secondary:hover {
    background: rgba(255, 0, 255, 0.2);
    box-shadow: 
        0 0 20px rgba(255, 0, 255, 0.5),
        inset 0 0 20px rgba(255, 0, 255, 0.2);
}

/* 广告占位符 - Google AdSense 规范 */
.ad-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.ad-content-area {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-compliance-tip {
    position: absolute;
    bottom: 4px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-placeholder.vertical .ad-label {
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.ad-placeholder.horizontal .ad-label {
    font-size: 0.7rem;
    margin-bottom: 4px;
}

/* 可跳过的插页广告 */
.interstitial-ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.interstitial-ad-overlay.hidden {
    display: none;
}

.interstitial-ad-content {
    width: 95%;
    max-width: 500px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--neon-blue);
    box-shadow: 
        0 0 40px rgba(0, 204, 255, 0.3),
        0 0 80px rgba(0, 204, 255, 0.1);
    animation: adSlideIn 0.4s ease;
}

@keyframes adSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.interstitial-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(90deg, rgba(0, 204, 255, 0.2), rgba(255, 0, 255, 0.2));
    border-bottom: 1px solid var(--glass-border);
}

.interstitial-ad-badge {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(0, 204, 255, 0.2);
    color: var(--neon-blue);
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.interstitial-close-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--neon-pink);
    border-radius: 50%;
    color: var(--neon-pink);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 700;
    min-width: 44px;
    min-height: 44px;
}

.interstitial-close-btn:hover {
    background: rgba(255, 0, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.interstitial-ad-body {
    padding: 20px;
}

.interstitial-ad-mockup {
    text-align: center;
}

.interstitial-ad-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.interstitial-games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.interstitial-game-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.interstitial-game-item:hover {
    border-color: var(--neon-green);
    transform: translateY(-2px);
}

.game-thumb {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 10px;
}

.game-info {
    flex: 1;
}

.game-name {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.game-plays {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.interstitial-ad-tip {
    padding: 10px;
    background: rgba(255, 255, 0, 0.1);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--neon-yellow);
    margin-top: 12px;
}

/* 激励视频广告 */
.rewarded-ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.rewarded-ad-overlay.hidden {
    display: none;
}

.rewarded-ad-content {
    width: 90%;
    max-width: 400px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--neon-pink);
    box-shadow: 
        0 0 40px rgba(255, 0, 255, 0.3),
        0 0 80px rgba(255, 0, 255, 0.1);
    animation: adPop 0.4s ease;
}

.rewarded-ad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(90deg, rgba(255, 0, 255, 0.2), rgba(255, 255, 0, 0.2));
    border-bottom: 1px solid var(--glass-border);
}

.rewarded-ad-badge {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 0, 255, 0.2);
    color: var(--neon-pink);
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rewarded-progress-ring {
    position: relative;
    width: 40px;
    height: 40px;
}

.rewarded-svg {
    width: 40px;
    height: 40px;
    transform: rotate(-90deg);
}

.rewarded-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.rewarded-progress {
    fill: none;
    stroke: var(--neon-pink);
    stroke-width: 3;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.rewarded-time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
}

.rewarded-ad-body {
    padding: 30px 20px;
}

.rewarded-ad-mockup {
    text-align: center;
}

.rewarded-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.rewarded-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--neon-pink);
}

.rewarded-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.rewarded-desc small {
    display: block;
    margin-top: 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.rewarded-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.rewarded-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-yellow));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.rewarded-status {
    font-size: 0.85rem;
    color: var(--neon-green);
    font-weight: 700;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* 响应式调整 */
@media (max-width: 1000px) {
    .main-content {
        flex-direction: column;
        align-items: center;
    }

    .sidebar {
        width: 100%;
        max-width: 600px;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-card {
        flex: 1;
        min-width: 280px;
    }

    .interstitial-games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .game-title {
        font-size: 1.5rem;
    }

    .canvas-wrapper {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    #gameCanvas {
        width: 100%;
        height: auto;
    }

    .mobile-controls {
        display: flex;
    }

    .sidebar {
        flex-direction: column;
    }

    .sidebar-card {
        min-width: auto;
    }

    .overlay-content {
        padding: 20px 16px;
        max-height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .overlay-title {
        font-size: 1.1rem;
        margin-bottom: 14px;
    }

    .snake-icon {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }

    .overlay-desc {
        font-size: 0.8rem;
        margin-bottom: 16px;
    }

    .rules {
        gap: 8px;
        margin-bottom: 20px;
    }

    .rule-item {
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    .rule-icon {
        font-size: 1rem;
    }

    .neon-btn {
        padding: 12px 28px;
        font-size: 0.85rem;
    }

    .final-score {
        margin-bottom: 14px;
    }

    .final-value {
        font-size: 2rem;
    }

    .new-record {
        font-size: 1rem;
        margin-bottom: 16px;
    }

    .stat-card {
        padding: 8px 12px;
        min-width: 70px;
    }

    .stat-value {
        font-size: 0.9rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .gameover-buttons {
        gap: 10px;
        margin-top: 16px;
    }

    .gameover-buttons .neon-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .interstitial-games-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 450px) {
    .game-container {
        padding: 10px;
    }

    .game-title {
        font-size: 1.2rem;
    }

    .controls-bar {
        flex-wrap: wrap;
    }

    .overlay-content {
        padding: 16px 12px;
    }

    .overlay-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .snake-icon {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .overlay-desc {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }

    .rules {
        gap: 6px;
        margin-bottom: 16px;
    }

    .rule-item {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .rule-icon {
        font-size: 0.9rem;
    }

    .neon-btn {
        padding: 10px 24px;
        font-size: 0.8rem;
    }

    .final-value {
        font-size: 1.6rem;
    }

    .new-record {
        font-size: 0.9rem;
    }
}

.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}
