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

body {
    font-family: 'Courier New', 'Courier', monospace;
    background: #0a0a0a;
    color: #14fe17;
    min-height: 100vh;
    overflow: hidden;
}

/* CRT Screen Effect */
.crt {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.crt::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

.crt::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        rgba(20, 254, 23, 0.03) 0%,
        rgba(0, 0, 0, 0.15) 100%
    );
    pointer-events: none;
    z-index: 11;
}

/* Flicker animation */
@keyframes flicker {
    0% { opacity: 0.97; }
    5% { opacity: 0.9; }
    10% { opacity: 0.97; }
    15% { opacity: 0.92; }
    20% { opacity: 0.97; }
    50% { opacity: 0.95; }
    80% { opacity: 0.97; }
    90% { opacity: 0.94; }
    100% { opacity: 0.97; }
}

.terminal-container {
    position: relative;
    width: 100%;
    height: 100vh;
    padding: 40px;
    animation: flicker 0.15s infinite;
    overflow: hidden;
}

/* Scanline animation */
@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(20, 254, 23, 0.1),
        transparent
    );
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 12;
}

.terminal-header {
    border: 2px solid #14fe17;
    padding: 15px 20px;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px #14fe17;
}

.terminal-header h1 {
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.terminal-header p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.terminal-output {
    height: calc(100vh - 280px);
    overflow-y: auto;
    padding: 20px;
    border: 2px solid #14fe17;
    margin-bottom: 20px;
    background: rgba(20, 254, 23, 0.02);
    scrollbar-width: thin;
    scrollbar-color: #14fe17 #0a0a0a;
}

.terminal-output::-webkit-scrollbar {
    width: 8px;
}

.terminal-output::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.terminal-output::-webkit-scrollbar-thumb {
    background: #14fe17;
}

.output-line {
    margin-bottom: 8px;
    text-shadow: 0 0 5px #14fe17;
    line-height: 1.5;
}

.output-line.command {
    color: #5eff62;
}

.output-line.error {
    color: #ff6b6b;
    text-shadow: 0 0 5px #ff6b6b;
}

.output-line.system {
    color: #ffd700;
    text-shadow: 0 0 5px #ffd700;
}

.output-line.ascii {
    white-space: pre;
    font-size: 0.7rem;
    line-height: 1.1;
}

.input-line {
    display: flex;
    align-items: center;
    border: 2px solid #14fe17;
    padding: 15px 20px;
    background: rgba(20, 254, 23, 0.02);
}

.prompt {
    color: #14fe17;
    margin-right: 10px;
    text-shadow: 0 0 10px #14fe17;
    font-weight: bold;
}

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #14fe17;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    text-shadow: 0 0 5px #14fe17;
    caret-color: #14fe17;
}

#terminal-input::placeholder {
    color: rgba(20, 254, 23, 0.3);
}

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

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: #14fe17;
    animation: blink 1s infinite;
    vertical-align: middle;
    box-shadow: 0 0 10px #14fe17;
}

/* Boot sequence */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

.typing {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 0.5s steps(40) forwards;
}

/* Glow effect for important text */
.glow {
    text-shadow: 0 0 10px #14fe17, 0 0 20px #14fe17, 0 0 30px #14fe17;
}

/* Selection styling */
::selection {
    background: #14fe17;
    color: #0a0a0a;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .terminal-container {
        padding: 15px;
    }
    
    .terminal-header h1 {
        font-size: 0.9rem;
    }
    
    .terminal-output {
        height: calc(100vh - 240px);
        padding: 10px;
    }
    
    .output-line.ascii {
        font-size: 0.5rem;
    }
}
