* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #f0f0f0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

h1 {
    color: #9147ff;
    font-size: 2.5rem;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.connection-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.connected {
    background-color: #00ff00;
}

.disconnected {
    background-color: #ff0000;
}

.connecting {
    background-color: #ffff00;
}

.game-container {
    background-color: #1f1f23;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.team {
    width: 30%;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
}

.team-count {
    font-size: 0.9rem;
    font-weight: normal;
    opacity: 0.9;
    display: inline-block; /* Ensure it's displayed properly */
    color: rgba(255, 255, 255, 0.9); /* Make it more visible */
}

.team-a {
    background-color: #3b82f6; /* Blue */
}

.team-b {
    background-color: #ef4444; /* Red */
}

.score {
    font-size: 3rem;
    font-weight: bold;
    margin: 10px 0;
}

.join-team, .click-button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.join-team {
    background-color: #4b5563;
    color: white;
}

.join-team:hover {
    background-color: #6b7280;
}

.click-button {
    background-color: #10b981;
    color: white;
    font-size: 1.2rem;
    padding: 15px 30px;
    margin-top: 15px;
}

.click-button:hover:not(:disabled) {
    background-color: #059669;
    transform: scale(1.05);
}

.click-button:disabled {
    background-color: #6b7280;
    cursor: not-allowed;
}

.tug-of-war {
    width: 40%;
    padding: 20px;
}

.rope-container {
    position: relative;
    height: 30px;
    margin: 40px 0;
}

.rope {
    position: relative;
    height: 10px;
    background-color: #6b7280;
    border-radius: 5px;
}

.marker {
    position: absolute;
    top: -10px;
    left: 50%;
    width: 30px;
    height: 30px;
    background-color: #f0f0f0;
    border-radius: 50%;
    transform: translateX(-50%);
    transition: left 0.3s ease;
}

.side {
    position: absolute;
    top: -10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.side-a {
    left: -15px;
    background-color: #3b82f6;
    color: white;
}

.side-b {
    right: -15px;
    background-color: #ef4444;
    color: white;
}

.game-status {
    text-align: center;
    font-size: 1.5rem;
    margin: 20px 0;
    padding: 10px;
    border-radius: 4px;
    background-color: #2d3748;
}

.click-rate {
    margin: 20px auto;
    max-width: 400px;
}

.rate-bar {
    height: 20px;
    background-color: #2d3748;
    border-radius: 10px;
    overflow: hidden;
}

.rate-fill {
    height: 100%;
    width: 0;
    background-color: #10b981;
    transition: width 0.3s ease;
}

.rate-text {
    text-align: center;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #d1d5db;
}

.admin-panel {
    background-color: #1f1f23;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-login {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.admin-login input {
    flex: 1;
    padding: 8px;
    border: 1px solid #4b5563;
    border-radius: 4px;
    background-color: #2d3748;
    color: white;
}

.admin-controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #9147ff;
    color: white;
    font-weight: 500;
}

button:hover {
    background-color: #772ce8;
}

.stats {
    display: flex;
    justify-content: space-between;
    color: #9ca3af;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .teams {
        flex-direction: column;
    }

    .team, .tug-of-war {
        width: 100%;
        margin-bottom: 20px;
    }

    .rope-container {
        margin: 20px 0;
    }
}