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

body {
    background: #000;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#terminal-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

#terminal {
    flex: 1;
    background: #000;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    position: relative;
    scroll-behavior: auto; /* Changed from smooth for immediate response */
    overflow-anchor: auto; /* Keep scroll position stable */
}

#output {
    margin-bottom: 20px;
}

.input-line {
    display: flex;
    align-items: center;
}

.prompt {
    color: #0f0;
    margin-right: 5px;
}

.cursor {
    animation: blink 1s infinite;
    color: #0f0;
}

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

.stats-panel {
    width: 300px;
    background: #111;
    border-left: 2px solid #0f0;
    padding: 20px;
    font-size: 12px;
}

.stats-panel.hidden {
    display: none;
}

.stats-header {
    color: #0ff;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 1px solid #0f0;
    padding-bottom: 10px;
}

.stat-item {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.stat-label {
    color: #888;
}

.stat-value {
    color: #0f0;
    font-weight: bold;
}

.error {
    color: #f00;
}

.warning {
    color: #ff0;
}

.success {
    color: #0f0;
}

.info {
    color: #0ff;
}

.dim {
    opacity: 0.6;
}

.host-found {
    color: #0ff;
    font-weight: bold;
}

.service-found {
    color: #ff0;
}

.vuln-found {
    color: #f00;
    font-weight: bold;
}

.matrix-text {
    color: #0f0;
    text-shadow: 0 0 10px #0f0;
}

.attack-warning {
    color: #f00;
    font-weight: bold;
    animation: flash 0.5s infinite;
}

@keyframes flash {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.laser-crosshair {
    color: #f00;
    font-weight: bold;
    text-shadow: 0 0 20px #f00;
}

.violent-text {
    animation: violent 0.1s infinite;
    color: #f00;
    background: rgba(255, 0, 0, 0.1);
    width: calc(100% - 40px);
    display: block;
    padding: 2px 20px;
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    white-space: pre;
    overflow: hidden;
    text-shadow: 0 0 5px #f00;
}

@keyframes violent {
    0% { transform: translate(0); }
    25% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, -2px); }
    75% { transform: translate(-2px, -2px); }
    100% { transform: translate(2px, 2px); }
}

.kali-boot {
    color: #0ff;
    font-size: 12px;
}

.neofetch {
    color: #0ff;
    white-space: pre;
    font-size: 11px;
}

.hidden {
    display: none;
}

.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scroll indicator */
#terminal::-webkit-scrollbar {
    width: 8px;
}

#terminal::-webkit-scrollbar-track {
    background: #111;
}

#terminal::-webkit-scrollbar-thumb {
    background: #0f0;
    border-radius: 4px;
}

#terminal::-webkit-scrollbar-thumb:hover {
    background: #0ff;
}