body {
    font-family: Arial, Helvetica, sans-serif;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 50px;
    background: #222;
    color: #fff;
}

body:has(.connected) {
    background: #050505 ;
}

button {
    padding: 15px 25px;
    font-size: 18px;
    margin: 10px;
    cursor: pointer;
    border-radius: 8px;
    border: none;
    transition:.2s ease;
    font-variant: small-caps;
}

button:active {
    box-shadow: #fff 0px 0px !important;
    transition:.2s ease;
}

#connectBtn {
    background-color: #007bff;
    color: white;
    box-shadow: #fff 0px 1px;
}

#onBtn {
    background-color: #28a745;
    color: white;
}

#offBtn {
    background-color: #dc3545;
    color: white;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#status {
    margin-top: 20px;
    font-weight: bold;
    color: #bbb;
    font-style: italic;
}

#decBtn,
#incBtn {
    background-color: #007bff;
    color: #ddd;
}

#decBtn {
    box-shadow: #fff -1px 1px;
}

#incBtn {
    box-shadow: #fff 1px 1px;
}

#fullBtn {
    background-color: #dd8800;
    color: #fff;
    box-shadow: #fff 0px 1px;
}

h1 {
    margin-bottom: 8px;
    font-variant: small-caps;
}

#controls {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    align-items: center
}

.effects {
    margin-top: 14px;
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.effect-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

label {
    font-size: 14px;
    color: #ddd;
}

input[type="range"] {
    width: 120px;
}

.circle-wrap {
    width: 260px;
    height: 260px;
    position: relative
}

svg {
    width: 100%;
    height: 100%;
}

#powerLabel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 20px;
    font-weight: 600
}

.center-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #222;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 800
}

.small-btn {
    padding: 12px 18px;
    font-size: 14px
}

/* Connected state for the Connect button (keeps green even when disabled) */
#connectBtn.connected {
    background-color: #28a745;
    color: #fff;
    box-shadow: #fff 0px 1px;
}

/* Ensure connected button remains visually active when disabled */
#connectBtn.connected:disabled {
    background-color: #28a745;
    color: #fff;
    opacity: 1;
    cursor: default;
}

/* Make disabled controls clearly gray/low-contrast */
button:disabled {
    background-color: #888888;
    color: #ddd;
    cursor: not-allowed;
    filter: grayscale(80%);
    opacity: 0.9;
}

#timerControl {
    display:flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

#timerControl button {
    flex: 3 30%;
}

#timerControl label, #timerControl input {
    flex: 2 40%;
}

#timerControl input {
    padding:1em;
    border: none;
}