/* =========================================================
   THE SOVEREIGN FORGE: TACTICAL HUD (main_theme.css)
   ========================================================= */

:root {
  --primary-green: #09f530;
  --plasma-orange: #c9511a; 
  --strobe-white: #ffffff;
  --bg-dark: #000000; /* Must be pure black for peak neon contrast */
  --border-style: 1px solid var(--primary-green);
  --crt-font: 'Courier New', Courier, monospace;
  
  /* Upgraded Cinematic Glows */
  --neon-glow: 0 0 5px rgba(9, 245, 48, 0.4), 0 0 20px rgba(9, 245, 48, 0.2);
  --neon-bloom: 0 0 10px rgba(9, 245, 48, 0.8), 0 0 30px rgba(9, 245, 48, 0.6), 0 0 50px rgba(9, 245, 48, 0.2);
  --orange-glow: 0 0 10px rgba(201, 81, 26, 0.8), 0 0 25px rgba(201, 81, 26, 0.4);
}

/* Base Resets & The Void */
html, body {
    margin: 0; padding: 0;
    background-color: var(--bg-dark) !important;
    color: var(--strobe-white);
    font-family: var(--crt-font);
    overflow-x: hidden; 
    min-height: 100vh;
}

/* ---------------------------------------------------------
   LAYER 1: THE GENERATOR (Canvas)
--------------------------------------------------------- */
#lightning-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: transparent; 
    z-index: 1; 
    pointer-events: none;
}

/* ---------------------------------------------------------
   LAYER 2: THE CRT SCANLINES (Cinematic Overlay)
--------------------------------------------------------- */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.08) 50%);
    z-index: 2;
    background-size: 100% 4px;
    pointer-events: none;
}

/* ---------------------------------------------------------
   LAYER 3: THE COCKPIT (Interactive UI)
--------------------------------------------------------- */
.site-wrapper {
    position: relative;
    z-index: 10; 
    max-width: 1400px; 
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: transparent !important;
}

/* Header & Navigation */
header {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 50px 20px; 
  border-bottom: var(--border-style);
  position: relative; 
}

/* Cinematic Navigation Links */
.nav-links {
    margin-top: 25px;
    display: flex; gap: 20px; flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 5px 10px;
    transition: all 0.2s ease-out;
    text-shadow: 0 0 5px rgba(9, 245, 48, 0.3);
}

.nav-links a:hover {
    color: var(--strobe-white);
    text-shadow: var(--neon-bloom);
    transform: translateY(-2px);
}

/* The Target Anchor */
.brand-center {
    position: relative; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

#hardware-background {
    position: fixed; /* Lock it to the entire screen */
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    
    background-image: url('../../pics/ai_rig.jpg'); 
    background-size: cover; 
    background-position: center;
    background-repeat: no-repeat;
    
    /* THE LENS: Stretches the sphere across the whole page */
    -webkit-mask-image: radial-gradient(circle at center, black 10%, transparent 80%);
    mask-image: radial-gradient(circle at center, black 10%, transparent 80%);
    
    /* Hidden State */
    opacity: 0; 
    filter: brightness(0.1) contrast(1.6) grayscale(0.5); /* Moody & Industrial */
    z-index: -2; /* Stays behind the lightning but above the black base */
    pointer-events: none;
    
    /* Cinematic transition for a slow, heavy reveal */
    transition: opacity 1.5s ease-in-out, filter 1.2s ease-in-out;
}

/* Triggered by JS when the title is hit */
#hardware-background.lightning-reveal {
    opacity: 0.45; /* Slightly brighter than the hover for impact */
    filter: brightness(0.7) contrast(1.4) grayscale(0); /* Full color "flash" */
    transition: opacity 0.1s ease-out, filter 0.1s ease-out; /* Snap on, fade off */
}

/* THE TRIGGER: Hovering the Logo reveals the whole background */
.brand-center:hover ~ #hardware-background, 
.brand-center:hover #hardware-background {
    opacity: 1; /* Subtle enough not to distract from navigation */
    filter: brightness(0.4) contrast(1.3) grayscale(0.2);
}

/* 3. Bonus: Tactical Glow Surge */
/* When the hardware is revealed, the localized flash-overlay (the green surge) gets a slight ambient pulse */
.brand-center:hover #flash-overlay {
    opacity: 0.25;
    background: radial-gradient(circle, rgba(9, 245, 48, 0.4) 0%, rgba(9, 245, 48, 0) 65%);
    transition: opacity 0.5s ease-out;
}



/* The Wizard */
/* 2. THE WIZARD HALO */
.wizard-logo {
    height: 220px; width: 220px;
    object-fit: cover; 
    clip-path: circle(50%);
    border: 2px solid #09f530;
    
    /* Heavy bloom to match the title */
    box-shadow: 
        0 0 15px rgba(9, 245, 48, 0.8), 
        0 0 30px rgba(9, 245, 48, 0.6), 
        0 0 60px rgba(9, 245, 48, 0.4);
        
    margin-bottom: 25px;
    z-index: 100;
    position: relative;
    transition: transform 0.3s ease;
}


.logo, .wizard-logo {
  height: 220px; width: 220px;
  object-fit: cover; clip-path: circle(50%);
  border: 2px solid var(--primary-green);
  box-shadow: var(--neon-glow);
  margin-bottom: 25px;
  transition: all 0.4s ease;
  z-index: 10;
}
.wizard-logo:hover { 
    transform: scale(1.03); 
    box-shadow: var(--neon-bloom);
    border-color: var(--strobe-white);
}

/* The Localized Surge */
#flash-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 700px; height: 700px; 
    background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.1) 40%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    z-index: -1; /* Behind the Wizard */
    transition: opacity 0.05s ease-out;
}
.flash-active { opacity: 1 !important; }

/* ---------------------------------------------------------
   THE MAIN TITLE & THERMAL OVERLOAD
--------------------------------------------------------- */
/* 1. THE RADIOACTIVE AURA FOR THE TITLE */
#main-title {
    position: relative;
    font-size: 5rem; 
    font-weight: bold;
    color: #ffffff; /* Strobe White Core */
    
    /* BRUTE FORCE NEON: 5 stacked layers to build a dense, solid aura */
    text-shadow: 
        0 0 2px #09f530, 
        0 0 15px #09f530, 
        0 0 30px #09f530, 
        0 0 50px rgba(9, 245, 48, 0.3),
        0 0 80px rgba(9, 245, 48, 0.2);
        
    letter-spacing: 12px; 
    text-transform: uppercase; 
    margin: 0;
    z-index: 100; /* Pushed to the absolute front */
    transition: text-shadow 0.2s ease; 
}

/* High-Voltage Jitter (Triggers with .smoking) */
#main-title.smoking {
    animation: critical-jitter 0.2s infinite;
    text-shadow: var(--orange-glow);
}

/* The Plasma Orange Smoke Plume 
#main-title.smoking::after {
    content: '';
    position: absolute;
    bottom: 80%; 
    left: 0;
    width: 100%;
    height: 140px;
    background: linear-gradient(to top, rgba(201, 81, 26, 0.95), rgba(201, 81, 26, 0.4), transparent);
    filter: blur(18px);
    pointer-events: none;
    z-index: -1;
    animation: smoke-drift 2s ease-out forwards;
}*/

@keyframes smoke-drift {
    0% { transform: translateY(0) scaleX(1); opacity: 1; }
    100% { transform: translateY(-70px) scaleX(1.6); opacity: 0; filter: blur(25px); }
}

/* Neon Green Embers */
.ember {
    position: fixed;
    width: 4px; height: 4px;
    background: var(--strobe-white); /* White hot core */
    box-shadow: 0 0 10px var(--primary-green), 0 0 20px var(--primary-green); /* Green outer halo */
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
}

/* ---------------------------------------------------------
   THE TERMINAL (AI Input)
--------------------------------------------------------- */
.query-row {
    display: flex; align-items: center;
    gap: 15px; margin-top: 20px; width: 100%;
    border-top: 1px solid rgba(9, 245, 48, 0.3);
    padding-top: 15px;
}

#ai-input {
    background: rgba(0, 0, 0, 0.5); 
    border: 1px solid transparent;
    border-bottom: 2px solid var(--primary-green);
    color: var(--primary-green); 
    outline: none;
    font-family: var(--crt-font); font-size: 1.2rem;
    flex-grow: 1;
    padding: 10px;
    transition: all 0.3s ease;
}

/* The "Thermal Spin-up" Input Focus */
#ai-input:focus {
    border-bottom: 2px solid var(--plasma-orange);
    color: var(--strobe-white);
    box-shadow: 0 4px 15px -5px rgba(201, 81, 26, 0.6);
}

#ai-submit-btn {
    background: transparent; 
    color: var(--primary-green);
    border: var(--border-style); 
    padding: 10px 20px;
    cursor: pointer; 
    font-family: var(--crt-font);
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.2s;
}

#ai-submit-btn:hover {
    background: var(--primary-green);
    color: var(--bg-dark);
    box-shadow: var(--neon-bloom);
}

/* Industrial Scrollbars */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); border-left: 1px solid rgba(9, 245, 48, 0.2); }
::-webkit-scrollbar-thumb { 
    background: var(--primary-green); 
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5); 
}

/* main_theme.css - MOBILE HARDWARE & LANDSCAPE FIX */

/* main_theme.css - MOBILE HARDWARE SURGE 
@media (max-width: 768px) {
    #hardware-background {
        position: fixed;
        width: 100vw; height: 100vh;
        background-attachment: scroll; 
        z-index: -2;
        Sharper mask for smaller screens 
        -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
        mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
    }

    Landscape Mode: Shrink UI to make room for Bosco
    @media (orientation: landscape) {
        header { padding: 15px 0 !important; }
        .wizard-logo { height: 60px; width: 60px; margin-bottom: 5px; }
        #main-title { font-size: 1.8rem; letter-spacing: 5px; }
        .nav-links { margin-top: 5px; gap: 10px; }
        .nav-links a { font-size: 0.8rem; }
    }
}
*/

.bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary-green);
    box-shadow: var(--neon-glow);
    transition: 0.4s;
}



@media screen and (max-height: 500px) and (orientation: landscape) {
    
    /* 1. RESTORE THE HAMBURGER: Ensure it's not hidden */
    .hamburger-icon {
        display: flex !important; /* Switch to flex for easier centering of bars */
        flex-direction: column;
        justify-content: space-around;
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        width: 35px; height: 30px;
        z-index: 9999 !important; /* Highest possible layer */
        background: rgba(9, 245, 48, 0.1);
        padding: 5px;
        border: 1px solid var(--primary-green);
    }

    /* 2. RE-SIZE THE TITLE: Large enough to lead, small enough to fit */
    #main-titl2e {
        font-size: 2.2rem !important; /* Increased from 1.2rem */
        letter-spacing: 6px !important;
        text-shadow: var(--neon-glow) !important;
    }

    .brand-center {
        transform: scale(1.0) !important; /* Stop the shrinking */
        margin: 10px 0;
    }

    .wizard-logo {
        height: 60px !important; width: 60px !important;
    }

    /* 3. TERMINAL EXPANSION: 70% of Viewport */
    .site-wrapper {
        display: flex !important;
        flex-direction: column !important;
        height: 100vh !important;
        overflow: hidden !important; /* Prevent double scrollbars */
    }

    header.header-main {
        flex: 0 0 25%; /* Fix header to 25% height */
        padding: 5px !important;
    }

    .terminal-main-frame {
        flex: 1; /* Stretch to fill all remaining space (75%) */
        display: flex !important;
        padding: 0 10px !important;
    }

    .ai-terminal-box {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        width: 100% !important;
    }

    #ai-response-area {
        flex-grow: 1 !important; /* Force the chat history to expand */
        height: auto !important;
        overflow-y: auto !important;
        border: 1px solid rgba(9, 245, 48, 0.4) !important;
    }
}