:root {
    /* --- NEW FESTIVE COLOR PALETTE (CSS VARIABLES) --- */
    --color-text-base: #2C2C2C;
    --color-primary-accent: #B13C3C; /* Deep Red */
    --color-secondary-accent: #375E38; /* Forest Green */
    --color-background-fill: #FFFFF0; /* Off-White/Cream for Boxes */
    --color-box-border: #D8D8BE; /* Soft Light Border */
    --color-light-bg: #EDECE4; /* Very Light Background */
    --color-light-border: #E0E0E0;
    --color-darker-bg: #F8F4E8; /* Slightly Darker Background/Blockquote */
    --color-dropdown-separator: #D4D4D4;

    --spacing-xs: 5px;
    --spacing-s: 10px;
    --spacing-m: 15px;
    --spacing-l: 20px;
}


/* --- Basic Styles --- */
body {
    background-color: var(--color-darker-bg);
    background-image: url('https://pixxiey.neocities.org/shrines/christmasbackground.jpg');
    background-repeat: repeat;
    background-size: 200px;

    /* Start https://www.cursors-4u.com */
    cursor: url(https://cur.cursors-4u.net/others/oth-6/oth589.cur), auto !important;
    /* End https://www.cursors-4u.com */

    color: var(--color-text-base);
    font-family: 'Ubuntu', 'Courier New', Courier, monospace;
    margin: 0;
    padding: var(--spacing-l);
}

/* --- Link Styling and Hover Effects --- */
a {
    color: var(--color-primary-accent);
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease-out, color 0.1s ease;
}

a:hover {
    color: var(--color-secondary-accent);
    text-decoration: underline;
    transform: rotate(2deg) translateY(-1px);
}

/* -------------------------------------------------------------------------- */
/* LAYOUT: Global and Site Header */
/* -------------------------------------------------------------------------- */

#site-header, #container {
    max-width: 1200px;
    margin: 0 auto;
}

#site-header {
    margin-bottom: var(--spacing-l);
    background-color: var(--color-light-bg);
    text-align: center; /* Centers the whole block, including the <p> tag */
    border: 3px solid var(--color-primary-accent);
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.25);
    border-radius: 12px;
}

/* NEW: This wrapper div applies Flexbox to align the title line (img - h1 - img) */
.header-content-line {
    display: flex;
    justify-content: center; /* Centers the title line horizontally */
    align-items: center;    /* Vertically aligns the items */
    margin-bottom: var(--spacing-xs); /* Small space above the description */
}

/* Styling for the decorative images within the header line */
.header-content-line img {
    margin: 0 10px; /* Space on either side of the image */
    height: 50px; /* Keeps the images at a reasonable height */
    width: auto;
}

#site-header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0; /* Important: remove default h1 margin that conflicts with flex alignment */
    color: var(--color-primary-accent);
    text-transform: uppercase;
    white-space: nowrap; /* Prevents the heading from wrapping */
}

#site-header p {
    font-size: 1em;
    margin: 0;
}


/* -------------------------------------------------------------------------- */
/* LAYOUT: Container and Columns (Flexbox Grid) - UPDATED FOR COOKBOOK */
/* -------------------------------------------------------------------------- */

#container {
    display: flex;
    gap: var(--spacing-l);
    align-items: flex-start; /* Keeps columns from stretching vertically */
}

#left-sidebar {
    /* Set specific Flex properties:
        Grow: 0 (Don't grow beyond the base size)
        Shrink: 0 (Don't shrink below the base size)
        Base Size: 250px (The desired width) */
    flex: 0 0 250px; 
    
    /* CRITICAL UPDATE: Ensures the main nav and recipe index stack vertically */
    display: flex;
    flex-direction: column; 
    /* Ensures spacing between main-nav and recipe-index when stacked */
    gap: var(--spacing-l); 
}

#main-content {
    /* Set specific Flex properties:
        Grow: 1 (Take up all available leftover space)
        Shrink: 1 (Allows content to wrap/shrink if the screen is too small)
        Base Size: auto (Don't rely on content size to start) */
    flex: 1 1 auto;
    
    /* CRITICAL: Prevents content from forcing the column wider */
    min-width: 0; 

    /* NEW/FIXED: Ensure main-content stacks items vertically (for the recipe viewer) */
    display: flex; 
    flex-direction: column;
}

/* --- The Boxed Aesthetic --- */
.box {
    background-color: var(--color-background-fill);
    border: 1px solid var(--color-box-border);
    padding: var(--spacing-m);
    /* Standard margin applied to all boxes */
    margin-bottom: var(--spacing-l);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

/* Reset for boxes that shouldn't be scrollable */
.info-box.box {
    display: block;
    max-height: none;
}

.box-header {
    background-color: var(--color-primary-accent);
    color: var(--color-background-fill);
    padding: var(--spacing-xs) var(--spacing-s);
    /* Tucks the header into the box, using negative margin */
    margin: calc(0px - var(--spacing-m)) calc(0px - var(--spacing-m)) 0 calc(0px - var(--spacing-m));

    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.1em;

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

/* Restore bottom margin for non-scrolling box headers */
.info-box .box-header {
    margin-bottom: var(--spacing-m);
}

.box-header .header-decor {
    width: 25px;
    height: 25px;
    margin-left: var(--spacing-xs);
    flex-shrink: 0;
}

/* --- Scrollable Content Wrapper --- */
.scroll-content {
    overflow-y: scroll;
    flex-grow: 1;
    /* Adjust padding/margin to handle scrollbar clipping */
    padding: var(--spacing-m) var(--spacing-l) var(--spacing-m) var(--spacing-m);
    margin: 0 calc(0px - var(--spacing-m)) calc(0px - var(--spacing-m)) calc(0px - var(--spacing-m));
}


/* --- Navigation Styling (Left Sidebar) --- */
#main-nav {
    /* IMPORTANT: Remove margin-bottom from the box itself since the gap on #left-sidebar handles spacing */
    margin-bottom: 0; 
}

#main-nav ul {
    list-style: none;
    padding: 0 0 var(--spacing-m) 0;
    margin: 0;
}

#main-nav li a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: var(--spacing-xs) var(--spacing-m);
    border-bottom: 1px dashed var(--color-light-border);
}

#main-nav li:last-child a {
    border-bottom: none;
}

#main-nav li a:hover {
    background-color: #EFEFEF;
    text-decoration: none;
}

/* --- PUSHDOWN DROPDOWN (ACCORDION) STYLES --- */
.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, visibility 0s 0.3s;
    visibility: hidden;
}

.dropdown-content ul, .dropdown-content li {
    margin: 0;
    padding: 0;
    list-style: none;
    border: none !important;
}

.dropdown:hover .dropdown-content {
    max-height: 300px;
    transition: max-height 0.3s ease-in-out, visibility 0s 0s;
    visibility: visible;
}

.dropdown-content li a {
    padding: 8px var(--spacing-m);
    line-height: normal;
    font-size: 1em;
    background-color: var(--color-darker-bg);
    border-bottom: 1px dashed var(--color-dropdown-separator);
    color: var(--color-text-base);
}

.dropdown-content li a:hover {
    background-color: var(--color-light-bg);
    color: var(--color-secondary-accent);
}

/* --- Blockquote Styling --- */
blockquote {
    background-color: var(--color-darker-bg);
    border-left: 5px solid var(--color-secondary-accent);
    padding: var(--spacing-m) var(--spacing-l) var(--spacing-m) 25px;
    margin: var(--spacing-l) 0;
    color: var(--color-text-base);
    font-style: italic;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

blockquote footer {
    display: block;
    margin-top: var(--spacing-s);
    font-style: normal;
    font-weight: bold;
    color: var(--color-secondary-accent);
    font-size: 0.9em;
}

/* --- CUSTOM HORIZONTAL DIVIDER (HR) STYLE --- */
hr {
    border: none;

    /* NEW: Use background image instead of a border */
    background-image: url('https://64.media.tumblr.com/ce4980f34dc36c2947200d40fd603184/9182bf022cb7c9fb-0b/s540x810/1546363c99194bcb894d7104937985ab9ce5b8f7.pnj'); /* HOLIDAY DIVIDER */
    background-repeat: repeat-x;
    background-position: center center;
    background-color: transparent;

    /* Set height and margin based on the GIF's size and spacing variables */
    height: 16px;
    margin: var(--spacing-l) 0;

    width: 100%;
    opacity: 1;
}

/* --- PIXEL LIST STYLE (Default for main content lists) --- */
ul:not(#main-nav ul, .dropdown-content ul, .info-box ul) {
    list-style: none;
    padding-left: var(--spacing-m);
    margin-top: 0;
}

ul:not(#main-nav ul, .dropdown-content ul, .info-box ul) li {
    padding-left: var(--spacing-l);
    position: relative;
    margin-bottom: var(--spacing-xs);
}

ul:not(#main-nav ul, .dropdown-content ul, .info-box ul) li::before {
    /* Gift Box Pixel Bullet */
    content: url('/pixels/bell.gif');  
    position: absolute;
    left: 0;
    top: 0px;
    width: 16px;
    height: 16px;

    image-rendering: pixelated;
    image-rendering: -webkit-crisp-edges;
}

/* --- ELSEWHERE IMAGE BUTTON STYLING --- */
.info-box ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: var(--spacing-xs) 0 0 0;
    list-style: none;
}

.info-box ul li {
    padding: 0 !important;
    text-align: center;
    margin: var(--spacing-xs);
}

/* Remove the pixel bullet from all links in this box */
.info-box ul li::before {
    content: none !important;
}

.info-box ul li a {
    transform: none !important;
    transition: none !important;
    margin: 0;
    display: inline-block;
}

.info-box ul li a:hover {
    text-decoration: none;
    color: inherit;
}

.info-box ul li a img {
    display: block;
    image-rendering: pixelated;
    image-rendering: -webkit-crisp-edges;
}


/* --- Two-Column Content Row (Keep this for other pages like credits) --- */
.content-row {
    display: flex;
    gap: var(--spacing-l);
    margin-bottom: var(--spacing-l);
}

.content-row .row-box {
    flex: 1;
    margin-bottom: 0;
    max-height: 250px;
    display: flex;
    flex-direction: column;
}


/* --- Optional: Handles wrapping on smaller screens (Mobile Responsiveness) --- */
@media (max-width: 700px) {
    #container, .content-row {
        flex-direction: column;
    }
    .content-row .row-box {
        margin-bottom: var(--spacing-l);
        max-height: none;
    }
}

/* -------------------------------------------------------------------------- */
/* COOKBOOK PAGE / IFRAME STYLES (New/Updated Section) */
/* -------------------------------------------------------------------------- */

/* Target the recipe viewer box */
#recipe-viewer {
    /* Ensures the viewer box itself fills the height/width of main-content */
    flex: 1;
    display: flex;
    flex-direction: column; /* To make the iframe fill the box */
    margin-bottom: 0; /* Prevents double margin since #main-content is display: flex */
}

/* Target the iframe inside the viewer box */
#recipe-viewer iframe {
    /* Iframe fills the full space of the viewer box */
    flex: 1;
    width: 100%;
    /* Increased minimum height for a larger book view */
    min-height: 800px; 
    background-color: var(--color-background-fill);
    border: none; /* Already styled by the parent box */
}

/* Target the recipe index now that it's in the sidebar */
#recipe-index {
    margin-bottom: 0; /* Space handled by #left-sidebar gap */
}




/* --- Toy Box Gallery Styles --- */
.toy-gallery ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0;
    list-style: none;
    justify-content: center;
}

.toy-gallery img {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    image-rendering: pixelated; /* Keeps pixels sharp */
    cursor: help; /* Optional: change cursor on hover */
}

.toy-gallery img:hover {
    transform: scale(1.2); /* Makes it 20% bigger */
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2)); /* Adds a soft shadow */
    z-index: 10; /* Ensures the "popping" image stays on top of others */
}


/* --- SNOW FALL EFFECT STYLES (Fixed position/overlay) --- */
body,
html {
    overflow-x: hidden;
    width: 100vw;
    height: auto;
}

.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    pointer-events: none;
}

.snowflake {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    opacity: 0.8;
    pointer-events: none;
}

@keyframes fall {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    10% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
        transform: translateY(100vh);
    }
}

@keyframes diagonal-fall {
    0% {
        opacity: 0;
        transform: translate(0, 0);
    }
    10% {
        opacity: 1;
    }
    100% {
        opacity: 0.25;
        transform: translate(10vw, 100vh);
    }
}

/* --- IFRAME SIZING FIX (General) --- */
.box iframe {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}