@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap');

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

body {
    background: #000;
    font-family: 'Courier Prime', 'Courier New', monospace;
    overflow: hidden;
    height: 100vh;
}

.terminal-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, #001100 0%, #000000 100%);
    border-radius: 15px;
    box-shadow: 
        0 0 50px #00ff00,
        inset 0 0 50px rgba(0, 255, 0, 0.1);
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, #333, #111);
    color: #00ff00;
    padding: 8px 15px;
    font-size: 14px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom: 1px solid #00ff00;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.minimize { background: #ffbf00; }
.maximize { background: #00ff00; }
.close { background: #ff0000; }

.terminal-title {
    font-weight: bold;
    letter-spacing: 1px;
}

.status-indicator {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #00ff00;
}

.status-indicator.online {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#terminal {
    display: block;
    background: #000;
    border: none;
    outline: none;
    cursor: text;
    width: 100%;
    height: calc(100vh - 50px);
    image-rendering: pixelated;
}

.scanlines {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        transparent 50%, 
        rgba(0, 255, 0, 0.03) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    animation: flicker 0.15s infinite linear;
}

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

.controls-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.controls-panel button {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 8px 12px;
    font-family: 'Courier Prime', monospace;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.controls-panel button:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px #00ff00;
}

.controls-panel button:active {
    background: rgba(0, 255, 0, 0.3);
}

/* CRT curvature effect */
.terminal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    border-radius: 15px;
    pointer-events: none;
    z-index: 999;
}

/* Responsive design */
@media (max-width: 768px) {
    .terminal-container {
        border-radius: 0;
    }
    
    .terminal-header {
        border-radius: 0;
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .controls-panel {
        bottom: 10px;
        left: 10px;
        flex-wrap: wrap;
    }
    
    .controls-panel button {
        font-size: 10px;
        padding: 6px 8px;
    }
    
    #terminal {
        height: calc(100vh - 40px);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .scanlines {
        animation: none;
    }
    
    .status-indicator.online {
        animation: none;
    }
}