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

:root {
    --terminal-bg: #0a0a0a;
    --terminal-border: #00ff41;
    --text-primary: #00ff41;
    --text-secondary: #00cc33;
    --text-dim: #008f2e;
    --warning: #ffaa00;
    --error: #ff0040;
    --info: #00aaff;
}

body {
    font-family: 'Fira Code', 'Share Tech Mono', monospace;
    background: #000000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 255, 65, 0) 0%,
        rgba(0, 255, 65, 0.03) 50%,
        rgba(0, 255, 65, 0) 100%
    );
    background-size: 100% 4px;
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 999;
}

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

.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.2;
    color: var(--text-primary);
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.terminal {
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid var(--terminal-border);
    border-radius: 8px;
    box-shadow: 
        0 0 30px rgba(0, 255, 65, 0.3),
        inset 0 0 100px rgba(0, 255, 65, 0.02);
    overflow: hidden;
    animation: flicker 0.15s infinite alternate;
}

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

.terminal-header {
    background: #1a1a1a;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--terminal-border);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-dot.red { background: #ff5f56; box-shadow: 0 0 5px #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; box-shadow: 0 0 5px #ffbd2e; }
.terminal-dot.green { background: #27c93f; box-shadow: 0 0 5px #27c93f; }

.terminal-title {
    color: var(--text-dim);
    font-size: 0.85em;
    margin-left: 10px;
}

.terminal-body {
    padding: 30px;
    font-size: 0.95em;
    line-height: 1.6;
}

.command-line {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.prompt {
    color: var(--text-primary);
    font-weight: 600;
}

.command {
    color: var(--text-secondary);
}

.cursor {
    color: var(--text-primary);
    animation: blink 1s step-end infinite;
}

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

.ascii-art {
    color: var(--terminal-border);
    font-size: 0.42em;
    line-height: 1.1;
    margin: 20px 0;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    overflow-x: auto;
}

.info-block {
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid rgba(0, 255, 65, 0.2);
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

.output {
    margin-left: 20px;
    margin-top: 10px;
}

.output p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.label {
    color: var(--text-primary);
    font-weight: 700;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.warning {
    color: var(--warning);
    font-weight: 700;
    text-shadow: 0 0 5px var(--warning);
}

.info {
    color: var(--info);
    font-weight: 700;
}

.loading-bar {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.loading-text {
    color: var(--text-primary);
    font-weight: 700;
}

.loading-dots {
    display: inline-flex;
    gap: 2px;
}

.loading-dots .dot {
    animation: dots 1.5s infinite;
    opacity: 0;
}

.loading-dots .dot:nth-child(1) { animation-delay: 0s; }
.loading-dots .dot:nth-child(2) { animation-delay: 0.3s; }
.loading-dots .dot:nth-child(3) { animation-delay: 0.6s; }

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

.percentage {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 2px;
    animation: progress 3s ease-in-out infinite;
}

@keyframes progress {
    0% { opacity: 0.5; }
    50% { opacity: 1; text-shadow: 0 0 10px var(--text-primary); }
    100% { opacity: 0.5; }
}

.footer-info {
    margin-top: 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85em;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 65, 0.2);
    border-radius: 4px;
}

.glitch {
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
    display: inline-block;
    animation: glitch 3s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.8;
}

.glitch::before {
    animation: glitchTop 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.glitch::after {
    animation: glitchBottom 1.5s infinite;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitch {
    0%, 100% { text-shadow: 0 0 5px var(--text-primary); }
    14%, 42%, 71% { text-shadow: 2px 0 0 #ff00de, -2px 0 0 #00ffff; }
}

@keyframes glitchTop {
    2%, 64% { transform: translate(2px, -2px); }
    4%, 60% { transform: translate(-2px, 2px); }
    62% { transform: translate(13px, -1px) skew(-13deg); }
}

@keyframes glitchBottom {
    2%, 64% { transform: translate(-2px, 0); }
    4%, 60% { transform: translate(-2px, 0); }
    62% { transform: translate(-22px, 5px) skew(21deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        width: 100%;
        padding: 0;
    }
    
    .terminal {
        border-radius: 4px;
    }
    
    .terminal-header {
        padding: 10px 12px;
    }
    
    .terminal-dot {
        width: 10px;
        height: 10px;
    }
    
    .terminal-title {
        font-size: 0.75em;
    }
    
    .terminal-body {
        padding: 20px 15px;
        font-size: 0.85em;
    }
    
    .ascii-art {
        font-size: 0.28em;
        margin: 15px 0;
    }
    
    .command-line {
        font-size: 0.9em;
        gap: 5px;
    }
    
    .output {
        margin-left: 10px;
    }
    
    .info-block {
        padding: 15px 0;
        margin: 20px 0;
    }
    
    .loading-bar {
        gap: 5px;
    }
    
    .percentage {
        font-size: 0.85em;
        letter-spacing: 1px;
    }
    
    .footer-info {
        margin-top: 15px;
        padding: 12px;
        font-size: 0.75em;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    .terminal-header {
        padding: 8px 10px;
    }
    
    .terminal-dot {
        width: 8px;
        height: 8px;
    }
    
    .terminal-title {
        font-size: 0.7em;
        margin-left: 5px;
    }
    
    .terminal-body {
        padding: 15px 10px;
        font-size: 0.8em;
    }
    
    .ascii-art {
        font-size: 0.22em;
        margin: 10px 0;
    }
    
    .command-line {
        font-size: 0.85em;
    }
    
    .output {
        margin-left: 5px;
    }
    
    .output p {
        margin: 6px 0;
        font-size: 0.95em;
    }
    
    .info-block {
        padding: 12px 0;
        margin: 15px 0;
    }
    
    .loading-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .percentage {
        font-size: 0.75em;
        letter-spacing: 0.5px;
        word-break: break-all;
    }
    
    .footer-info {
        font-size: 0.7em;
        padding: 10px;
    }
    
    .glitch {
        font-size: 0.9em;
    }
}
