* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-y: auto;
    background: #000000;
    color: #4CFF00; /* Klassieke Matrix Groen */
    font-family: Consolas, monospace;
    min-height: 100vh;
    -webkit-user-select: none; user-select: none;
}

/* Onthoud de uitzondering voor invoervelden en codeblokken! */
code, pre, input { user-select: text !important; }

/* Het rook-canvas op de achtergrond */
#smoke-canvas {
    position: fixed;
    top: 0; left: 0; z-index: -1;
    width: 100%; height: 100%;
}

/* De centrale console */
#caterpillar-core {
    max-width: 850px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(0, 0, 0, 0.94);
    border: 1px solid #FF0F6F; /* Vaporwave paars/roze rand */
    box-shadow: 0 0 20px rgba(255, 15, 111, 0.15);
}

header {
    text-align: center;
    border-bottom: 1px solid #FF0F6F;
    padding-bottom: 20px;
    margin-bottom: 35px;
}

.caterpillar-glitch-title {
    font-size: 24px;
    color: #FF0F6F;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(255, 15, 111, 0.4);
}

.subtitle { color: #555; font-size: 11px; margin-top: 5px; }

.caterpillar-block { margin-bottom: 35px; }

.caterpillar-block h2 {
    font-size: 15px; color: #FAFF0A; margin-bottom: 15px;
}

/* 💨 DYNAMIC PUZZLE INTERFACE STYLING */
#smoke-puzzle-box {
    background: rgba(5, 5, 5, 0.9);
    border: 1px solid #4CFF00;
    padding: 20px;
    margin-bottom: 35px;
    box-shadow: inset 0 0 10px rgba(76, 255, 0, 0.1);
}

#smoke-puzzle-box h3 { font-size: 14px; color: #4CFF00; margin-bottom: 5px; }
.puzzle-instruction { font-size: 12px; color: #888; margin-bottom: 15px; }

#progress-bar-container {
    width: 100%; height: 12px; background: #111;
    border: 1px solid #4CFF00; margin-bottom: 10px;
    position: relative; overflow: hidden;
}

#smoke-progress {
    width: 0%; height: 100%; background: #4CFF00;
    box-shadow: 0 0 10px #4CFF00; transition: width 0.3s ease;
}

#puzzle-status { font-size: 12px; font-weight: bold; color: #FAFF0A; }

/* AFBEELDING EN MEDIA BESCHERMING */
.media-container {
    position: relative; max-width: 450px; width: 100%; margin: 0 auto;
    border: 1px solid #333;
}
.media-container img { width: 100%; height: auto; display: block; pointer-events: none; }
.media-container::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0); z-index: 10;
}

/* TERMINAL TEKST BOX */
.text-terminal-style {
    background: rgba(5, 5, 5, 0.9); border-left: 3px solid #00FFCC;
    padding: 20px; line-height: 1.6; font-size: 14px; color: #ccc;
}

/* SPREIDING VAN DE DRIE NAVIGATIEKNOPPEN */
#caterpillar-nav {
    display: flex; flex-direction: column; gap: 15px; margin-bottom: 35px;
}

.caterpillar-btn {
    height: 45px; background: transparent; border: 1px solid #00FFCC;
    color: #00FFCC; font-family: Consolas, monospace; font-weight: bold;
    cursor: pointer; transition: all 0.2s ease; text-align: left; padding-left: 20px;
}

.caterpillar-btn:hover {
    background: rgba(0, 255, 204, 0.1); color: #fff;
    border-color: #fff; box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
    transform: translateX(5px);
}

/* SLUITKNOP ONDERAAN */
footer { text-align: center; border-top: 1px solid #222; padding-top: 20px; }
.back-hub-btn {
    height: 40px; padding: 0 25px; background: #FF1A0A; border: none;
    color: #fff; font-family: Consolas, monospace; font-weight: bold;
    cursor: pointer; box-shadow: 0 0 8px rgba(255, 26, 10, 0.3);
}
.back-hub-btn:hover { background: #FF0F6F; box-shadow: 0 0 15px #FF0F6F; }

/* Gerichte Caterpillar updates */
body { user-select: text; -webkit-user-select: text; }
#smoke-canvas { z-index: 0; pointer-events: none; opacity: .78; }
#caterpillar-core { position: relative; z-index: 1; width: min(850px, calc(100% - 24px)); }
.caterpillar-glitch-title { position: relative; animation: caterpillarGlitch 4.8s infinite; overflow-wrap: anywhere; }
@keyframes caterpillarGlitch {
  0%, 89%, 94%, 100% { text-shadow: 0 0 8px #ff0f6f88; transform: translateX(0); }
  90% { text-shadow: -3px 0 #00ffcc, 3px 0 #faff0a; transform: translateX(2px); }
  92% { text-shadow: 3px 0 #00ffcc, -3px 0 #faff0a; transform: translateX(-2px); }
}
.subtitle { color: #ff8c22; font-size: 13px; line-height: 1.5; }
.puzzle-instruction { color: #fff; line-height: 1.65; }
#smoke-progress { background: linear-gradient(90deg,#ff1744,#ff9100,#fff200,#4cff00,#00ffcc,#2684ff,#a34cff,#ff0f6f); box-shadow: 0 0 13px #00ffcc88; }
.media-container { max-width: 300px; margin: 0 auto; border: 2px solid #00ffcc; border-radius: 8px; overflow: hidden; transition: border-color .25s, box-shadow .25s, transform .25s; }
.media-container:hover { border-color: #ff0f6f; box-shadow: 0 0 22px #ff0f6f99; transform: translateY(-2px); }
.media-container::after { display: none; }
.text-terminal-style { color: #fff; text-align: center; line-height: 1.8; }
.text-terminal-style p { margin: 0 0 1.25em; }
.text-terminal-style p:last-child { margin-bottom: 0; }
.caterpillar-btn:hover, .caterpillar-btn:focus-visible { color: #080009; background: #ff0f6f; border-color: #faff0a; box-shadow: 0 0 17px #ff0f6f; transform: translateX(5px); }
.caterpillar-btn:focus-visible, .back-hub-btn:focus-visible { outline: 2px solid #faff0a; outline-offset: 3px; }
@media(max-width:600px) { #caterpillar-core { margin: 12px auto; padding: 17px; } .caterpillar-glitch-title { font-size: 19px; } .caterpillar-btn { min-height: 50px; height: auto; padding: 12px; } }
@media(prefers-reduced-motion:reduce) { .caterpillar-glitch-title { animation: none; } .media-container, .caterpillar-btn, #smoke-progress { transition: none; } }
