
/* ===========================
   SIMPLE TEXT-ONLY SITE HEADER
   =========================== */

#siteHeader {
    width: 100%;
    height: 140px;

    background-color: rgba(0, 0, 0, 0.45); /* translucent dark overlay */
    border-bottom: 4px solid #3b2612;     /* rustic accent */

    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 40px;
}

.headerTitle {
    font-family: 'Courier New', monospace;
    font-size: 3em;
    font-weight: 900;
    letter-spacing: 3px;
    margin: 0;

    color: #fff8dc; /* cream white */
    text-shadow: 
        4px 4px #2b1a0f,
        1px 1px #000;
}


/* Header Bar */
#headerBar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

#headerTitle {
    font-family: 'Courier New', monospace;
    font-size: 2.4em;
    font-weight: bold;
    color: #fff8dc;
    text-shadow: 3px 3px #4b3d28, 1px 1px #000;
}

/* -------------------------------------------
   GLOBAL BACKGROUND — 8-BIT BOOKSHELVES
------------------------------------------- */
body {
    background-image: url('bookshelf.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;

    font-family: 'Courier New', monospace;
    padding: 20px;
    margin: 0;
}

/* Optional: subtle faded overlay to improve readability */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;

    opacity: 0.25;
    z-index: -1;

    pointer-events: none;
}

/* -------------------------------------------
   MAIN UI CONTAINERS
------------------------------------------- */
.library-frame,
.card {
    background: rgba(248, 241, 222, 0.92);
    border: 4px solid #8b6f47;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    padding: 20px;
    max-width: 800px;
    margin: auto;
}

/* -------------------------------------------
   HEADERS & TITLES
------------------------------------------- */
.title {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    color: #4b3d28;
    text-shadow: 0 2px 0 #d8cbb0;
}

.scene-title {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: #4b3d28;
    text-shadow: 0 2px 0 #d8cbb0;
}

/* Special styling for endings */
.scene-title.ending {
    color: #7a0000;
    text-shadow: 0 2px 0 #ffbbbb;
}

/* -------------------------------------------
   BUTTONS
------------------------------------------- */
.btn {
    background: #8b6f47;
    color: white;
    padding: 10px 20px;
    margin: 10px 0;
    display: inline-block;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    font-size: 1em;
}

.btn:hover {
    background: #a38256;
}

/* Choice buttons */
.btn.choice {
    width: 100%;
    text-align: left;
}

/* Back button */
.back-btn {
    display: inline-block;
    margin-top: 15px;
    color: #8b6f47;
    font-weight: bold;
    text-decoration: none;
}

/* -------------------------------------------
   IMAGE UPLOADER
------------------------------------------- */
#imagePreview {
    margin-top: 15px;
    max-width: 200px;
    display: none;
    border: 2px solid #8b6f47;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* -------------------------------------------
   RESPONSIVE ADJUSTMENTS
------------------------------------------- */
@media (max-width: 640px) {
    .btn.choice {
        text-align: center;
    }
}

/* Collapsible Ending Tracker Panel */
#endingTrackerPanel {
    background: rgba(248, 241, 222, 0.95);
    border: 3px solid #8b6f47;
    border-radius: 10px;
    padding: 10px;
}

#trackerToggle {
    background:#8b6f47;
    color:white;
    border-radius:8px;
}

/* Progress bar styling */
#progressBarContainer {
    width: 100%; height: 20px; background: #d8cbb0;
    border: 2px solid #8b6f47; border-radius: 8px;
    margin-bottom: 10px; overflow: hidden;
}
#progressBarFill {
    height: 100%; width: 0%; background: #8b6f47;
    transition: width 0.5s ease-in-out;
}
#endingList { list-style: none; padding-left: 0; }
#endingList li { padding: 4px 0; color: #4b3d28; }
.ending-locked { opacity: 0.5; font-style: italic; }


/* --- Experimental Daydreams Header Bar --- */
#headerBar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
     
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top center;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

#headerTitle {
    font-family: 'Courier New', monospace;
    font-size: 2.2em;
    font-weight: bold;
    letter-spacing: 2px;
    color: #fff8dc;
    text-shadow: 3px 3px #4b3d28, 1px 1px #000;
}

/* Final unified body padding */
body {
    background-image: url('bookshelf.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;

    font-family: 'Courier New', monospace;
    padding: 20px;
    margin: 0;
}


/* FIX: ensure main content is clickable */
.wrap,
#home,
.screen,
.card {
    position: relative;
    z-index: 10;
}


/* -------------------------------------------
   SCENE 33 — SECRET ENDING BACKGROUND
------------------------------------------- */
#scene33 {
    background-image: url("bookshelf-dark.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.45);
    min-height: 100vh;
}
