:root {
    --bg-overlay: rgba(0, 0, 0, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent: #3498db;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    user-select: none;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.crosshair::before, .crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.7);
}

.crosshair::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.crosshair::after {
    left: 50%;
    top: 0;
    height: 100%;
    width: 2px;
    transform: translateX(-50%);
}

.overlay {
    position: absolute;
    background: var(--bg-overlay);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    font-family: monospace;
    pointer-events: none;
}

.top-left { top: 16px; left: 16px; }
.top-right { top: 16px; right: 16px; }

.sub-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.paused-text {
    font-size: 0.75rem;
    color: #ff4444;
    font-weight: bold;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tool-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.color-box {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.3);
}

.toolbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: var(--bg-overlay);
    padding: 10px;
    border-radius: 12px;
    backdrop-filter: blur(6px);
}

.tool-btn {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #444;
}

.tool-btn:hover {
    border-color: rgba(255,255,255,0.5);
}

.tool-btn.active {
    border-color: #fff;
    transform: scale(1.1);
}

.tool-btn .hotkey {
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

.tool-btn .label {
    font-size: 9px;
    color: #eee;
    text-shadow: 1px 1px 2px #000;
}

.modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal.hidden { display: none; }

.modal-content {
    background: #222;
    padding: 30px;
    border-radius: 20px;
    max-width: 400px;
    text-align: center;
    color: #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.help-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
    text-align: left;
    font-size: 14px;
}

.hint {
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 20px;
}

button#close-help {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.help-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-overlay);
    color: #fff;
    border: none;
    cursor: pointer;
    backdrop-filter: blur(4px);
}