/* 
   WOPR Terminal Styling - Wargames Theme
   Created for high school game development course
   Captures the retro 1980s computer terminal aesthetic
*/

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

body, html {
    min-height: 100vh; /* Changed from height: 100vh */
    background: #000;
    font-family: 'VT323', 'Courier Prime', monospace;
    /* Removed overflow: hidden to allow scrolling */
    color: #00ff00; /* Classic green terminal text */
}

/* CRT Monitor Frame - gives it that old computer look */
.crt-monitor {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 0 50px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.8);
    position: relative;
    margin-top: 20px; /* Add some top margin for better spacing */
    margin-bottom: 20px; /* Add bottom margin for scrolling space */
}

/* Screen bezel - the frame around the actual screen */
.screen-bezel {
    background: #000;
    border-radius: 10px;
    padding: 20px;
    border: 3px solid #333;
    position: relative;
    overflow: hidden;
}

/* CRT scan line effect - makes it look like an old monitor */
.screen-bezel::before {
    content: '';
    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; /* Allows clicking through the overlay */
    z-index: 10;
}

/* Terminal Header - shows system info */
.terminal-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #00ff00;
    padding-bottom: 15px;
}

.system-title {
    font-size: 2.5rem;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    letter-spacing: 0.3em;
    font-weight: bold;
    margin-bottom: 5px;
}

.system-subtitle {
    font-size: 1.2rem;
    color: #00aa00;
    margin-bottom: 5px;
}

.system-version {
    font-size: 1rem;
    color: #008800;
    font-style: italic;
}

/* Main Terminal Screen */
.terminal-screen {
    background: #000;
    min-height: 400px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #00ff00;
    border-radius: 5px;
    position: relative;
}

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

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

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

/* Terminal content area */
.terminal-content {
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    line-height: 1.4;
    white-space: pre-wrap; /* Preserves spaces and line breaks */
}

/* Individual terminal lines */
.terminal-line {
    margin-bottom: 5px;
    animation: typeIn 0.05s ease-in;
}

/* Typing animation for new text */
@keyframes typeIn {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Input line styling */
.input-line {
    display: flex;
    align-items: center;
    margin-top: 10px;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
}

.prompt {
    color: #00ff00;
    margin-right: 5px;
    font-weight: bold;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    outline: none;
    flex: 1;
    padding: 0;
}

/* Blinking cursor */
.cursor {
    color: #00ff00;
    animation: blink 1s infinite;
    margin-left: 2px;
}

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

/* Status bar at bottom */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #00ff00;
    font-size: 0.9rem;
    color: #008800;
}

/* Special text colors for different message types */
.system-message {
    color: #ffff00; /* Yellow for system messages */
}

.error-message {
    color: #ff0000; /* Red for errors */
    text-shadow: 0 0 5px #ff0000;
}

.warning-message {
    color: #ff8800; /* Orange for warnings */
}

.success-message {
    color: #00ff88; /* Bright green for success */
    text-shadow: 0 0 5px #00ff88;
}

/* Instructions panel styling */
.instructions-panel .card {
    border: 1px solid #00ff00;
    background: rgba(0, 20, 0, 0.9) !important;
}

.instructions-panel .card-header {
    background: rgba(0, 40, 0, 0.9);
    border-bottom: 1px solid #00ff00;
}

.instructions-panel code {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Launch simulator button styling */
.btn-outline-danger {
    font-family: 'VT323', monospace;
    font-size: 1rem;
    border: 2px solid #ff4500;
    color: #ff4500;
    background: rgba(255, 69, 0, 0.1);
    text-shadow: 0 0 5px #ff4500;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background: rgba(255, 69, 0, 0.2);
    box-shadow: 0 0 15px #ff4500;
    transform: scale(1.05);
    border-color: #ff4500;
    color: #ff4500;
}

/* Screen flicker effect (subtle) */
.screen-bezel {
    animation: screenFlicker 3s infinite;
}

@keyframes screenFlicker {
    0%, 98%, 100% { opacity: 1; }
    99% { opacity: 0.98; }
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .crt-monitor {
        padding: 15px;
        margin: 10px;
    }
    
    .system-title {
        font-size: 2rem;
    }
    
    .terminal-screen {
        min-height: 300px;
        max-height: 300px;
    }
    
    .terminal-content,
    .input-line {
        font-size: 1rem;
    }
}

/* Special effects for dramatic moments */
.dramatic-pause {
    animation: dramaticGlow 2s ease-in-out;
}

@keyframes dramaticGlow {
    0%, 100% { text-shadow: 0 0 5px #00ff00; }
    50% { text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00; }
}

/* Loading dots animation */
.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}