/* METATRON Terminal - Retro 1970s Interface */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: #000000;
    color: #00FF00;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    overflow: hidden;
    cursor: default;
}

#app {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Boot loader placeholder while Blazor loads */
.terminal-boot-loader {
    color: #00FF00;
    font-family: 'Courier New', Courier, monospace;
    padding: 8px 12px;
    background: #000;
    width: 100%;
    height: 100%;
}

/* Full-screen terminal container */
.terminal-screen {
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    color: #00FF00;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    padding: 12px 16px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    outline: none;
    /* Scanline overlay effect */
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
}

/* Subtle CRT phosphor glow on text */
.terminal-screen * {
    text-shadow: 0 0 6px rgba(0, 255, 0, 0.6);
}

/* Terminal output history */
.terminal-output {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    word-break: break-word;
    white-space: pre-wrap;
}

.terminal-line {
    line-height: 1.4;
    color: #00FF00;
    white-space: pre-wrap;
    word-break: break-word;
}

.terminal-line.response {
    color: #6EC6F5;
    text-shadow: 0 0 8px rgba(110, 198, 245, 0.7);
}

.terminal-line.system {
    color: #00FF00;
    opacity: 0.85;
}

.terminal-line.error {
    color: #FF4444;
}

/* Input line at the bottom */
.terminal-input-line {
    display: flex;
    align-items: center;
    margin-top: 2px;
    line-height: 1.4;
    flex-shrink: 0;
}

.terminal-prompt {
    color: #00FF00;
    margin-right: 4px;
    white-space: nowrap;
}

.terminal-current-input {
    color: #00FF00;
    white-space: pre;
    word-break: break-all;
}

/* Blinking block cursor */
.terminal-cursor {
    display: inline-block;
    width: 9px;
    height: 1.1em;
    background-color: #00FF00;
    vertical-align: text-bottom;
    animation: blink 1s step-start infinite;
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.8);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* Scrollbar styling - minimal green on black */
.terminal-screen::-webkit-scrollbar {
    width: 4px;
}

.terminal-screen::-webkit-scrollbar-track {
    background: #000;
}

.terminal-screen::-webkit-scrollbar-thumb {
    background: #005500;
}

/* Blazor error UI */
#blazor-error-ui {
    background: #000;
    color: #FF4444;
    font-family: 'Courier New', Courier, monospace;
    padding: 8px;
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 14px;
    border-top: 1px solid #FF4444;
}

#blazor-error-ui a {
    color: #FF8888;
}
