/* --- MODERN WAITING ROOM --- */
.wr-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 900px;
    height: 100%;
    max-height: 85vh;
}

.wr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    /* Slightly lighter */
}

.wr-room-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wr-room-info .label {
    font-size: 0.9rem;
    color: var(--text-dim);
    letter-spacing: 2px;
}

#display-room-id {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-gold);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    margin: 0;
}

.icon-only {
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.2rem;
}

.wr-status {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#wr-player-count {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.wr-main {
    display: flex;
    gap: 1rem;
    flex: 1;
    min-height: 0;
    /* Important for scroll */
}

/* Sidebar (Players) */
.wr-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 16px;
    max-width: 350px;
}

.wr-sidebar h3 {
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.wr-player-list {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wr-player-item {
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: 0.3s;
}

.wr-player-item.active-turn {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid var(--accent-gold);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.1);
}

.avatar-circle {
    width: 30px;
    height: 30px;
    background: var(--accent-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
    color: white;
}

.p-name {
    font-weight: 600;
    flex: 1;
}

.turn-badge {
    font-size: 0.7rem;
    background: var(--accent-gold);
    color: black;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
}

.wr-controls {
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
}

.wr-hint {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

/* Wheel Area */
.wr-wheel-container {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 16px;
    position: relative;
}

.turn-indicator {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

#current-turn-name {
    color: var(--accent-gold);
    font-weight: 800;
    font-size: 1.4rem;
    text-transform: uppercase;
}

.wr-wheel-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto; /* Center horizontally */
}

#wr-wheel-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.wheel-pointer.small {
    top: -10px;
    font-size: 2rem;
}

.wheel-center.small {
    width: 70px;
    height: 70px;
    padding: 4px;
}

#wr-spin-btn {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: none;
    background: radial-gradient(circle at 30% 30%, #ff0055, #d50000);
    color: white;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.9rem;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.5);
    transition: 0.3s;
}

#wr-spin-btn:disabled {
    background: #444;
    box-shadow: none;
    cursor: not-allowed;
    color: #888;
}

.wr-slots-container {
    width: 100%;
    margin-top: 2rem;
    text-align: center;
}

.wr-slots-container h4 {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.slots-grid {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.slot {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: #fff;
    transition: 0.3s;
}

.slot.filled {
    box-shadow: 0 0 10px currentColor;
    /* Glow with its own color */
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .wr-main {
        flex-direction: column;
    }

    .wr-sidebar {
        max-width: 100%;
        max-height: 250px;
    }

    .wr-wheel-container {
        padding: 1rem 0;
    }
}