* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

/* PC端适配 - 横屏优化 */
@media (min-width: 801px) {
    #game-container {
        max-width: 600px;
        max-height: 80vh;
        border-radius: 20px;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
        margin-top: 10vh;
    }
    
    .screen h1 {
        font-size: 2em;
    }
}

/* 移动端优化 */
@media (max-width: 500px) {
    #game-container {
        max-width: 100vw;
    }
    
    .screen h1 {
        font-size: 1.8em;
    }
    
    .screen p {
        font-size: 1em;
    }
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 100%);
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    z-index: 10;
}

.hidden {
    display: none !important;
}

.screen h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.screen p {
    font-size: 1.2em;
    margin: 10px 0;
    opacity: 0.9;
}

.screen button {
    margin-top: 30px;
    padding: 15px 40px;
    font-size: 1.3em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.screen button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#game-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 5;
}

#score-display {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1.2em;
    font-weight: bold;
}

@media (max-height: 500px) {
    .screen h1 {
        font-size: 1.8em;
    }
    
    .screen p {
        font-size: 1em;
    }
    
    .screen button {
        font-size: 1.1em;
        padding: 12px 30px;
    }
}
