* { 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

body { 
    margin: 0; 
    background: #111318; 
    color: #f0f0f0; 
    font-family: system-ui, -apple-system, sans-serif; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    min-height: 100vh;
    padding: 1rem;
}

#ui-panel { text-align: center; margin-bottom: 0.5rem; }
h1 { margin: 0 0 0.1rem 0; font-size: 2.2rem; letter-spacing: 0.1em; font-weight: 900; color: #f59e0b; }
#timer { font-family: monospace; font-size: 1.25rem; color: #3b82f6; font-weight: bold; margin-bottom: 0.25rem; }
#status { font-size: 1rem; color: #a0aab5; margin-bottom: 0.25rem; height: 1.5rem; }
.win { color: #00ff88 !important; font-weight: bold; }
.conflict { color: #ff3355 !important; font-weight: bold; }
.blocked { color: #ff9900 !important; font-weight: bold; }

canvas { 
    background: #181b22; 
    border-radius: 16px; 
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6); 
    cursor: pointer;
    max-width: 100%;
    height: auto;
    touch-action: none;
}

.difficulty-bar {
    display: flex;
    gap: 6px;
    margin-top: 0.75rem;
    background: #181b22;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #2b303c;
}

.diff-btn {
    background: transparent;
    color: #8892b0;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.diff-btn.active {
    background: #f59e0b;
    color: #111318;
}

.controls { margin-top: 0.75rem; display: flex; gap: 10px; align-items: center; }

button {
    background: #2b303c; 
    color: #fff; 
    border: none; 
    padding: 0.55rem 1rem;
    border-radius: 8px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: 0.2s;
}

button:hover { background: #3f4758; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.legend { font-size: 0.8rem; color: #8892b0; margin-top: 0.5rem; }
