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

body {
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior: none;
    font-family: ui-monospace, monospace;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a1a0a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #ffaa00;
    overflow: hidden;
}

.container {
    text-align: center;
    padding: 10px;
    max-width: 100%;
}

h1 {
    font-size: clamp(14px, 3vw, 24px);
    margin-bottom: 8px;
    color: #ffaa00;
    text-shadow: 0 0 10px #ffaa00, 0 0 20px #ff6600;
    letter-spacing: 2px;
}

.header {
    margin-bottom: 10px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: clamp(11px, 2.2vw, 14px);
    font-weight: bold;
}

.stat {
    text-shadow: 0 0 5px currentColor;
}

#gameCanvas {
    background: linear-gradient(180deg, #000011 0%, #001122 50%, #002211 100%);
    border: 2px solid #ffaa00;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.3);
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

.instructions {
    margin-top: 10px;
    color: #aa6600;
    font-size: clamp(10px, 2vw, 13px);
}

.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 10, 20, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
}

.overlay h2 {
    font-size: clamp(22px, 5vw, 38px);
    color: #ffaa00;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #ffaa00;
    letter-spacing: 2px;
    line-height: 1.2;
}

.overlay p {
    font-size: clamp(13px, 2.8vw, 17px);
    margin: 8px 0;
    color: #cc8800;
}

.overlay button {
    margin-top: 20px;
    padding: 12px 45px;
    font-size: clamp(14px, 2.8vw, 18px);
    font-weight: bold;
    font-family: inherit;
    color: #000;
    background: linear-gradient(180deg, #ffaa00 0%, #ff6600 100%);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.overlay button:hover {
    background: linear-gradient(180deg, #ffcc00 0%, #ffaa00 100%);
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(255, 170, 0, 0.7);
}

.hidden { display: none !important; }
