/* === Theater Scene — Program overlay, video selector, CSS fallback === */

/* ─── Program / Video-selector overlay ─── */
.theater-program-overlay,
.theater-player-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theater-program-panel {
    width: 420px;
    max-width: 90%;
    max-height: 80%;
    background: #1A1A2A;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
}

.theater-program-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(180deg, #3A2040, #2A1830);
    color: #E8C8E0;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 2px;
    border-bottom: 1px solid #4A3050;
}

.theater-program-close {
    background: none;
    border: none;
    color: #AAA;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}
.theater-program-close:hover {
    background: #FF4444;
    color: #FFF;
}

.theater-program-list {
    overflow-y: auto;
    padding: 8px;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #4A3050 #1A1A2A;
}
.theater-program-list::-webkit-scrollbar { width: 5px; }
.theater-program-list::-webkit-scrollbar-track { background: #1A1A2A; }
.theater-program-list::-webkit-scrollbar-thumb { background: #4A3050; border-radius: 3px; }

.theater-program-empty {
    text-align: center;
    color: #666;
    padding: 40px 0;
    font-size: 14px;
}

/* ─── Program item ─── */
.theater-program-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.2s;
}
.theater-program-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.theater-program-item--play {
    cursor: pointer;
}
.theater-program-item--play:hover {
    background: rgba(130, 80, 180, 0.2);
}

.theater-item-icon {
    width: 32px; height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.theater-item-name {
    flex: 1;
    color: #DDD;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theater-item-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #664422;
    color: #DDAA66;
    flex-shrink: 0;
}
.theater-item-badge--perm {
    background: #225544;
    color: #66DDAA;
}

.theater-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.theater-item-btn {
    width: 28px; height: 28px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
    color: #CCC;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.theater-item-btn:hover {
    transform: scale(1.1);
}
.theater-item-btn--save:hover {
    background: rgba(50, 180, 120, 0.3);
    color: #6FE0A0;
}
.theater-item-btn--del:hover {
    background: rgba(220, 60, 60, 0.3);
    color: #FF6666;
}

/* ─── CSS Fallback layout ─── */
.theater-fallback {
    width: 100%; height: 100%;
    position: relative;
    background: linear-gradient(180deg, #1A0A1A 0%, #2A1030 40%, #1A0A1A 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.theater-title {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #E8C8E0;
    letter-spacing: 6px;
    padding: 14px 0 8px;
    text-shadow: 0 2px 8px rgba(200, 100, 255, 0.3);
}

.theater-zones {
    flex: 1;
    display: flex;
    gap: 12px;
    padding: 8px 20px 16px;
    min-height: 0;
}

.theater-zone {
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s;
    gap: 8px;
}
.theater-zone:hover {
    transform: scale(1.03);
    filter: brightness(1.2);
}
.theater-zone:active {
    transform: scale(0.98);
}

.theater-zone--stage {
    flex: 2;
    background: linear-gradient(180deg, #3A1A40, #2A1030);
    border: 2px solid #5A3060;
    box-shadow: inset 0 0 40px rgba(150, 50, 200, 0.15), 0 4px 16px rgba(0, 0, 0, 0.4);
}

.theater-zone-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theater-zone--program {
    flex: 1;
    background: linear-gradient(180deg, #1A2A40, #152030);
    border: 2px solid #2A4060;
    box-shadow: inset 0 0 20px rgba(50, 100, 200, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theater-zone--upload {
    flex: 1;
    background: linear-gradient(180deg, #2A3A20, #1A2A14);
    border: 2px solid #3A5A30;
    box-shadow: inset 0 0 20px rgba(80, 160, 60, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.theater-zone-icon {
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.theater-zone-label {
    font-size: 15px;
    color: #D0C0D8;
    letter-spacing: 3px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
