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

body {
    background: linear-gradient(145deg, #1a472a 0%, #0e2a1a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', 'Poppins', 'Courier New', monospace;
    padding: 20px;
}

.game-container {
    background: #1e2b1c;
    border-radius: 48px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.1);
    padding: 20px 25px 25px 25px;
    transition: all 0.2s;
}

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

.game-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #f9f3c1, #ffd966);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-bottom: 12px;
}

.score-panel {
    display: flex;
    justify-content: center;
    gap: 35px;
    background: #0f1f0c;
    padding: 8px 25px;
    border-radius: 60px;
    backdrop-filter: blur(2px);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5), 0 2px 3px rgba(255,255,200,0.1);
}

.score-box {
    display: flex;
    gap: 12px;
    background: #2c3e24;
    padding: 5px 20px;
    border-radius: 40px;
    font-weight: bold;
    color: #f2e8cf;
}

.label {
    font-size: 1rem;
    letter-spacing: 1px;
}

.value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffd966;
    text-shadow: 0 0 3px #ffb347;
    min-width: 55px;
    text-align: center;
}

.game-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

canvas {
    background-color: #1d2f1a;
    border-radius: 28px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(210, 180, 100, 0.4);
    display: block;
    cursor: pointer;
    width: 500px;
    height: 500px;
}

.game-controls {
    display: flex;
    gap: 35px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.restart-btn {
    background: #ffb347;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 8px 24px;
    border-radius: 60px;
    color: #2c2b1f;
    font-family: inherit;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.15s linear;
    box-shadow: 0 4px 0 #8b5a2b;
    transform: translateY(-2px);
}

.restart-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #8b5a2b;
}

.tip-text {
    background: #00000066;
    backdrop-filter: blur(4px);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #f2e8cf;
    letter-spacing: 1px;
}

.game-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 0.75rem;
    color: #bfd7b5;
    border-top: 1px dashed #4a6741;
    padding-top: 12px;
    font-weight: 500;
}

/* 手机触摸优化 */
@media (max-width: 580px) {
    .game-container {
        padding: 15px;
    }
    canvas {
        width: 100%;
        height: auto;
        max-width: 500px;
    }
    .score-box {
        padding: 3px 12px;
    }
    .value {
        font-size: 1.2rem;
        min-width: 40px;
    }
    .label {
        font-size: 0.8rem;
    }
    .game-header h1 {
        font-size: 1.5rem;
    }
}