/* -------------------- BASIS / MATRIX THEME -------------------- */
:root{
    --accent: #e94f1b;
    --cyan: #00FFFF;
    --magenta: #FF00FF;
    --bg: #000;
    --muted: rgba(233,79,27,0.25);
}

body {
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    font-family: "Consolas","Courier New",monospace;
    background: var(--bg);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ---------- MATRIX LAYERS ---------- */
.matrix-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}
.layer-back { z-index: -3; opacity: 0.18; filter: blur(1px); }
.layer-mid  { z-index: -2; opacity: 0.28; filter: blur(0.4px); }
.layer-front{ z-index: -1; opacity: 0.45; }

/* matrix column */
.matrix-column {
    width: 14px;
    display: inline-block;
    white-space: pre;
    vertical-align: top;
    font-size: 14px;
    line-height: 14px;
    color: var(--accent);
}

/* characters */
.matrix-text-content {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(233,79,27,0.1);
}

/* ---------- CONTAINER / TERMINAL (FIXED SIZE & OPACITY) ---------- */
.container {
    z-index: 2;
    /* FIX: Gebruik flex-direction: column en stel max-height in */
    display: flex;
    flex-direction: column;
    /* max-height zorgt ervoor dat het past op grotere schermen, maar niet te groot wordt. */
    max-height: calc(100vh - 40px); /* 100% viewport hoogte minus 20px padding aan boven/onderkant van body */
    
    margin: 0 auto;
    box-sizing: border-box;
    
    max-width: 900px;
    width: min(900px, 94%); 
    padding: 34px;
    border: 1px solid var(--accent);
    /* FIX: Achtergrond is 40% dekkend (0.4) om de matrix-regen erdoorheen te laten zien */
    background: rgba(0,0,0,0.4); 
    box-shadow: 0 0 10px rgba(233,79,27,0.25), 0 0 25px rgba(0,0,0,0.8) inset; 
    backdrop-filter: blur(3px); 
    position: relative;
    border-radius: 8px;
    /* De inhoud bepaalt de uiteindelijke hoogte. */
}

/* Deze is cruciaal voor index.html */
.matrix-text {
    /* Zorgt ervoor dat het terminal tekstgebied de overgebleven verticale ruimte inneemt */
    flex-grow: 1;
    overflow-y: auto; 
    margin-bottom: 10px; 

    font-size: 1.1rem;
    line-height: 1.45rem;
    white-space: pre-wrap;
    min-height: 8rem; /* Zorgt voor een minimale hoogte op de index pagina */
    outline: none;
    color: var(--accent);
}

/* FIX: ASCII ART KLEUR EN UITLIJNING */
.ascii-art {
    font-size: 8px; 
    line-height: 8px;
    display: block;
    margin: 10px 0;
    color: var(--accent); 
    white-space: pre; 
}

/* FIX: CANVAS POSITIONERING VOOR CENTERING */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -4; 
}

/* cursor */
.cursor { color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1}50%{opacity:0} }

/* ---------- BUTTONS (Controls & Neon) ---------- */
/* Controls Block (Sound/Clear) */
.controls {
    display: flex;
    justify-content: flex-end; 
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
    flex-shrink: 0; 
}

/* Knopgrootte correctie */
.btn {
    font-size: 0.85rem; 
    padding: 4px 8px; 
    flex-shrink: 0;
    /* Originele regels voor .btn */
    background: transparent;
    border: 1px solid var(--muted);
    color: var(--accent);
    border-radius: 6px;
    cursor:pointer;
    transition: transform .12s ease, box-shadow .12s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 8px rgba(233,79,27,0.12); }

/* NEON BUTTON (GEFIXTE, SUBTIELE ORANJE GLOW) */
.neon-btn {
    margin-top: 8px;
    background: transparent;
    color: var(--accent); 
    border: 1px solid var(--accent); 
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    text-shadow: 0 0 4px var(--accent), 0 0 8px rgba(233, 79, 27, 0.4); 
    text-decoration: none;
    box-shadow: 0 0 6px rgba(233, 79, 27, 0.2); 
    transition: all .2s ease;
}
.neon-btn:hover { 
    box-shadow: 0 0 8px var(--accent), 0 0 16px rgba(233, 79, 27, 0.6); 
    transform: translateY(-1px); 
    color: #fff; 
}

/* -------------------- DOWNLOADS PAGINA LAYOUT FIX -------------------- */

.page-header {
    margin-bottom: 15px;
}
.page-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: normal;
    color: var(--cyan); 
    text-shadow: 0 0 6px rgba(0, 255, 255, 0.4);
}

.download-list {
    list-style: none; 
    padding: 0;
    margin: 20px 0;
    border-top: 1px dashed rgba(233,79,27,0.1);
    /* BELANGRIJK: Zorgt ervoor dat de downloadlijst de flex-groei overneemt op de downloads pagina, maar niet te veel ruimte opeist. */
    flex-grow: 1; 
    /* Staat toe dat de lijst verticaal scrollt binnen de container als deze te lang wordt */
    overflow-y: auto; 
}

.file-item {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 0;
    border-bottom: 1px dashed rgba(233,79,27,0.1);
}

.file-info {
    flex-grow: 1; 
    display: flex;
    flex-direction: column; 
    gap: 2px;
}

.filename {
    color: var(--cyan);
    font-weight: bold;
}
.description {
    color: var(--accent);
    font-size: 0.9rem;
    opacity: 0.8;
}

.download-action {
    flex-shrink: 0; 
    padding: 8px 12px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    text-decoration: none;
    transition: background 0.1s, color 0.1s;
    font-size: 0.9rem;
    margin-left: 20px; 
}

.download-action:hover {
    background: rgba(233,79,27,0.18);
    color: #fff;
}


/* -------------------- OVERIGE SECTIES -------------------- */

/* Download Block (Access Download Index) positie */
.download-block {
    display: block; 
    margin-top: 10px;
    margin-bottom: 10px;
    flex-shrink: 0;
}
.download-block .neon-btn {
    width: 100%;
    text-align: center;
}

/* ---------- DOWNLOAD PROGRESS BAR (Index Page) ---------- */
.download-progress {
    margin-top: 10px;
    width:100%;
    height: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(233,79,27,0.08);
    border-radius: 6px;
    overflow: hidden;
    display:none;
}
.download-bar {
    width:0%;
    height:100%;
    background: linear-gradient(90deg, rgba(233,79,27,0.9), rgba(255,0,255,0.8));
    transition: width .4s linear;
}
.download-text {
    margin-top:6px;
    font-size:0.85rem;
    color: rgba(233,79,27,0.9);
}

/* ---------- HUD ---------- */
.system-hud {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 210px;
    padding: 12px 14px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--accent);
    box-shadow: 0 0 18px rgba(233,79,27,0.18);
    z-index: 10;
    color: var(--accent);
    border-radius: 8px;
    font-size: 0.9rem;
}
.hud-title {
    font-weight:700;
    margin-bottom:8px;
    letter-spacing:2px;
    border-bottom:1px dashed rgba(233,79,27,0.12);
    padding-bottom:6px;
}
.hud-line { display:flex; justify-content:space-between; gap:6px; margin-bottom:4px; }
.hud-line span:first-child { color: #ff6600; }

.system-hud.glitch { animation: glitch-flicker .24s steps(2,end); }
@keyframes glitch-flicker {
    0% { transform: translate(0,0); opacity:1; }
    50% { transform: translate(2px,-2px); opacity:.25; }
    100% { transform: translate(0,0); opacity:1; }
}

/* ---------- BOOT OVERLAY FIX ---------- */
.boot-overlay {
    position: fixed;
    inset:0;
    /* FIX: Maak de overlay VOLLEDIG transparant om de Matrix Regen te laten zien */
    background: transparent; 
    z-index: 50;
    display:flex;
    align-items:center;
    justify-content:center;
}
.boot-content {
    color:var(--accent);
    width:min(780px,94%);
    padding:24px;
    border:1px solid rgba(233,79,27,0.12);
    /* FIX: De content box krijgt de donkere achtergrond */
    background: rgba(0,0,0,0.9); 
    box-shadow: 0 0 40px rgba(233,79,27,0.08);
    border-radius:8px;
}
.boot-lines { white-space:pre-line; margin-bottom:14px; font-size:0.95rem; line-height:1.6; }
.boot-progress { width:100%; height:8px; background:rgba(255,255,255,0.02); border-radius:6px; overflow:hidden; border:1px dashed rgba(233,79,27,0.06); }
.boot-bar { width:0%; height:100%; background:linear-gradient(90deg, rgba(233,79,27,0.95), rgba(255,0,255,0.8)); transition: width 700ms linear; }
.boot-hint { margin-top:8px; font-size:0.85rem; color: rgba(233,79,27,0.6); }

/* ---------- HELP CARD ---------- */
.help-card {
    position: fixed;
    left: 20px;
    bottom: 20px;
    background: rgba(0,0,0,0.6);
    color:var(--accent);
    padding:14px;
    border-radius:8px;
    border:1px solid rgba(233,79,27,0.08);
    box-shadow: 0 0 20px rgba(233,79,27,0.06);
    z-index: 30;
}