/*
    :: STIL-KRIEGER (Style-Warrior) CSS Framework v2.0 ::
    :: Wandenreich Archives ::
*/

:root {
    --background: #0d0d0d;
    --foreground: #d0d0d0;
    --accent: #00e5ff; /* Default: reishi */
    --accent-dark: #00a2b3;
    --error: #ff4141;
    --success: #39ff14;
    --command: #f0f0f0;
    --highlight: #ffffff;
    --font: 'VT323', monospace;
}

/* Theme color definitions */
.theme-blut {
    --accent: #ff3333;
    --accent-dark: #cc0000;
}
.theme-kaiser {
    --accent: #ffd700;
    --accent-dark: #b89b00;
}
.theme-reishi {
    --accent: #00e5ff;
    --accent-dark: #00a2b3;
}
.theme-ginto {
    --accent: #c0c0c0;
    --accent-dark: #a9a9a9;
}


html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font);
    font-size: 1.2rem;
}

#terminal-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    cursor: text;
    position: relative;
}

/* Scanline and noise effect for a retro CRT monitor feel */
#terminal-container::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 3px, 4px 100%;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0%   { opacity: 0.9; }
  20%  { opacity: 0.8; }
  40%  { opacity: 1; }
  60%  { opacity: 0.9; }
  80%  { opacity: 1; }
  100% { opacity: 0.9; }
}

#output {
    flex-grow: 1;
    overflow-y: auto;
    word-wrap: break-word;
    padding-right: 10px;
}

/* Custom scrollbar for the terminal aesthetic */
#output::-webkit-scrollbar {
    width: 8px;
}
#output::-webkit-scrollbar-track {
    background: var(--background);
}
#output::-webkit-scrollbar-thumb {
    background: var(--accent-dark);
}
#output::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.line {
    line-height: 1.4em;
    white-space: pre-wrap;
}

#input-line {
    display: flex;
    width: 100%;
}

#prompt {
    color: var(--accent);
    margin-right: 8px;
    white-space: nowrap;
}

#command-input {
    background: transparent;
    border: none;
    color: var(--command);
    font-family: inherit;
    font-size: inherit;
    flex-grow: 1;
    outline: none;
    padding: 0;
}

#cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: var(--foreground);
    animation: blink 1s step-end infinite;
    vertical-align: bottom;
}

@keyframes blink {
    50% { background: transparent; }
}

/* Text color classes */
.output-command { color: var(--highlight); }
.output-error { color: var(--error); }
.output-success { color: var(--success); }
.output-info { color: var(--accent); }
.output-system { color: var(--foreground); }
.output-ascii { color: var(--highlight); white-space: pre; line-height: 1.1em; }

.redacted {
    background-color: var(--foreground);
    color: var(--foreground);
    user-select: none;
}

/* Visual Effect for Reiatsu Surge */
.reiatsu-surge {
    animation: surge 0.5s infinite;
}

@keyframes surge {
    0% {
        text-shadow: 2px 2px var(--error), -2px -2px var(--accent);
        transform: translate(0, 0);
    }
    25% {
        text-shadow: -2px 2px var(--error), 2px -2px var(--accent);
        transform: translate(-1px, 1px);
    }
    50% {
        text-shadow: 2px -2px var(--error), -2px 2px var(--accent);
        transform: translate(1px, -1px);
    }
    75% {
        text-shadow: -2px -2px var(--error), 2px 2px var(--accent);
        transform: translate(1px, 1px);
    }
    100% {
        text-shadow: 2px 2px var(--error), -2px -2px var(--accent);
        transform: translate(0, 0);
    }
}