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

body {
    background: #1a5c1a;
    overflow: hidden;
    font-family: 'IBM Plex Mono', monospace;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 100;
    border-bottom: 1px solid #444;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

#hud-left, #hud-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

#hud button {
    background: linear-gradient(180deg, #4a4a4a, #333);
    border: 1px solid #555;
    color: #ddd;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s;
}

#hud button:hover {
    background: linear-gradient(180deg, #5a5a5a, #444);
}

#hud button:active {
    background: #333;
}

#hud span {
    color: #aaffaa;
    font-size: 12px;
    font-weight: 700;
}

#hud-timer {
    color: #ffddaa !important;
}

#canvas {
    display: block;
    position: fixed;
    top: 44px;
    left: 0;
    cursor: default;
}

#auto-complete-btn {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

#auto-complete-btn button {
    background: linear-gradient(180deg, #4CAF50, #2E7D32);
    border: 2px solid #66BB6A;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

#overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
}

#modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
    border: 2px solid #555;
    border-radius: 12px;
    padding: 24px 32px;
    z-index: 300;
    color: #eee;
    font-family: 'IBM Plex Mono', monospace;
    text-align: center;
    min-width: 280px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

#modal h2 {
    font-family: 'Crimson Pro', serif;
    font-size: 24px;
    margin-bottom: 16px;
    color: #aaffaa;
}

#modal p {
    margin: 8px 0;
    font-size: 13px;
    color: #ccc;
}

#modal button {
    margin: 6px;
    background: linear-gradient(180deg, #4a4a4a, #333);
    border: 1px solid #555;
    color: #ddd;
    padding: 8px 18px;
    border-radius: 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    cursor: pointer;
}

#modal button:hover {
    background: linear-gradient(180deg, #5a5a5a, #444);
}

#modal button.primary {
    background: linear-gradient(180deg, #4CAF50, #2E7D32);
    border-color: #66BB6A;
    color: white;
}

footer {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

footer a {
    color: rgba(255,255,255,0.3);
    text-decoration: none;
    font-size: 11px;
    font-family: 'IBM Plex Mono', monospace;
}

footer a:hover {
    color: rgba(255,255,255,0.6);
}