/* Reset en basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0a;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    /* Scanlines effect */
    background-image: repeating-linear-gradient(0deg,
            rgba(0,0,0,0.15) 0px,
            rgba(0,0,0,0.15) 2px,
            transparent 2px,
            transparent 4px);
    background-size: 100% 4px;
}

#terminal {
    width: 100%;
    max-width: 800px;
    background: #0d0d0d;
    border: 1px solid #00ff41;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

#output {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-bottom: 20px;
    min-height: 300px;
    overflow-y: auto;
}

#input-line {
    display: flex;
    align-items: center;
    border-top: 1px solid #00ff41;
    padding-top: 10px;
}

#prompt {
    color: #00ff41;
    font-weight: bold;
    margin-right: 10px;
}

#command-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #00ff41;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    outline: none;
    caret-color: #00ff41;
}

/* Knipperende cursor */
#command-input:focus {
    animation: none;
}
#command-input::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

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

/* Keypad overlay */
#keypad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#keypad {
    background: #111;
    border: 2px solid #00ff41;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 0 40px rgba(0,255,65,0.3);
    max-width: 300px;
    width: 100%;
}

#keypad-display {
    font-size: 2rem;
    text-align: center;
    letter-spacing: 10px;
    margin-bottom: 20px;
    color: #00ff41;
    background: #000;
    padding: 10px;
    border-radius: 4px;
}

.keypad-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.keypad-row button {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    background: #1a1a1a;
    color: #00ff41;
    border: 1px solid #00ff41;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.1s;
    font-family: 'Courier New', monospace;
}

.keypad-row button:hover {
    background: #00ff41;
    color: #000;
    box-shadow: 0 0 15px #00ff41;
}

.keypad-row button:active {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 600px) {
    #terminal {
        padding: 10px;
    }
    #output {
        font-size: 0.9rem;
    }
    .keypad-row button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Glow voor succes */
.success-glow {
    animation: glowPulse 1s ease-in-out 3;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px #00ff41; }
    50% { box-shadow: 0 0 60px #00ff41, 0 0 120px #00ff41; }
}
