* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(to bottom, #7dd3fc 0%, #e0f2fe 55%, #f8fafc 100%);
    color: #111827;
}

body {
    padding: 16px;
    display: flex;
    justify-content: center;
}

.game-shell {
    width: min(100%, 1000px);
}

.hud {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 14px;
    font-weight: bold;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
    touch-action: none;
    background: #87ceeb;
}

.panel {
    margin-top: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

input[type="text"] {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 16px;
    min-width: 220px;
}

button {
    appearance: none;
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    background: #2563eb;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.instructions {
    margin: 0;
    line-height: 1.5;
}

.leaderboard-panel h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

#leaderboard {
    margin: 0;
    padding-left: 22px;
}

#leaderboard li {
    margin-bottom: 8px;
    line-height: 1.4;
}

@media (max-width: 700px) {
    .hud {
        font-size: 14px;
        padding: 10px 12px;
    }

    input[type="text"] {
        width: 100%;
        min-width: 0;
    }

    .button-row button {
        width: 100%;
    }

    .panel {
        font-size: 14px;
    }
}