/* =========================================
   Hacken voor Beginners — Stylesheet
   Thema: Donker terminal / hacker stijl
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&display=swap');

/* ── Reset & basis ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg:           #040d04;
    --bg2:          #071007;
    --bg3:          #0a160a;
    --green:        #00ff41;
    --green2:       #39d353;
    --green-dim:    #1a6b2a;
    --green-glow:   rgba(0, 255, 65, 0.15);
    --red:          #ff4d4d;
    --yellow:       #ffd700;
    --cyan:         #00e5ff;
    --text:         #c0d8c0;
    --text-dim:     #4a6b4a;
    --border:       rgba(0, 255, 65, 0.2);
    --border-bright:rgba(0, 255, 65, 0.5);
    --font-mono:    'Share Tech Mono', 'Courier New', monospace;
    --font-title:   'Orbitron', monospace;
}

html, body {
    min-height: 100vh;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    overflow-x: hidden;
    line-height: 1.6;
}

/* SAT-logo als vaste achtergrond */
body {
    background-image: url('/images/SAT logo cyber .PNG');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Donkere overlay over de achtergrond */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(4, 13, 4, 0.82);
    z-index: 1;
    pointer-events: none;
}

/* ── Matrix canvas achtergrond ── */
#matrix-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.06;
    pointer-events: none;
}

/* ── Hoofd layout wrapper ── */
.page-wrapper {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    gap: 1.5rem;
}

/* Inhoud verschijnt 1 seconden na de achtergrond */
.page-wrapper {
    opacity: 0;
    animation: revealPage 0s 1s forwards;
}

@keyframes revealPage {
    to { opacity: 1; }
}


/* ── Terminal venster ── */
.terminal {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow:
        0 0 40px var(--green-glow),
        0 0 1px var(--green-dim) inset;
    max-width: 760px;
    width: 100%;
    overflow: hidden;
    animation: fadeSlideIn 0.5s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.terminal-header {
    background: rgba(0, 255, 65, 0.04);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.terminal-title {
    margin-left: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.terminal-body {
    padding: 1.75rem 2rem;
}

/* ── Prompt & cursor ── */
.prompt-line {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    color: var(--green);
}
.prompt { color: var(--green2); }

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.1em;
    background: var(--green);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ── Welkomspagina content ── */
.welcome-content {
    animation: fadeIn 0.6s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.workshop-title {
    font-family: var(--font-title);
    font-size: 1.6rem;
    color: var(--green);
    text-shadow: 0 0 24px rgba(0,255,65,0.5);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.subtitle {
    color: var(--text-dim);
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.disclaimer-box {
    background: rgba(255, 77, 77, 0.07);
    border: 1px solid rgba(255, 77, 77, 0.3);
    border-radius: 4px;
    padding: 1rem 1.25rem;
    font-size: 0.82rem;
    color: #ffaaaa;
    margin-bottom: 1.75rem;
    line-height: 1.6;
}

.section-label {
    font-family: var(--font-title);
    font-size: 0.75rem;
    color: var(--green2);
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

.challenge-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.challenge-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: rgba(0, 255, 65, 0.03);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}
.challenge-list li:hover {
    background: rgba(0, 255, 65, 0.07);
    border-color: var(--green-dim);
    color: var(--text);
}
.challenge-list li.locked {
    opacity: 0.4;
    cursor: default;
}
.challenge-list li.locked:hover {
    background: rgba(0,255,65,0.03);
    border-color: var(--border);
}

.badge {
    font-family: var(--font-title);
    font-size: 0.72rem;
    color: var(--green);
    background: rgba(0,255,65,0.1);
    border: 1px solid var(--green-dim);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    min-width: 36px;
    text-align: center;
    white-space: nowrap;
}

.btn-start {
    display: block;
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 2px solid var(--green);
    color: var(--green);
    font-family: var(--font-title);
    font-size: 1rem;
    letter-spacing: 3px;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    text-align: center;
}
.btn-start::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: rgba(0,255,65,0.08);
    transition: left 0.3s ease;
}
.btn-start:hover::before { left: 0; }
.btn-start:hover {
    box-shadow: 0 0 20px rgba(0,255,65,0.3);
    text-shadow: 0 0 8px var(--green);
}

.footer-note {
    color: var(--text-dim);
    font-size: 0.75rem;
    text-align: center;
    letter-spacing: 1px;
}

/* =========================================
   CHALLENGE PAGINA's
   ========================================= */

.challenge-page {
    justify-content: flex-start;
    padding-top: 1.5rem;
}

/* Nav bovenaan */
.challenge-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 760px;
    width: 100%;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.nav-back {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    white-space: nowrap;
}
.nav-back:hover { color: var(--green); }

.challenge-badge {
    font-family: var(--font-title);
    font-size: 0.7rem;
    color: var(--green);
    background: rgba(0,255,65,0.08);
    border: 1px solid var(--green-dim);
    border-radius: 20px;
    padding: 0.3rem 0.9rem;
    letter-spacing: 1px;
}

.progress-dots {
    display: flex;
    gap: 0.4rem;
    margin-left: auto;
}

.pdot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-dim);
    opacity: 0.3;
    transition: all 0.3s;
}
.pdot.active {
    background: var(--green);
    opacity: 1;
    box-shadow: 0 0 8px var(--green);
}
.pdot.done {
    background: var(--green2);
    opacity: 0.7;
}

/* Challenge header beschrijving */
.challenge-header {
    max-width: 760px;
    width: 100%;
    margin-bottom: 1rem;
}

.challenge-label {
    font-size: 0.75rem;
    color: var(--green-dim);
    letter-spacing: 2px;
    margin-bottom: 0.4rem;
}

.challenge-title {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--green);
    text-shadow: 0 0 20px rgba(0,255,65,0.4);
    margin-bottom: 0.6rem;
}

.challenge-desc {
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.7;
    max-width: 640px;
}

/* ── Target systeem (het nep-bedrijfslogin) ── */
.target-system {
    max-width: 760px;
    width: 100%;
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.07);
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}
.target-system.shake {
    animation: shake 0.4s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.target-header {
    background: rgba(0, 229, 255, 0.07);
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: var(--cyan);
}
.target-name { flex: 1; letter-spacing: 1px; }
.target-secure { font-size: 0.75rem; opacity: 0.7; }

.target-body {
    background: #060f06;
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.login-form-wrapper {
    width: 100%;
    max-width: 340px;
}

.login-title {
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--cyan);
    margin-bottom: 1.25rem;
    text-align: center;
    letter-spacing: 2px;
}

.login-error {
    background: rgba(255,77,77,0.1);
    border: 1px solid rgba(255,77,77,0.4);
    border-radius: 4px;
    padding: 0.6rem 0.9rem;
    color: var(--red);
    font-size: 0.82rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

.login-success-msg {
    background: rgba(0,255,65,0.08);
    border: 1px solid rgba(0,255,65,0.4);
    border-radius: 4px;
    padding: 0.6rem 0.9rem;
    color: var(--green);
    font-size: 0.82rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
    letter-spacing: 1px;
}
.form-group input {
    width: 100%;
    background: rgba(0,255,65,0.04);
    border: 1px solid rgba(0,229,255,0.2);
    border-radius: 4px;
    padding: 0.65rem 0.9rem;
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 8px rgba(0,229,255,0.15);
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0,229,255,0.08);
    border: 1px solid rgba(0,229,255,0.4);
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 0.5rem;
    transition: all 0.2s;
}
.btn-login:hover {
    background: rgba(0,229,255,0.15);
    box-shadow: 0 0 12px rgba(0,229,255,0.2);
}

/* ── Hints sectie ── */
.hints-section {
    max-width: 760px;
    width: 100%;
    margin-bottom: 2rem;
}

.hints-title {
    font-family: var(--font-title);
    font-size: 0.8rem;
    color: var(--green2);
    letter-spacing: 2px;
    margin-bottom: 0.9rem;
}

.hints-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.hint-btn {
    background: rgba(0,255,65,0.03);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.9rem 1rem;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
}
.hint-btn:hover {
    background: rgba(0,255,65,0.08);
    border-color: var(--green-dim);
}
.hint-btn.used {
    border-color: var(--green);
    background: rgba(0,255,65,0.06);
}
.hint-btn.hint-solution {
    border-color: rgba(255,215,0,0.3);
    background: rgba(255,215,0,0.03);
}
.hint-btn.hint-solution:hover {
    background: rgba(255,215,0,0.07);
    border-color: rgba(255,215,0,0.6);
}
.hint-btn.hint-solution.used {
    border-color: var(--yellow);
}

.hint-num {
    font-size: 0.82rem;
    color: var(--green2);
    font-weight: bold;
}
.hint-btn.hint-solution .hint-num {
    color: var(--yellow);
}

.hint-preview {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.hint-content {
    background: rgba(0,255,65,0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem;
    animation: fadeIn 0.3s ease;
    margin-top: 0.5rem;
}

.hint-content-title {
    color: var(--green2);
    font-size: 0.88rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-title);
    letter-spacing: 1px;
}

.hint-content-text {
    color: var(--text);
    font-size: 0.85rem;
    line-height: 1.8;
}

.hint-content-text code {
    background: rgba(0,255,65,0.1);
    border: 1px solid var(--green-dim);
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    color: var(--green);
    font-family: var(--font-mono);
}

.hint-answer-note {
    margin-top: 1rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255,215,0,0.07);
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 4px;
    color: var(--yellow);
    font-size: 0.8rem;
}

/* ── Success overlay ── */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 13, 4, 0.92);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.4s ease;
}

.success-box {
    background: var(--bg2);
    border: 1px solid var(--green);
    border-radius: 10px;
    max-width: 540px;
    width: 100%;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 0 60px rgba(0,255,65,0.2);
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.success-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: bounce 0.6s ease 0.3s both;
}
@keyframes bounce {
    from { transform: scale(0); }
    60%  { transform: scale(1.2); }
    to   { transform: scale(1); }
}

.success-box h2 {
    font-family: var(--font-title);
    color: var(--green);
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    text-shadow: 0 0 20px rgba(0,255,65,0.5);
}

.success-explain {
    color: var(--text);
    font-size: 0.85rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: left;
    background: rgba(0,255,65,0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
}

.success-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.stat {
    flex: 1;
    background: rgba(0,255,65,0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem;
}
.stat-val {
    display: block;
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--green);
    text-shadow: 0 0 10px rgba(0,255,65,0.4);
}
.stat-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-top: 0.2rem;
}

.btn-next {
    background: var(--green);
    border: none;
    color: var(--bg);
    font-family: var(--font-title);
    font-size: 0.95rem;
    padding: 0.9rem 2.5rem;
    cursor: pointer;
    border-radius: 4px;
    letter-spacing: 2px;
    transition: all 0.2s;
}
.btn-next:hover {
    box-shadow: 0 0 24px rgba(0,255,65,0.4);
    transform: translateY(-1px);
}

/* ── Terminal output (coming soon pagina) ── */
.terminal-output {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 2;
    padding: 0.5rem 0 1.5rem 0;
    white-space: pre;
}

/* =========================================
   HINT MODAL BALLON
   ========================================= */

/* Donkere achtergrond achter de ballon */
.hint-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 13, 4, 0.7);
    z-index: 200;
    animation: fadeIn 0.2s ease;
}

/* De ballon zelf */
.hint-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 201;
    width: min(500px, 92vw);
    background: var(--bg2);
    border: 1px solid var(--green);
    border-radius: 10px;
    padding: 1.75rem 1.75rem 1.5rem;
    box-shadow:
        0 0 50px rgba(0, 255, 65, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Klasse die JS toevoegt om de ballon zichtbaar te maken */
.hint-modal.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Sluit-kruisje rechtsbovenin */
.hint-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.hint-modal-close:hover {
    color: var(--green);
    background: rgba(0, 255, 65, 0.08);
}

/* Titel van de hint */
.hint-modal-title {
    font-family: var(--font-title);
    font-size: 0.85rem;
    color: var(--green2);
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding-right: 1.5rem; /* ruimte voor het kruisje */
}

/* Tekst van de hint */
.hint-modal-text {
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.85;
    margin-bottom: 0.5rem;
}
.hint-modal-text code {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--green-dim);
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    color: var(--green);
    font-family: var(--font-mono);
}

/* Noot onderaan (alleen bij de oplossing) */
.hint-modal-note {
    margin-top: 1rem;
    padding: 0.6rem 0.9rem;
    background: rgba(255, 215, 0, 0.07);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    color: var(--yellow);
    font-size: 0.8rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .hints-grid { grid-template-columns: 1fr; }
    .terminal-body { padding: 1.25rem; }
    .success-stats { flex-direction: column; }
    .workshop-title { font-size: 1.3rem; }
    .challenge-title { font-size: 1.2rem; }
}
