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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #1a1a2e;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    touch-action: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#game {
    display: block;
    background: linear-gradient(180deg, #87CEEB 0%, #E0F6FF 100%);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    max-width: 100%;
    max-height: 100%;
}

#score {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    text-shadow: 2px 2px 0 #fff, -1px -1px 0 #fff;
    pointer-events: none;
    z-index: 5;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: #fff;
    padding: 40px 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 90vw;
}

.overlay-content h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

.overlay-content p {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.overlay-content .hint {
    font-size: 14px;
}

button {
    background: #4CAF50;
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
    box-shadow: 0 4px 0 #388E3C;
}

button:hover {
    background: #45a049;
}

button:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #388E3C;
}

@media (max-width: 600px) {
    #score { font-size: 22px; top: 12px; left: 12px; }
    .overlay-content { padding: 30px 25px; }
    .overlay-content h1 { font-size: 24px; }
    button { padding: 12px 32px; font-size: 16px; }
}
