/* --- 1. THEME VARIABLES & RESET --- */
:root {
    --primary-green: #27ae60;
    --admin-gold: #f1c40f;
    --dark-blue: #2c3e50;
    --error-red: #e74c3c;
    --buzzer-red: #d63031;
    --light-bg: #f4f7f6;
    --white: #ffffff;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    background: var(--light-bg);
    color: #333;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* --- 2. HOST SCREEN SPECIFIC (TV VIEW) --- */
#roomDisplay {
    font-size: 80px;
    font-weight: bold;
    color: var(--dark-blue);
    margin: 10px 0;
}

#playerLobby {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
}

.player-card {
    background: var(--white);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    min-width: 130px;
    text-align: center;
    border-bottom: 5px solid #ddd;
}

.player-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--dark-blue);
    object-fit: cover;
}

.ready-indicator {
    font-weight: bold;
    margin-top: 10px;
    font-size: 14px;
}

.ready-yes { color: var(--primary-green); }
.ready-no { color: var(--error-red); }

/* Category Badges for Host */
#categoryDisplay {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.cat-badge {
    background: var(--dark-blue);
    color: white;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
}

/* Music Bar for Host */
#musicBar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.95);
    color: white;
    display: flex;
    align-items: center;
    padding: 12px 25px;
    z-index: 1000;
}

#albumArt {
    width: 65px;
    height: 65px;
    border-radius: 6px;
    margin-right: 15px;
    background: #333;
}

#songInfo { flex-grow: 1; text-align: left; }

#progressContainer {
    width: 100%;
    background: #333;
    height: 8px;
    margin-top: 10px;
    border-radius: 10px;
    overflow: hidden;
}

#progressBar {
    width: 0%;
    background: var(--primary-green);
    height: 100%;
    transition: width 0.1s linear;
}

/* --- 3. PLAYER SCREEN SPECIFIC (PHONE VIEW) --- */
#playerProfile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-blue);
    color: white;
    padding: 12px;
    border-bottom: 4px solid var(--primary-green);
}

#playerProfile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid white;
}

/* Avatar Selection Grid */
.avatar-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 20px auto;
    max-width: 420px;
    padding: 10px;
}

.avatar-item {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid transparent;
    cursor: pointer;
    background: #e0e0e0;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.avatar-item.selected {
    border-color: var(--primary-green);
    transform: scale(1.15);
    background: white;
}

/* The Big Buzzer */
#buzzerContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50vh;
}

#buzzer {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 10px solid #861d1d;
    background: var(--buzzer-red);
    color: white;
    font-size: 32px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 12px 0 #861d1d;
    transition: all 0.1s;
}

#buzzer:active {
    transform: translateY(6px);
    box-shadow: 0 6px 0 #861d1d;
}

#buzzer:disabled {
    background: #7f8c8d;
    border-color: #5d6d7e;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}
