body { background-color: #000; display: flex; flex-direction: column; align-items: center; margin: 0; padding: 20px; font-family: 'Arial', sans-serif; color: #5D5D5D; transition: background 0.8s ease; }
.container { width: 100%; max-width: 1200px; position: relative; } 
.header-box { text-align: center; margin-bottom: 20px; transition: opacity 0.6s; }

.lights-toggle {
    position: fixed; top: 20px; right: 20px; z-index: 9999;
    background: rgba(0, 0, 0, 0.9); color: #39FF14; border: 1px solid #39FF14;
    padding: 10px 15px; font-family: 'Courier New', monospace; font-size: 11px;
    text-transform: uppercase; cursor: pointer; letter-spacing: 2px;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.3); transition: all 0.3s;
}
.lights-toggle:hover { box-shadow: 0 0 20px #39FF14; background: #39FF14; color: #000; }

.cinema-layout { 
    display: flex; flex-direction: row; justify-content: center; 
    gap: 15px; flex-wrap: wrap; margin-bottom: 30px; position: relative; z-index: 10;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.video-box, .chat-box { position: relative; border: 1px solid #222; background: #000; transition: all 0.6s ease; }

.video-box::after {
    content: " "; position: absolute; top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 255, 0, 0.02));
    z-index: 2; background-size: 100% 2px, 3px 100%; pointer-events: none;
}

.video-box { flex: 3; min-width: 320px; padding-top: 42.18%; height: 0; }
.video-box iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.chat-box { flex: 1; min-width: 300px; max-width: 350px; display: flex; min-height: 315px; }

h1 { letter-spacing: 4px; color: #39FF14; margin: 10px 0; text-shadow: 0 0 8px rgba(57, 255, 20, 0.6); }
h2#status-header { margin-top:0; color: #39FF14; font-size: 16px; letter-spacing: 2px; }

.control-center { 
    width: 95%; max-width: 900px; margin: 0 auto; 
    border: 1px double #333; background: #050505; padding: 25px; 
    transition: all 0.6s ease; 
}

.tts-zone { display: flex; justify-content: center; gap: 10px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid #222; }
#tts-input { background: #000; color: #39FF14; border: 1px solid #39FF14; padding: 10px; width: 350px; }
#tts-btn { background: #39FF14; color: #000; border: none; padding: 5px 20px; cursor: pointer; font-weight: bold; }

#unlock-btn { background: #39FF14; color: #000; border: none; padding: 12px 24px; cursor: pointer; font-weight: bold; letter-spacing: 1px; font-family: 'Courier New', monospace; }

.sound-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.sound-btn { 
    background: #000; color: #39FF14; border: 1px solid #222; padding: 12px 5px; cursor: pointer; 
    font-family: 'Courier New', monospace; font-size: 10px; text-transform: uppercase; 
    transition: all 0.2s ease; min-height: 50px; overflow: hidden;
}
.sound-btn:hover:not(:disabled) { border-color: #39FF14; box-shadow: 0 0 10px #39FF14; }
.sound-btn:active { background: #39FF14; color: #000; }

input, button { font-family: 'Courier New', monospace; outline: none; }

.dimmed .header-box > *:not(.cinema-layout), .dimmed .disclaimer-box { opacity: 0.05; pointer-events: none; }
.dimmed .control-center { opacity: 0.15; transform: translateY(20px); }
.dimmed .control-center:hover { opacity: 1; transform: translateY(0); }

.dimmed .cinema-layout { transform: scale(1.04); }
.dimmed .video-box, .dimmed .chat-box { 
    border-color: #39FF14; 
    box-shadow: 0 10px 50px rgba(0,0,0,1), 0 0 30px rgba(57, 255, 20, 0.2); 
}

.disclaimer-box {
    max-width: 700px; margin: 50px auto 20px auto; font-family: 'Arial', sans-serif;
    color: #444; background: transparent; padding: 15px; font-size: 10px;
    text-align: center; line-height: 1.4; opacity: 0.6; transition: opacity 0.6s;
}

#stim-widget {
    position: fixed; top: 150px; left: 20px; z-index: 10001;
    background: #000; border: 1px solid #39FF14; 
    width: 140px; height: 120px;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
    display: flex; flex-direction: column;
    overflow: hidden;
}
#stim-header {
    background: #39FF14; color: #000; font-family: 'Courier New', monospace;
    font-size: 10px; font-weight: bold; padding: 4px 5px; text-align: center;
    cursor: grab; flex-shrink: 0; user-select: none;
}
#stim-header:active { cursor: grabbing; }

#stim-area {
    flex-grow: 1; display: flex; align-items: center; justify-content: center;
    font-family: 'Courier New', monospace; font-size: 10px; color: #39FF14;
    position: relative; overflow: hidden; user-select: none; cursor: crosshair;
}
.stim-pulse {
    position: absolute; border: 1px solid #39FF14; border-radius: 50%;
    pointer-events: none; transform: translate(-50%, -50%);
    animation: stim-expand 0.6s ease-out forwards;
}
@keyframes stim-expand {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 150px; height: 150px; opacity: 0; }
}

@media (max-width: 700px) {
    .sound-grid { grid-template-columns: repeat(3, 1fr); }
    #tts-input { width: 200px; }
}