 :root {
            /* The specific orange from the book cover */
            --mag-orange: #FFA036; 
            --mag-black: #000000;
            --mag-white: #ffffff;
            --mag-grey: #e0e0e0;
            --border-thick: 8px;
            --border-thin: 2px;
        }

        * {
            box-sizing: border-box;
        }

        /* Scrollbar styling */
        ::-webkit-scrollbar {
            width: 12px;
        }

        ::-webkit-scrollbar-track {
            background: transparent;
        }

        ::-webkit-scrollbar-thumb {
            background: var(--mag-black);
            border-radius: 6px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: #333;
        }

        /* Firefox scrollbar */
        * {
            scrollbar-color: var(--mag-black) transparent;
            scrollbar-width: thin;
        }
        
        

        body {
            margin: 0;
            background-color: var(--mag-orange); 
    color: var(--mag-black);
    /* CHANGE 2: Prevent horizontal scrolling (white space on the right) */
    overflow-x: hidden; 
    width: 100%;
            font-family: 'Helvetica Neue', Arial, sans-serif;
            background-color: var(--mag-white);
            color: var(--mag-black);
            
        }

        /* --- TYPEOGRAPHY UTILITIES --- */
        .serif-num {
            font-family: 'Times New Roman', serif;
            font-weight: bold;
        }
        
        .condensed {
            font-family: 'Arial Narrow', sans-serif;
            font-weight: 900;
            letter-spacing: -1px;
            transform: scaleX(0.9);
        }

        /* --- SECTION 1: THE COVER (LANDING) --- */
        .cover-page {
            background-color: var(--mag-orange);
            min-height: 100vh;
            padding: 20px;
            display: flex;
            flex-direction: column;
            border-bottom: 20px solid var(--mag-black);
            position: relative;
        }

        /* The Top Header Bar */
        .msx-header {
            background: black;
            color: white;
            padding: 10px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 4px solid var(--mag-white);
        }
        
        .msx-logo {
            font-size: 3rem;
            font-weight: 900;
            letter-spacing: -2px;
            font-family: sans-serif;
        }

        .pocket-bank {
            text-align: right;
            font-family: 'Times New Roman', serif;
            font-size: 1.2rem;
        }

        /* The Main Title Area */
        .main-title {
            text-align: center;
            margin-top: 40px;
        }

        .japanese-sub {
            font-size: 1.2rem;
            font-weight: bold;
            margin-bottom: 10px;
        }

        h1 {
            font-size: 4rem; /* Massive title */
            line-height: 1;
            margin: 0;
            text-transform: uppercase;
        }

        /* The Central Image */
        .hero-image-container {
            flex-grow: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 20px 0;
        }

        .hero-image {
            width: 300px;
            height: 300px;
            background: url('https://placehold.co/400x400/0044cc/ffffff?text=ROBOT') no-repeat center;
            background-size: cover;
            /* Make it look like a cutout if using PNG */
            filter: drop-shadow(10px 10px 0px rgba(0,0,0,0.2)); 
        }

        /* The "Cover Blurbs" (Navigation) */
        .cover-nav {
            border-left: 5px solid black;
            padding-left: 15px;
            margin-bottom: 40px;
            max-width: 400px;
        }

        .nav-link {
            display: block;
            text-decoration: none;
            color: black;
            font-weight: bold;
            font-size: 1.1rem;
            margin-bottom: 10px;
            transition: transform 0.2s;
        }

        .nav-link:hover {
            transform: translateX(10px);
            text-decoration: underline;
        }


        /* --- SECTION 2: THE CONTENTS (PROJECT OVERVIEW) --- */
        .contents-page {
            max-width: 1000px;
            margin: 0 auto;
            padding: 40px 20px;
        }

        .top-bar-black {
            background: black;
            height: 15px;
            width: 100%;
            margin-bottom: 5px;
        }

        .contents-header {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            border-bottom: 2px solid black;
            margin-bottom: 0;
        }

        .contents-title {
            font-size: 5rem;
            margin: 0;
            line-height: 0.8;
            font-weight: 300; /* Thin look like original */
        }

        /* The Grid System */
        .grid-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            border-left: 2px solid black;
            border-top: 2px solid black;
        }

        .grid-cell {
            border-right: 2px solid black;
            border-bottom: 2px solid black;
            padding: 15px;
            position: relative;
            min-height: 250px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            background: white;
            transition: background 0.3s;
            text-decoration: none; /* For links */
            color: black;
        }

        .grid-cell:hover {
            background-color: #f4f4f4;
        }

        /* The Big Background Number */
        .big-number {
            position: absolute;
            top: -10px;
            right: 10px;
            font-size: 8rem;
            font-family: 'Times New Roman', serif;
            opacity: 1;
            line-height: 1;
            z-index: 0;
        }

        /* The Content Text inside Grid */
        .cell-content {
            z-index: 1;
            position: relative;
        }

        .part-label {
            font-size: 0.9rem;
            font-weight: bold;
            text-transform: uppercase;
        }

        .cell-title {
            font-size: 1.8rem;
            font-weight: 900;
            line-height: 1.1;
            margin: 10px 0;
            background: black; /* To mimic the highlight */
            color: white;
            display: inline-block;
            padding: 2px 5px;
        }

        .chapter-list {
            list-style: none;
            padding: 0;
            font-size: 0.85rem;
            margin-top: 10px;
        }
        
        .chapter-list li {
            margin-bottom: 5px;
            border-bottom: 1px dotted #999;
        }

        /* Special Styling for Grid Cell 3 (Center Spanned) */
        /* If you want a cell to span across, add class "span-2" */
        .span-2 {
            grid-column: span 2;
        }

        /* --- FOOTER / INTRO TEXT --- */
        .intro-text-block {
            padding: 40px 0;
            text-align: justify;
            column-count: 2; /* Newspaper columns */
            column-gap: 40px;
            line-height: 1.6;
            font-family: 'Times New Roman', serif; /* Serif for body text */
        }

        .intro-footer {
            background: black;
            color: white;
            text-align: center;
            font-size: 3rem;
            font-weight: 900;
            text-transform: uppercase;
            padding: 10px;
        }

        /* Mobile Adjustments */
        @media (max-width: 768px) {
            .grid-container {
                grid-template-columns: 1fr;
            }
            .span-2 {
                grid-column: span 1;
            }
            h1 { font-size: 2.5rem; }
            .contents-title { font-size: 3rem; }
            .intro-text-block { column-count: 1; }
        }
        .main-wrapper {
    display: flex;
    width: 100%;
    overflow-x: hidden; /* Vital for sliding animation */
}

.website-content {
    flex: 1; /* Takes all remaining space */
    min-width: 0; /* Prevents flex items from breaking layout */
    transition: margin 0.5s ease;
}

/* --- THE SIDEBAR ANIMATION --- */
.stream-sidebar {
    
    width: 350px;
    min-width: 350px;
    background: black;
    color: var(--mag-orange);
    height: 100vh;
    position: sticky;
    top: 0;
    border-left: 8px solid black;
    
   
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    
    
    position: sticky;
    display: flex;
    flex-direction: column;
}

/* THE COLLAPSED STATE */
.stream-sidebar.collapsed {
    width: 40px;      
    min-width: 40px;
    border-left: 2px solid black;
    cursor: pointer; 
}


.sidebar-inner {
    opacity: 1;
    transition: opacity 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 350px; 
}

.stream-sidebar.collapsed .sidebar-inner {
    opacity: 0;
    pointer-events: none; 
}

/*  THE TOGGLE BUTTON! */
.toggle-btn {
    position: absolute;
    top: 50%;
    left: -24px; 
    width: 24px;
    height: 60px;
    background: black;
    color: var(--mag-orange);
    border: none;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: background 0.3s;
}

.toggle-btn:hover {
    background: #333;
}


.stream-sidebar.collapsed .toggle-btn span {
    transform: rotate(180deg);
}

/*  VERTICAL LABEL (When Closed)  */
.vertical-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    white-space: nowrap;
    font-family: 'Arial Narrow', sans-serif;
    font-weight: 900;
    letter-spacing: 2px;
    opacity: 0;
    transition: opacity 0.3s 0.2s; 
    pointer-events: none;
}

.stream-sidebar.collapsed .vertical-label {
    opacity: 1;
}


.stream-sidebar iframe {
    flex-grow: 1;
    width: 100%;
}

/* Maybe a live dot... that would be nice.*/
@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}


@media (max-width: 900px) {
    .main-wrapper {
        flex-direction: column-reverse; 
    }
    .website-content {
        border-right: none;
    }
    .stream-sidebar {
        height: auto;
        position: relative;
        min-height: 300px;
        border-bottom: 8px solid black;
    }
}
