body {
    margin: 0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#setup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#setup-box {
    background: #333;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#channel-input {
    padding: 10px;
    font-size: 18px;
    border-radius: 5px;
    border: none;
    margin-right: 10px;
    width: 200px;
}

#connect-status {
    margin-top: 20px;
    font-weight: bold;
    color: #ffd700;
    min-height: 24px;
}

#join-instruction {
    position: absolute;
    top: 130px;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
    text-shadow: 2px 2px 4px #000;
    z-index: 50;
    animation: pulse 2s infinite;
}

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

#start-game-btn {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 40px;
    font-size: 28px;
    background: #4CAF50;
    color: white;
    border: 3px solid white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 60;
    pointer-events: auto;
}

#start-game-btn:hover {
    background: #45a049;
    transform: translateX(-50%) scale(1.1);
}

#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to the game */
    display: flex;
    flex-direction: column;
    align-items: center;
}

#score-board {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 30px;
    border-radius: 0 0 20px 20px;
    color: white;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.team-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.team-score {
    font-size: 28px;
    text-shadow: 2px 2px 4px black;
}

.team-group.red .team-score { color: #ff4444; }
.team-group.blue .team-score { color: #4444ff; }

.team-votes {
    font-size: 16px;
    color: #ddd;
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 10px;
}

.center-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.timer {
    font-size: 20px;
    color: #ffd700;
}

.vote-instruction {
    font-size: 12px;
    color: #aaa;
    text-align: center;
}

.developer-credit {
    font-size: 10px;
    color: #888;
    margin-top: 5px;
    font-style: italic;
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    display: none;
    z-index: 100;
    pointer-events: auto;
    width: 60%;
    max-width: 600px;
    border: 2px solid white;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

#game-results {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
    text-align: left;
    gap: 20px;
}

.result-section {
    flex: 1;
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
}

.result-section h3 {
    color: #ffd700;
    margin-top: 0;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    text-align: center;
}

#winning-players-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    color: white;
    font-size: 18px;
}

#winning-players-list li {
    padding: 5px 0;
}

#voting-results-text {
    color: white;
    font-size: 18px;
    text-align: center;
    line-height: 1.6;
}

#vote-winner-msg {
    font-weight: bold;
    color: #00ff00;
    font-size: 20px;
}

.camera-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    z-index: 50;
    transition: background 0.3s;
    pointer-events: auto;
}

.camera-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

#replay-indicator {
    position: absolute;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
    color: #ff0000;
    font-size: 48px;
    font-weight: bold;
    display: none;
    animation: blink 1s infinite;
    text-shadow: 2px 2px 0 #000;
}

@keyframes blink {
    50% { opacity: 0; }
}

#winner-text {
    font-size: 48px;
    margin-bottom: 20px;
    color: gold;
    text-shadow: 2px 2px 4px #000;
}

button {
    padding: 10px 20px;
    font-size: 20px;
    cursor: pointer;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
}

button:hover {
    background: #45a049;
}