* { 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, #1a1a2e 0%, #0a0a1a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #ffcc00;
    overflow: hidden;
}

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

h1 {
    font-size: clamp(16px, 3.5vw, 28px);
    margin-bottom: 8px;
    color: #ffcc00;
    text-shadow: 0 0 10px #ffcc00, 0 0 20px #ff8800;
    letter-spacing: 2px;
}

.header {
    margin-bottom: 10px;
}

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

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

#gameCanvas {
    background: #654321;
    border: 3px solid #ffcc00;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.3);
    display: block;
    margin: 0 auto;
    max-width: 100%;
}

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

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

.overlay h2 {
    font-size: clamp(24px, 5.5vw, 42px);
    color: #ffcc00;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #ffcc00;
    letter-spacing: 3px;
    line-height: 1.2;
}

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

.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, #ffcc00 0%, #ff8800 100%);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.hidden { display: none !important; }
