body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#app {
    width: 90%;
    max-width: 600px;
    background: #2a2a2a;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    text-align: center;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.controls-right {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

#userId {
    font-weight: bold;
    color: #4caf50;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px; /* Smaller */
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

/* Random Toggle Color */
#randomToggle:checked + .slider {
    background-color: #9C27B0; 
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.toggle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #aaa;
}

.hidden-ctrl {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
    margin: 0;
}


/* Main Sync Button */
#clickBtn {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 20px 40px; /* Reduced from 50px */
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 24px;
    margin: 30px 0;
    cursor: pointer;
    border-radius: 12px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

#clickBtn:disabled {
    background-color: #555;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

#clickBtn.waiting {
    background-color: #FFC107;
    color: #333;
    animation: pulse 1.5s infinite;
}

#clickBtn.blocked {
    background-color: #F44336; /* Red */
    color: #fff;
    cursor: not-allowed;
    border: 2px solid #D32F2F;
}

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

#status {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #ccc;
}

#participants {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.participant-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #555;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 12px;
    border: 2px solid transparent;
}

.participant-dot.locked {
    background-color: #2196F3;
    border-color: #1976D2;
}

.participant-dot.clicked {
    background-color: #4CAF50;
    border-color: #388E3C;
}

.participant-dot.current {
    box-shadow: 0 0 0 2px white;
}

#results-area.hidden {
    display: none;
}

#resultsList {
    list-style: none;
    padding: 0;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

#resultsList li {
    background: #333;
    margin: 4px 0;
    padding: 8px 12px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
}

.time-diff {
    font-family: monospace;
    font-weight: bold;
}