* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #1a1a2e;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #16213e;
    transition: opacity 0.3s ease;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* 开始界面样式 */
h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    animation: glow 2s ease-in-out infinite alternate;
}

h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #e94560;
    text-shadow: 0 0 10px rgba(233, 69, 96, 0.8);
}

button {
    background-color: #0f3460;
    color: #ffffff;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 5px;
    margin: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

button:hover {
    background-color: #1e5f8b;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

button:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.game-info {
    background-color: rgba(15, 52, 96, 0.8);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
    max-width: 400px;
    text-align: left;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.game-info p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

/* 游戏界面样式 */
#game-screen {
    background-color: #000000;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 1rem;
    padding: 1rem;
}

#game-canvas {
    border: 3px solid #0f3460;
    background-color: #2d3436;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    border-radius: 5px;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 600px;
    background-color: rgba(15, 52, 96, 0.9);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.game-stats div {
    font-size: 1.2rem;
    font-weight: bold;
}

#pause-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: #e94560;
}

#pause-btn:hover {
    background-color: #d4324e;
}

/* 游戏结束界面样式 */
#game-over-screen p {
    font-size: 1.5rem;
    margin: 1rem 0;
}

#restart-btn {
    background-color: #10ac84;
}

#restart-btn:hover {
    background-color: #0e9472;
}

/* 暂停界面样式 */
#exit-btn {
    background-color: #e94560;
}

#exit-btn:hover {
    background-color: #d4324e;
}

/* 动画效果 */
@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(0, 255, 255, 0.5), 0 0 20px rgba(0, 255, 255, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(0, 255, 255, 0.8), 0 0 30px rgba(0, 255, 255, 0.8), 0 0 40px rgba(0, 255, 255, 0.8);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    #game-canvas {
        max-width: 100%;
        height: auto;
    }
    
    .game-stats div {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .game-info {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .game-info p {
        font-size: 1rem;
    }
}