:root {
    --primary: #00f2ff;
    --secondary: #ff0055;
    --bg: #050508;
    --panel-bg: rgba(15, 15, 20, 0.85);
    --glass: 1px solid rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    overflow: hidden;
    background-color: var(--bg);
    font-family: 'Segoe UI', Roboto, sans-serif;
    color: #fff;
}

canvas {
    display: block;
    cursor: crosshair;
}

/* UI Panel */
#ui-container {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 340px;
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    border: var(--glass);
    z-index: 100;
    max-height: 90vh;
    overflow-y: auto;
}

h1 {
    font-size: 1.1rem;
    margin: 0 0 15px 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    background: linear-gradient(90deg, var(--primary), #fff, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 5px;
    margin-top: 10px;
}

/* Inputs */
input[type="range"] {
    width: 100%;
    height: 5px;
    background: #444;
    border-radius: 5px;
    -webkit-appearance: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

select {
    width: 100%;
    padding: 8px;
    background: #222;
    border: 1px solid #444;
    color: white;
    border-radius: 5px;
    outline: none;
}

/* Counter */
.counter-box {
    text-align: center;
    margin-bottom: 10px;
}
#display-timer {
    font-size: 2.5rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 0 10px var(--secondary);
}
.counter-inputs {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 5px 0;
}
.counter-inputs input {
    width: 50px;
    background: #111;
    border: 1px solid #444;
    color: #fff;
    text-align: center;
    padding: 5px;
    border-radius: 4px;
}

/* Buttons */
.btn-row {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}
button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    transition: 0.2s;
}
.btn-start { background: #00aa55; }
.btn-start:hover { background: #00cc66; }
.btn-stop { background: #aa2200; }
.btn-stop:hover { background: #cc3300; }
.btn-reset { background: #444; }
.btn-finale {
    width: 100%;
    margin-top: 15px;
    background: linear-gradient(45deg, #ff0055, #ffcc00);
    border: none;
    font-size: 1rem;
    padding: 12px;
}

/* Toggle */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}
.toggle {
    position: relative;
    width: 40px;
    height: 20px;
    background: #444;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
}
.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle.active { background: var(--secondary); }
.toggle.active::after { transform: translateX(20px); }

.hint {
    font-size: 0.75rem;
    color: #888;
    text-align: center;
    margin-top: 5px;
}
