/* --- CORE SYSTEM SETTINGS --- */
:root {
    --bg-color: #000000;
    --terminal-green: #2ecc71;  /* Matrix/Terminal Green */
    --blood-red: #a80000;       /* Lain/Warning Red */
    --text-grey: #b0b0b0;
    --link-blue: #5555ff;
    --border-color: #444;
    --font-main: 'Courier New', Courier, monospace;
}

body {
    background-color: var(--bg-color);
    color: var(--text-grey);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* The Grid/Scanline Background */
    background-image: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
    animation: flicker 0.15s infinite;
}

/* --- LAYOUT GRID --- */
.container {
    width: 900px;
    max-width: 95%;
    margin: 20px auto;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 10px var(--terminal-green);
    background-color: #050505;
}

/* --- HEADER --- */
header {
    border-bottom: 2px solid var(--terminal-green);
    padding: 20px;
    text-align: center;
}

h1 {
    color: var(--terminal-green);
    text-shadow: 2px 2px var(--blood-red);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 5px;
}

.marquee-container {
    background: var(--blood-red);
    color: #fff;
    padding: 2px;
    font-size: 12px;
    overflow: hidden;
    white-space: nowrap;
}

/* CSS-only Marquee */
.marquee-content {
    display: inline-block;
    animation: scroll-left 15s linear infinite;
}

/* --- CONTENT AREA --- */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start; /* Ensures sidebar and main don't stretch weirdly */
}

/* --- SIDEBAR (Navi) --- */
aside {
    flex: 1;
    min-width: 200px;
    border-right: 2px solid var(--border-color);
    padding: 15px;
    background-color: #0a0a0a;
    box-sizing: border-box; 
}

.nav-link {
    display: block;
    color: var(--terminal-green);
    text-decoration: none;
    padding: 5px;
    border: 1px solid transparent;
    margin-bottom: 5px;
}

.nav-link:hover {
    background-color: var(--terminal-green);
    color: black;
    border: 1px solid var(--terminal-green);
    cursor: help;
}

.status-box {
    margin-top: 30px;
    border: 1px dashed var(--blood-red);
    padding: 10px;
    font-size: 0.8em;
    color: var(--blood-red);
}

/* --- MAIN BLOG SECTION --- */
main {
    flex: 3;
    padding: 20px;
    box-sizing: border-box;
}

article {
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    padding: 15px;
    background-color: #080808;
}

article h2 {
    color: #fff;
    border-bottom: 1px dashed var(--terminal-green);
    padding-bottom: 5px;
    margin-top: 0;
}

.date-stamp {
    font-size: 0.8em;
    color: var(--terminal-green);
    margin-bottom: 15px;
    display: block;
}

.img-placeholder {
    width: 100%;
    height: 200px;
    background-color: #1a1a1a;
    border: 1px solid var(--blood-red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blood-red);
    font-weight: bold;
    margin: 10px 0;
}

img {
    max-width: 100%;
    border: 1px solid var(--terminal-green);
}

/* --- CODE / CONLANG BLOCK --- */
pre.code-block {
    background-color: #000;
    border: 1px solid var(--text-grey);
    border-left: 5px solid var(--terminal-green);
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #fff;
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: inset 0 0 10px #000;
}

.code-label {
    background-color: var(--terminal-green);
    color: #000;
    padding: 2px 5px;
    font-weight: bold;
    font-size: 0.7em;
    display: inline-block;
    margin-bottom: -20px;
    position: relative;
    z-index: 1;
    margin-left: 10px;
}

/* --- FOOTER --- */
footer {
    border-top: 2px solid var(--terminal-green);
    text-align: center;
    padding: 10px;
    font-size: 0.8em;
    background-color: #000;
    clear: both;
}

/* --- UTILS --- */
hr { border: 0; border-top: 1px dotted var(--text-grey); }

/* --- ANIMATIONS --- */
@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 0.95; }
    10% { opacity: 0.9; }
    15% { opacity: 0.95; }
    20% { opacity: 0.99; }
    100% { opacity: 0.94; }
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .content-wrapper { flex-direction: column; }
    aside { border-right: none; border-bottom: 2px solid var(--border-color); width: 100%; }
}
/* --- CODE / CONLANG BLOCK --- */
pre.code-block {
    background-color: #000;
    border: 1px solid var(--text-grey);
    border-left: 5px solid var(--terminal-green);
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #fff;
    overflow-x: auto; /* Adds a scrollbar if the text is too long */
    margin: 20px 0;
    box-shadow: inset 0 0 10px #000;
}

/* Optional: Label for the code block */
.code-label {
    background-color: var(--terminal-green);
    color: #000;
    padding: 2px 5px;
    font-weight: bold;
    font-size: 0.7em;
    display: inline-block;
    margin-bottom: -20px; /* Pulls it down to touch the block */
    position: relative;
    z-index: 1;
    margin-left: 10px;
}
/* --- AUDIO MODULE CONTAINER --- */
.audio-module {
    margin: 15px auto;
    width: 300px;
    border: 1px solid var(--border-color);
    background-color: #000;
    padding: 5px;
    box-shadow: 0 0 5px var(--terminal-green);
    text-align: left;
}

.audio-label {
    font-size: 10px;
    color: var(--terminal-green);
    background-color: #000;
    margin-bottom: 2px;
    padding-left: 5px;
    letter-spacing: 2px;
    border-bottom: none;
}

/* --- THE VISUAL HACK --- */
.cyber-player {
    width: 100%;
    height: 30px;
    outline: none;
    
    /* THE MAGICAL FILTER CHAIN:
       1. invert(90%) -> Turns white background to dark grey/black.
       2. sepia(100%) -> Removes remaining colors, makes it old photo style.
       3. saturate(500%) -> Pumps up the color intensity.
       4. hue-rotate(80deg) -> Shifts the sepia tone to Matrix Green.
    */
    filter: invert(90%) sepia(100%) saturate(500%) hue-rotate(85deg) contrast(1.2);
    
    /* Mix-blend-mode ensures it blends into the background if needed */
    mix-blend-mode: screen; 
    opacity: 0.8;
}

/* Hover effect to show it's active */
.cyber-module:hover .cyber-player {
    opacity: 1;
    box-shadow: 0 0 10px var(--terminal-green);
}

/* --- GLOBAL LINK STYLES (THE NEON GREEN) --- */
a {
    /* Use a bright neon green for better contrast on black */
    color: #00ff41; 
    text-decoration: underline; 
    transition: all 0.3s ease; 
}

a:hover {
    /* Radioactive yellow-green glow on hover */
    color: #ccff00; 
    text-shadow: 0px 0px 8px #00ff41; 
    cursor: pointer;
}

a:visited {
    /* Dimmer green for visited links */
    color: #008f11; 
}

/* --- SPECIFIC FIXES --- */

/* 1. Fix the H1 Title Link 
   (Prevents the main title from looking like a standard link) */
h1 a {
    color: inherit; 
    text-decoration: none; 
}

h1 a:hover {
    text-shadow: 0 0 10px var(--terminal-green); 
}

footer a {
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
    color: var(--terminal-green);
}

/* --- GIF LINK (fixed size, no underline/glow) --- */
.gif-link{
  display:block;
  width:100px;
  height:100px;
  margin:0 auto;
  background:#222;
  border:1px solid var(--terminal-green);
  overflow:hidden;

  /* override global <a> styling */
  text-decoration:none;
  text-shadow:none;
}

/* --- GIF LINK (fixed size, no underline/glow) --- */
.gif-link{
  width:100px;
  height:100px;
  margin:0 auto;
  background:#222;
  border:1px solid var(--terminal-green);
  overflow:hidden;

  /* bring back the old "centered box" behavior */
  display:flex;
  align-items:center;
  justify-content:center;

  /* override global <a> styling */
  text-decoration:none;
  text-shadow:none;
}

.gif-link:hover,
.gif-link:visited{
  text-decoration:none;
  text-shadow:none;
  color:inherit;
}

.gif-img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover; /* fills the 100x100 like before */
  border:0;
}
