/* versioncontrol_style.css - Holographic Nexus Theme */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Exo+2:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;700&display=swap');

:root {
    --bg-primary: #0A0F1E;
    --bg-secondary-translucent: rgba(15, 28, 46, 0.85);
    --text-primary: #E0E0E0;
    --text-secondary: #A0B0D0;
    --accent-teal: #00F0E0;
    --accent-cyan: #33D7FF;
    --accent-lime: #7FFF00;
    --accent-purple: #9D70FF;
    --accent-orange: #FFB800;
    --glow-teal: rgba(0, 240, 224, 0.7);
    --glow-cyan: rgba(51, 215, 255, 0.6);
    --glow-lime-strong: rgba(127, 255, 0, 0.8);
    --glow-purple: rgba(157, 112, 255, 0.6);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Exo 2', sans-serif;
    --font-code: 'Roboto Mono', monospace;
    --panel-border: rgba(51, 215, 255, 0.3);
    --panel-border-strong: rgba(0, 240, 224, 0.7);
    --hologram-bg: rgba(10, 30, 70, 0.15); /* Very subtle bg for hologram */
    --hologram-border: var(--accent-cyan);
    --hologram-glow: var(--glow-cyan);
}

body.version-control-page {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Important for full-page canvas/effects */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Behind everything */
    pointer-events: none;
}

#matrixCanvas.blur-active {
    filter: blur(5px) brightness(0.6); /* Adjust blur and brightness as needed */
    transition: filter 0.5s ease-in-out;
}

.hamburger-menu {
    display: none; /* Hidden by default, shown in media query */
    position: fixed; /* Or absolute, depending on desired placement */
    top: 20px;
    left: 20px;
    z-index: 1001; /* Above everything else */
    background: var(--accent-teal);
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--bg-primary); /* Or white, depending on button bg */
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* Hamburger animation for 'open' state (X shape) */
.hamburger-menu.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.open span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


.page-wrapper {
    display: flex;
    flex-grow: 1; /* Allows footer to stick to bottom */
    width: 100%;
    max-width: 1600px; /* Max width for very large screens */
    margin: 0 auto;
    position: relative; /* For absolute positioning of hologram area if needed */
    z-index: 1;
    transition: filter 0.5s ease-in-out; /* For background blur */
}

/* .page-wrapper.blur-active { */
    /* filter: blur(5px) brightness(0.7); /* Blur and darken background */ */
    /* pointer-events: none; /* Prevent interaction with blurred background - be careful with this */
/* } */


/* --- Sidebar --- */

.version-sidebar {
    width: 280px; 
    padding: 30px 20px;
    
    /* Adjust background for good blur visibility:
       - Alpha (opacity) is important. If too transparent, blur is less noticeable.
       - If too opaque, you don't see what's behind to blur.
       - Let's try a balanced value.
    */
    background-color: rgba(30, 40, 70, 0.75); /* Slightly bluish, medium transparency */
    
    /* This is the key for blurring what's BEHIND the sidebar */
    backdrop-filter: blur(10px) saturate(110%); /* Increased blur, slight saturate */
    -webkit-backdrop-filter: blur(10px) saturate(110%); /* Safari */
    
    border-right: 1px solid var(--panel-border-strong); /* Clear edge definition */
    box-shadow: 4px 0px 20px rgba(0, 0, 0, 0.35); /* Shadow to lift it from main content and background */
    
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* In case content exceeds height */
    z-index: 10; /* Make sure it's above the matrixCanvas and page-wrapper */
    
    /* No transitions needed here for the static blur effect itself */
}

/* Ensure content within the sidebar is not affected by its parent's transparency/blur */
.sidebar-header,
.version-list {
    position: relative; /* Establishes stacking context if needed */
    z-index: 1; /* Ensures content is "on top" of the sidebar's background */
}
.sidebar-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 20px;
}

.lead-scribe-character {
    width: 70px;
    height: 70px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 8px var(--glow-cyan));
    animation: gentleHoverSidebar 4s ease-in-out infinite;
}
@keyframes gentleHoverSidebar {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-5px) scale(1.03); }
}

.sidebar-header h2 {
    font-family: var(--font-display);
    color: var(--accent-teal);
    font-size: 1.6em;
    margin: 0;
    text-shadow: 0 0 5px var(--glow-teal);
}

.version-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.version-list li {
    font-family: var(--font-code);
    padding: 12px 15px;
    margin-bottom: 8px;
    border: 1px solid transparent;
    border-left: 3px solid var(--panel-border);
    color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-size: 0.95em;
}

.version-list li:hover {
    background-color: rgba(var(--accent-cyan), 0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateX(5px);
    box-shadow: 0 0 10px rgba(var(--accent-cyan), 0.3);
}

.version-list li.active {
    background-color: rgba(var(--accent-lime), 0.2);
    border-color: var(--accent-lime);
    color: var(--accent-lime);
    font-weight: 700;
    box-shadow: 0 0 15px var(--glow-lime-strong);
}
.version-list li .version-item-title {
    display: block;
    font-size: 0.8em;
    opacity: 0.7;
    margin-top: 2px;
}

/* --- Main Hologram Content Area --- */
.hologram-main-content {
    flex-grow: 1;
    padding: 40px; /* Desktop padding */
    display: flex;
    justify-content: center; 
    align-items: center; /* Vertically center hologram on desktop */
    position: relative; 
    /* Removed overflow: hidden from here; let the child handle its scroll */
    z-index: 5; 
}

.hologram-display-area {
    width: 90%; 
    max-width: 900px;
    background: var(--hologram-bg);
    border: 2px solid var(--hologram-border);
    border-radius: 10px;
    box-shadow: 0 0 25px var(--hologram-glow), 
                0 0 50px rgba(var(--accent-cyan), 0.4),
                inset 0 0 15px rgba(var(--accent-cyan), 0.2);
    backdrop-filter: blur(8px) brightness(1.1); 
    color: var(--text-primary);
    opacity: 0; 
    transform: scale(0.7) translateY(50px);
    transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Key properties for scrolling: */
    max-height: 80vh; /* Max height for desktop (80% of viewport height) */
    padding: 30px 40px; /* Padding INSIDE the hologram */
    overflow-y: auto;   /* This enables vertical scrollbar when content exceeds max-height */
    
    z-index: 20; 
    position: relative; 
    display: flex; /* To allow .hologram-content to grow if needed */
    flex-direction: column; /* Stack header and lists inside */
}

.hologram-display-area.visible {
    opacity: 1;
    transform: scale(1) translateY(0px);
}

/* Ensure the .hologram-content div can also grow if needed */
.hologram-display-area .hologram-content {
    width: 100%; /* Take full width of parent padding box */
    /* No specific height or max-height here, let it be determined by its content.
       The overflow-y: auto on .hologram-display-area will handle its scrolling. */
}

.hologram-placeholder {
    text-align: center;
    padding: 50px 20px;
    font-size: 1.2em;
    color: var(--text-secondary);
    opacity: 0.7;
}
.pda-placeholder-icon img {
    width: 60px;
    height: 60px;
    fill: var(--accent-purple);
    opacity: 0.5;
    margin-top: 20px;
    animation: pulseGlowPDA 3s ease-in-out infinite alternate;
}
@keyframes pulseGlowPDA { /* Re-declare if needed, or use existing if in scope */
    from { filter: drop-shadow(0 0 4px var(--glow-purple)); opacity: 0.5; }
    to { filter: drop-shadow(0 0 10px var(--accent-purple)); opacity: 0.8; }
}


/* Hologram Content Styling (pulled from .version-entry) */
.hologram-content .version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(var(--accent-purple), 0.5);
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.hologram-content h2 { /* Version number in hologram */
    font-family: var(--font-display);
    font-size: 2em;
    color: var(--accent-lime);
    margin: 0;
    text-shadow: 0 0 8px var(--glow-lime-strong);
}
.hologram-content .date {
    font-family: var(--font-code);
    font-size: 0.9em;
    color: var(--accent-orange);
}
.hologram-content h3 { /* Main title of the version changes */
    font-family: var(--font-heading);
    font-size: 1.5em;
    color: var(--accent-teal);
    margin-top: 25px;
    margin-bottom: 15px;
    text-shadow: 0 0 5px var(--glow-teal);
}
.hologram-content ul {
    list-style: none;
    padding-left: 5px;
}
.hologram-content ul li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 8px;
    color: var(--text-primary); /* Brighter text in hologram */
    font-size: 0.95em;
}
.hologram-content ul li::before {
    content: '✧'; /* Sparkle or other unicode character */
    position: absolute;
    left: 0;
    top: 0px;
    color: var(--accent-cyan);
    font-size: 1.1em;
    text-shadow: 0 0 5px var(--glow-cyan);
    animation: sparkle 1.5s ease-in-out infinite alternate;
}
@keyframes sparkle {
    from { opacity: 0.6; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.1); }
}
.hologram-content ul ul {
    margin-top: 6px;
    padding-left: 15px;
}
.hologram-content ul ul li::before {
    content: '▹'; /* Different marker for sub-list */
    color: var(--accent-purple);
    text-shadow: 0 0 3px var(--glow-purple);
}

/* --- Footer (Keep largely as is, adjust if needed for new layout) --- */
.app-footer {
    padding: 20px; /* Less padding if page-wrapper handles main spacing */
    background: rgba(10, 15, 30, 0.8);
    border-top: 1px solid var(--panel-border-strong);
    color: var(--text-secondary);
    font-size: 0.85em;
    text-align: center;
    box-shadow: 0 -3px 15px rgba(var(--glow-teal), 0.5);
    position: relative;
    z-index: 2; /* Above matrix canvas */
}
/* ... (rest of your footer styles: .footer-grid, etc.) ... */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-left, .footer-center, .footer-right {
    padding: 5px;
}
.footer-center .slogan-text {
    font-family: var(--font-display);
    color: var(--accent-teal);
    font-size: 1em;
}
.app-footer a {
    color: var(--accent-cyan);
    text-decoration: none;
}
.app-footer a:hover {
    color: var(--accent-teal);
    text-decoration: underline;
}


/* Tablet and Larger Mobile (e.g., up to 900px) */
@media (max-width: 900px) {
    .page-wrapper {
        flex-direction: column; /* Stack sidebar and main content */
    }

    .hamburger-menu {
        display: block; /* Show hamburger icon */
    }

    .version-sidebar {
    position: fixed; /* Or absolute, to overlay content */
    top: 0;
    left: 0;
    width: 280px; /* Or your preferred width for slide-in */
    height: 100vh; /* Full height */
    max-height: 100vh; /* Override previous vh limits */
    background: rgba(15, 25, 55, 0.95); /* More opaque for overlay */
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    border-right: 1px solid var(--panel-border-strong);
    box-shadow: 3px 0 15px rgba(0,0,0,0.4);
    
    /* KEY CHANGE: Initial hidden state for mobile */
    transform: translateX(-100%); 
    
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000; /* Below hamburger, above other content */
    border-bottom: none; 

    /* Ensure display:flex is still here if it was on the base .version-sidebar rule,
       or set display to block if fixed positioning handles layout.
       If the base rule has display:flex, it will be inherited.
       If not, you might need display: flex; flex-direction: column; here too.
       However, for a position:fixed element, display:flex is mainly for its children.
    */
    display: flex; /* Keep this for internal layout of sidebar children */
    flex-direction: column; /* Keep this too */
}

.version-sidebar.open {
    transform: translateX(0%); /* Slide in */
}

    .sidebar-header { 
        margin-bottom: 15px; 
        padding-bottom: 15px; 
    }
    .lead-scribe-character { 
        width: 50px; 
        height: 50px; 
    } 
    .sidebar-header h2 { 
        font-size: 1.4em; 
    }
    .version-list li { 
        padding: 12px 15px; /* Increased from 10px 15px - more vertical padding */
        font-size: 0.9em;
        min-height: 20px; /* Ensure a minimum tap height, content will make it larger */
        display: flex; /* Helps if you want to vertically align text within the padding */
        align-items: center; /* Vertically align text if using flex */
    }
    .version-list li .version-item-title {
        font-size: 0.75em;
    }

    .hologram-main-content {
        padding: 20px 15px; 
        flex-grow: 1; 
        display: flex;
        justify-content: center; 
        align-items: flex-start; /* Align hologram to the top of this container */
        /* overflow-y: auto; /* Removed from here to let .hologram-display-area manage its own scroll primarily */
    }

    .hologram-display-area {
        width: 100%; 
        max-width: none; 
        max-height: calc(100% - 40px); 
        min-height: 250px; 
        /* Increased top padding to clear potential fixed hamburger menu */
        padding: 45px 25px 20px 25px; /* Top, Right, Bottom, Left (was 20px 25px) */
        margin-top: 0; 
        overflow-y: auto; 
        z-index: 20; 
        position: relative; 
    }

    .hologram-content .version-header {
        flex-direction: column; /* Stack version and date */
        align-items: center; /* Center items in the column */
        gap: 8px; /* Add some gap between h2 and date */
    }

    .hologram-content h2 { 
        font-size: 1.6em; 
        text-align: center; /* Center the h2 text on mobile */
    }

    .hologram-placeholder {
        font-size: 1em;
        padding: 30px 15px;
    }
    .pda-placeholder-icon img {
        width: 50px;
        height: 50px;
    }

    .hologram-content .date {
        font-size: 0.85em;
    }
    .hologram-content h3 { 
        font-size: 1.2em; 
        margin-top: 20px;
        margin-bottom: 10px;
    }
    .hologram-content ul li {
        font-size: 0.9em;
        padding-left: 18px; 
    }
    .hologram-content ul li::before {
        font-size: 1em; 
    }

    .app-footer {
        padding: 15px;
        font-size: 0.8em;
    }
    .footer-grid {
        grid-template-columns: 1fr; 
        text-align: center; 
        gap: 10px;
    }
    .footer-left, .footer-center, .footer-right {
        padding: 5px 0; 
    }
}



/* ============== NEW MEDIA QUERY BLOCK STARTS HERE ============== */
/* Portrait Tablets and Large Phones (e.g., up to 768px) */
@media (max-width: 768px) {
    .version-sidebar {
    position: fixed; /* Or absolute, to overlay content */
    top: 0;
    left: 0;
    width: 280px; /* Or your preferred width for slide-in */
    height: 100vh; /* Full height */
    max-height: 100vh; /* Override previous vh limits */
    background: rgba(15, 25, 55, 0.95); /* More opaque for overlay */
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    border-right: 1px solid var(--panel-border-strong);
    box-shadow: 3px 0 15px rgba(0,0,0,0.4);
    
    /* KEY CHANGE: Initial hidden state for mobile */
    transform: translateX(-100%); 
    
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000; /* Below hamburger, above other content */
    border-bottom: none; 

    /* Ensure display:flex is still here if it was on the base .version-sidebar rule,
       or set display to block if fixed positioning handles layout.
       If the base rule has display:flex, it will be inherited.
       If not, you might need display: flex; flex-direction: column; here too.
       However, for a position:fixed element, display:flex is mainly for its children.
    */
    display: flex; /* Keep this for internal layout of sidebar children */
    flex-direction: column; /* Keep this too */
}

.version-sidebar.open {
    transform: translateX(0%); /* Slide in */
}

    .hamburger-menu {
        display: block; /* Show hamburger icon */
    }

    .lead-scribe-character {
        width: 45px; /* Slightly smaller scribe */
        height: 45px;
    }
    .sidebar-header h2 {
        font-size: 1.3em; /* Slightly smaller title */
    }
    .version-list li {
        padding: 10px 12px; /* Adjusted from 9px 12px */
        font-size: 0.88em; 
        min-height: 18px; /* Minimum tap height */
        display: flex;
        align-items: center;
    }

     .hologram-main-content {
        padding: 15px 10px; 
    }
    .hologram-display-area {
        /* Top padding might need slight adjustment if hamburger size/position changes */
        padding: 40px 20px 20px 20px; /* (was 20px) */
    }
    
    .hologram-content h2 {
        font-size: 1.5em; 
        text-align: center; /* Ensure it's still centered */
    }
    
    .hologram-placeholder {
        font-size: 0.95em;
    }
    .pda-placeholder-icon img {
        width: 45px;
        height: 45px;
    }

    .hologram-content h3 {
        font-size: 1.15em; /* Slightly smaller */
    }
    .hologram-content ul li {
        font-size: 0.88em; /* Slightly smaller */
    }

    .app-footer {
        font-size: 0.78em; /* Slightly smaller footer text */
    }
}
/* ============== NEW MEDIA QUERY BLOCK ENDS HERE ============== */


/* Smaller Mobile Devices (e.g., up to 480px) */
@media (max-width: 480px) {
    .version-sidebar {
        padding: 15px 10px;
        /* max-height: 35vh;  */
    }.hamburger-menu {
        top: 15px;
        left: 15px;
        padding: 8px;
    }
    .hamburger-menu span {
        width: 22px;
        height: 2.5px;
        margin: 4px 0;
    }
    .sidebar-header h2 {
        font-size: 1.2em;
    }
    .lead-scribe-character {
        width: 40px;
        height: 40px;
    }
    .version-list li {
        padding: 12px 10px; /* Significantly increased vertical padding from 8px */
        font-size: 0.85em;
        min-height: 24px; /* Ensure decent tap height even with small font */
        display: flex;
        align-items: center;
    }

    .hologram-main-content {
        padding: 15px 10px; 
    }
    .hologram-display-area {
        padding: 15px; 
        max-height: 60vh; /* Can allow a bit more vertical space if sidebar is shorter */
        overflow-y: auto; /* Ensure it's still here */
    }
    .hologram-content h2 {
        font-size: 1.4em;
    }
    .hologram-content h3 {
        font-size: 1.1em;
    }
    .hologram-content ul li {
        font-size: 0.85em;
    }

    .app-footer {
        font-size: 0.75em;
    }
}