/* THE PRINCE'S PALACE - Master Stylesheet 
   Refined "Ghostly" Edition with Sound Control
*/

/* --- GLOBAL LAYOUT --- */
body, html { 
    height: 100%; 
    margin: 0; 
    overflow: hidden; 
    background-color: #000; 
    font-family: 'Georgia', serif; 
}

/* --- SCOREBOARD (THE TAB) --- */
#scoreboard-tab { 
    position: fixed; 
    top: -320px; /* Tucked higher to hide the box completely */
    left: 20px; 
    width: 210px; 
    height: 310px; 
    
    /* GHOSTLY TRANSPARENCY: 0.75 alpha */
    background: rgba(40, 35, 20, 0.75); 
    
    border: 2px solid #DAA520; 
    border-top: none; 
    z-index: 3000; 
    transition: top 0.6s ease-in-out; 
    border-radius: 0 0 20px 20px; 
    padding: 20px; 
    color: #E5D1A1; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Slide down to show the full stats */
#scoreboard-tab:hover { 
    top: 0; 
}

/* CENTERED TITLE: "PALACE STATS" */
#scoreboard-tab h3 {
    text-align: center;
    border-bottom: 1px solid #DAA520; 
    padding-bottom: 10px;
    margin-top: 0;
    color: #DAA520;
    text-transform: uppercase;
    font-size: 18px;
    letter-spacing: 1px;
}

#scoreboard-tab p {
    text-align: center;
    font-size: 0.9em;
}

/* THE TWO-LINE HANDLE */
.tab-handle { 
    position: absolute; 
    bottom: -45px; /* Deeper to fit two lines */
    left: 50%; 
    transform: translateX(-50%); 
    background: #DAA520; 
    color: #000; 
    padding: 6px 15px; 
    border-radius: 0 0 25px 25px; 
    cursor: pointer; 
    text-align: center;
    line-height: 1.1;
    width: 130px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.handle-top { display: block; font-size: 11px; font-weight: 900; letter-spacing: 1px; }
.handle-bottom { display: block; font-size: 9px; font-weight: bold; opacity: 0.8; }

/* --- ROOM STATUS LIST --- */
#room-status-list div {
    margin: 8px 0;
    font-size: 0.9em;
    padding-left: 5px;
}

#room-status-list span {
    color: #DAA520;
    font-weight: bold;
}

/* --- ROYAL SOUND TOGGLE SWITCH --- */
.sound-control {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(218, 165, 32, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #111;
    border: 1px solid #DAA520;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 4px;
    bottom: 3px;
    background-color: #DAA520;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider { background-color: rgba(218, 165, 32, 0.2); }
input:checked + .slider:before { transform: translateX(18px); background-color: #FFF; }

/* --- VIDEO & UI COMPONENTS --- */
video { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    position: absolute; 
    z-index: 10; 
}

.static-overlay { 
    width: 100%; 
    height: 100%; 
    position: absolute; 
    top: 0; left: 0; 
    background-size: cover; 
    background-position: center; 
    z-index: 20; 
}

/* THE SNEAKY RED CIRCLES */
.glow-base { 
    position: absolute; 
    background: radial-gradient(circle, rgba(218, 165, 32, 0.4) 0%, rgba(0,0,0,0) 70%); 
    border: 2px solid rgba(255, 0, 0, 0.3); 
    border-radius: 50%; 
    cursor: pointer; 
    transform: translate(-50%, -50%); 
    z-index: 50; 
}

.nav-btn { 
    position: absolute; 
    bottom: 40px; right: 40px; 
    background: rgba(0,0,0,0.65); 
    border: 2px solid #B8860B; 
    color: #B8860B; 
    padding: 12px 25px; 
    cursor: pointer; 
    z-index: 60; 
    font-weight: bold; 
    transition: background 0.3s, color 0.3s; 
}

.nav-btn:hover { background: rgba(184, 134, 11, 0.4); color: #FFF; }

/* --- THE "BAM" FACTOR (SUCCESS GLOWS) --- */

/* Applied to Hallway doors when ready to enter */
.door-unlocked {
    box-shadow: 0 0 20px 5px #FFD700; /* Gold Glow */
    border-color: #FFD700 !important;
    transition: box-shadow 0.5s ease-in-out, border-color 0.5s ease-in-out;
}

/* Applied to the "Return to Hall" button after final key is found */
.nav-btn-glow {
    box-shadow: 0 0 20px 5px #FFD700; 
    border-color: #FFD700 !important;
    background: rgba(218, 165, 32, 0.4) !important; /* Brighter gold background */
    color: #FFF !important;
    transition: all 0.5s ease-in-out;
    animation: pulse-glow 2s infinite; /* Optional pulsing effect */
}

/* Optional animation for the button glow to make it really pop */
@keyframes pulse-glow {
    0% { box-shadow: 0 0 15px 2px #FFD700; }
    50% { box-shadow: 0 0 25px 8px #FFD700; }
    100% { box-shadow: 0 0 15px 2px #FFD700; }
}