/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'VT323', 'Courier New', monospace;
    background: #000;
    color: #00ff00;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Terminal container with CRT effects */
.terminal-container {
    width: 90vw;
    max-width: 1000px;
    height: 90vh;
    max-height: 700px;
    background: #000;
    border: 2px solid #333;
    border-radius: 10px;
    box-shadow: 
        0 0 50px rgba(0, 255, 0, 0.3),
        inset 0 0 50px rgba(0, 255, 0, 0.1);
    position: relative;
    animation: flicker 0.15s infinite linear alternate;
}

/* CRT flicker effect */
@keyframes flicker {
    0% { opacity: 1; }
    98% { opacity: 1; }
    99% { opacity: 0.99; }
    100% { opacity: 1; }
}

/* Terminal header */
.terminal-header {
    background: #1a1a1a;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    border-radius: 8px 8px 0 0;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

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

.terminal-button.close {
    background: #ff5f56;
}

.terminal-button.minimize {
    background: #ffbd2e;
}

.terminal-button.maximize {
    background: #27ca3f;
}

.terminal-title {
    color: #00ff00;
    font-size: 14px;
    font-weight: normal;
}

/* Terminal screen with curvature */
.terminal-screen {
    height: calc(100% - 40px);
    background: #000;
    position: relative;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    /* CRT curvature effect */
    background: radial-gradient(ellipse at center, #001100 0%, #000000 100%);
}

/* Scanlines overlay */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.03) 2px,
        rgba(0, 255, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1000;
}

/* Terminal content */
.terminal-content {
    padding: 20px;
    height: 100%;
    font-size: 16px;
    line-height: 1.4;
    overflow-y: auto;
    position: relative;
}

/* Custom scrollbar */
.terminal-content::-webkit-scrollbar {
    width: 8px;
}

.terminal-content::-webkit-scrollbar-track {
    background: #000;
}

.terminal-content::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 4px;
}

.terminal-content::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}

/* Terminal output */
#terminal-output {
    margin-bottom: 10px;
}

.output-line {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.command-line {
    color: #00ff00;
    margin: 10px 0 5px 0;
}

.output-text {
    color: #00ff00;
    margin: 2px 0;
}

.error-text {
    color: #ff4444;
}

.warning-text {
    color: #ffaa00;
}

.success-text {
    color: #44ff44;
}

.info-text {
    color: #4488ff;
}

.link-text {
    color: #00aaff;
    text-decoration: underline;
    cursor: pointer;
}

.link-text:hover {
    color: #44ccff;
}

/* Input line */
.input-line {
    display: flex;
    align-items: center;
    position: relative;
}

.prompt {
    color: #00ff00;
    margin-right: 5px;
    white-space: nowrap;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    flex: 1;
    caret-color: transparent;
}

/* Blinking cursor */
.cursor {
    display: inline-block;
    width: 8px;
    height: 20px;
    background: #00ff00;
    margin-left: 2px;
    animation: blink 1s infinite;
}

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

/* ASCII Art styling */
.ascii-art {
    color: #00ff00;
    white-space: pre;
    font-size: 12px;
    line-height: 1.2;
    margin: 10px 0;
}

/* Loading animation */
.loading {
    color: #ffaa00;
}

.loading::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Progress bar */
.progress-bar {
    color: #00ff00;
    position: relative;
}

.progress-fill {
    color: #44ff44;
}

/* Responsive design */
@media (max-width: 768px) {
    .terminal-container {
        width: 95vw;
        height: 95vh;
    }
    
    .terminal-content {
        padding: 15px;
        font-size: 14px;
    }
    
    .terminal-title {
        font-size: 12px;
    }
    
    .ascii-art {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .terminal-container {
        width: 98vw;
        height: 98vh;
        border-radius: 5px;
    }
    
    .terminal-content {
        padding: 10px;
        font-size: 13px;
    }
    
    .prompt {
        font-size: 13px;
    }
    
    .ascii-art {
        font-size: 9px;
    }
}

/* Selection styling */
::selection {
    background: rgba(0, 255, 0, 0.3);
    color: #00ff00;
} 