/* Night Admin Panel - Modern staged moderator UI */
#mafia-night-engine-overlay {
    background: linear-gradient(160deg, #0b0e1a 0%, #060810 45%, #030508 100%) !important;
    font-family: 'iran', Tahoma, sans-serif;
    overflow: hidden;
}

#mafia-night-engine-overlay::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 50% at 70% 0%, rgba(241, 196, 15, 0.08), transparent 55%),
                radial-gradient(ellipse 60% 40% at 10% 100%, rgba(155, 89, 182, 0.06), transparent 50%);
    z-index: 1;
}

#mafia-night-engine-overlay .night-admin-shell {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

#mafia-night-engine-overlay .night-admin-main {
    flex: 1;
    overflow-y: auto;
    padding: 70px 20px 24px;
    min-width: 0;
}

#mafia-night-engine-overlay .night-admin-sidebar {
    width: 300px;
    max-width: 34vw;
    background: rgba(0, 0, 0, 0.55);
    border-right: 1px solid rgba(241, 196, 15, 0.15);
    backdrop-filter: blur(16px);
    padding: 70px 14px 20px;
    overflow-y: auto;
    flex-shrink: 0;
}

#night-mod-top-bar {
    display: flex !important;
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: linear-gradient(180deg, rgba(8, 10, 20, 0.98), rgba(8, 10, 20, 0.85)) !important;
    border-bottom: 1px solid rgba(241, 196, 15, 0.22) !important;
    padding: 10px 18px !important;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.night-stage-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.night-stage-pill {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    background: rgba(255, 255, 255, 0.03);
}

.night-stage-pill.active {
    color: #000;
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    border-color: transparent;
    box-shadow: 0 0 16px rgba(241, 196, 15, 0.35);
}

.night-stage-pill.done {
    color: #2ecc71;
    border-color: rgba(46, 204, 113, 0.35);
}

.night-admin-card {
    background: linear-gradient(145deg, rgba(22, 28, 50, 0.92), rgba(10, 12, 24, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.night-admin-card h3 {
    margin: 0 0 12px;
    color: #f1c40f;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.night-admin-card .btn-game-v2,
#mafia-night-engine-overlay .btn-game-v2 {
    border-radius: 12px !important;
    font-weight: 700 !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.night-admin-card .btn-game-v2:hover {
    transform: translateY(-1px);
}

#mafia-night-welcome-overlay {
    display: none !important;
}

#mafia-night-stage-1,
#mafia-night-stage-2,
#mafia-night-stage-3,
#mafia-night-stage-4,
#mafia-night-stage-5 {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.role-action-box {
    background: linear-gradient(145deg, rgba(18, 22, 40, 0.95), rgba(8, 10, 20, 0.98)) !important;
    border: 1px solid rgba(241, 196, 15, 0.15) !important;
    border-radius: 16px !important;
    padding: 16px !important;
}

.role-action-box h4 {
    color: #f1c40f !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 10px;
}

.player-grid-card {
    background: linear-gradient(145deg, rgba(20, 25, 45, 0.9), rgba(10, 12, 24, 0.95)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
}

#night-pending-actions-list .pending-action-item {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(241, 196, 15, 0.2);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 8px;
    font-size: 12px;
}

#night-pending-actions-list .pending-action-item button {
    margin-top: 6px;
    margin-left: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 11px;
}

.night-compact-player-chip {
    background: linear-gradient(135deg, rgba(22, 28, 50, 0.92), rgba(10, 12, 24, 0.96)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s !important;
}

.night-compact-player-chip.active {
    border-color: rgba(241, 196, 15, 0.65) !important;
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.25) !important;
    transform: translateX(-3px);
}

.night-compact-player-chip.done {
    opacity: 0.65;
}

#mafia-night-engine-overlay .mafia-night-stage {
    animation: nightStageFadeIn 0.45s ease;
}

@keyframes nightStageFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

#night-players-audio-status .night-audio-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(241, 196, 15, 0.22);
    font-size: 11px;
    max-width: 140px;
}

#user-ready-list .user-ready-card.ready {
    border-color: rgba(46, 204, 113, 0.55) !important;
    box-shadow: 0 0 18px rgba(46, 204, 113, 0.2);
}

@media (max-width: 900px) {
    #mafia-night-engine-overlay .night-admin-shell {
        flex-direction: column;
    }
    #mafia-night-engine-overlay .night-admin-sidebar {
        width: 100%;
        max-width: none;
        border-right: none;
        border-top: 1px solid rgba(241, 196, 15, 0.15);
        order: 2;
    }
}
