body {
    margin: 0;
    padding: 0;
    font-family: 'IBM Plex Mono', monospace;
    background: #000;
    color: #00ff00;
    overflow: hidden;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 1; /* Ensure canvas is visible by default */
}

#particles {
    z-index: -2;
    opacity: 0.6;
}

.terminal {
    background: rgba(0, 10, 0, 0.9);
    border: 3px solid #00ff00;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.4), inset 0 0 10px rgba(0, 255, 0, 0.2);
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    transform: perspective(500px) rotateX(5deg);
    animation: flicker 6s infinite alternate;
    opacity: 1; /* Ensure terminal is visible by default */
}

@keyframes flicker {
    0% { opacity: 0.95; }
    50% { opacity: 1; }
    100% { opacity: 0.95; }
}

.crt-scanlines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    opacity: 0.4;
    z-index: 1;
    animation: scanlinePulse 2s infinite;
}

@keyframes scanlinePulse {
    0% { opacity: 0.4; }
    50% { opacity: 0.6; }
    100% { opacity: 0.4; }
}

.crt-scanlines::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.glitch {
    animation: glitch 0.2s infinite, glitchColor 0.3s infinite;
    text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(3px, -3px); }
    60% { transform: translate(-3px, 0); }
    80% { transform: translate(3px, 3px); }
    100% { transform: translate(0); }
}

@keyframes glitchColor {
    0% { color: #00ff00; }
    50% { color: #00cc00; }
    100% { color: #00ff00; }
}

.blink {
    animation: blink 0.7s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.command {
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
    opacity: 1; /* Ensure commands are visible by default */
}

.command:hover {
    background: #00ff00;
    color: #000;
    cursor: default;
    box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
    animation: hoverExplode 0.3s ease-out;
}

@keyframes hoverExplode {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.command:hover::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #00ff00;
    border-radius: 50%;
    animation: particleBurst 0.5s ease-out;
    z-index: -1;
}

@keyframes particleBurst {
    0% { opacity: 1; transform: scale(0); }
    100% { opacity: 0; transform: scale(5); }
}

.output {
    display: none;
    color: #ff0000;
    text-shadow: 0 0 5px #ff0000;
}

.output.active {
    display: block;
}

.prompt {
    color: #00ff00;
    margin-right: 0.5rem;
    text-shadow: 0 0 5px #00ff00;
    opacity: 1; /* Ensure prompt is visible by default */
}

#terminal-input {
    caret-color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    opacity: 1; /* Ensure input is visible by default */
}

#terminal-input:focus {
    outline: none;
    box-shadow: 0 0 10px #00ff00;
}

#terminal-input::placeholder {
    color: #008800;
    opacity: 0.7;
}

.flicker {
    animation: flicker 0.1s infinite;
}

@keyframes flicker {
    50% { opacity: 0.8; }
}

#title {
    text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
    opacity: 1; /* Ensure title is visible by default */
}

#status-bar {
    text-align: right;
    padding-right: 1rem;
    opacity: 1; /* Ensure status bar is visible by default */
}

@media (max-width: 640px) {
    .terminal {
        padding: 1rem;
    }
    #title {
        font-size: 1.25rem;
    }
    .command, .output, #terminal-input {
        font-size: 0.875rem;
    }
    #status-bar {
        font-size: 0.75rem;
    }
}

#terminal-input {
    color: #22c55e;
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    font-family: monospace;
    position: relative;
    z-index: 10;
}

input {
    pointer-events: auto;
}
