:root {
    --bg-color: #0c0c0c;
    --text-color: #00ff41;
    --prompt-color: #00ff41;
    --font-family: 'Fira Code', monospace;
    --glass-bg: rgba(10, 15, 12, 0.75);
    --glass-border: rgba(0, 255, 65, 0.15);
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #020503;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-family);
    overflow: hidden;
}

/* Animated gradient background */
.animated-bg {
    position: absolute;
    top: -50%; left: -50%; right: -50%; bottom: -50%;
    background: radial-gradient(circle at center, #072e12 0%, #000000 40%);
    animation: rotateBg 15s linear infinite;
    z-index: 1;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.crt-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.3) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 3px 100%;
    z-index: 10;
    pointer-events: none;
    opacity: 0.7;
    animation: flicker 0.12s infinite;
}

@keyframes flicker {
    0% { opacity: 0.65; }
    50% { opacity: 0.7; }
    100% { opacity: 0.65; }
}

.terminal-container {
    width: 90vw;
    height: 80vh;
    max-width: 950px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 255, 65, 0.2), inset 0 0 0 1px var(--glass-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.terminal-container:hover {
    box-shadow: 0 30px 60px -12px rgba(0, 255, 65, 0.3), inset 0 0 0 1px rgba(0, 255, 65, 0.3);
}

.terminal-header {
    background: linear-gradient(to bottom, rgba(30, 35, 32, 0.9), rgba(15, 20, 17, 0.9));
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.buttons {
    display: flex;
    gap: 8px;
    position: absolute;
}

.buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.4);
}

.close { background: #ff5f56; }
.minimize { background: #ffbd2e; }
.maximize { background: #27c93f; }

.title {
    color: #aaa;
    margin: 0 auto;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.terminal-body {
    padding: 25px;
    flex-grow: 1;
    overflow-y: auto;
    color: var(--text-color);
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.6);
    font-size: 1.05rem;
    line-height: 1.6;
    position: relative;
    scroll-behavior: smooth;
}

.terminal-body::-webkit-scrollbar { width: 8px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 65, 0.2);
    border-radius: 4px;
}
.terminal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 65, 0.4);
}

.output {
    white-space: pre-wrap;
    word-break: break-all;
}

.sys-msg { color: #8bd49c; font-style: italic; }
.user-cmd { color: #fff; font-weight: bold; text-shadow: 0 0 5px rgba(255, 255, 255, 0.5); }
.error { color: #ff5f56; text-shadow: 0 0 8px rgba(255, 95, 86, 0.6); }
.success { color: #00ff41; }
.highlight { color: #0ff; text-shadow: 0 0 8px rgba(0, 255, 255, 0.6); }

.input-line {
    display: flex;
    align-items: center;
    margin-top: 15px;
}

.prompt {
    color: var(--prompt-color);
    margin-right: 12px;
    font-weight: 700;
}

input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-family);
    font-size: 1.05rem;
    flex-grow: 1;
    outline: none;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
    caret-color: var(--prompt-color);
}

.cursor-block {
    display: inline-block;
    width: 8px;
    height: 1.1rem;
    background-color: var(--prompt-color);
    animation: cursorBlink 1s step-end infinite;
    box-shadow: 0 0 8px var(--prompt-color);
    vertical-align: text-bottom;
    margin-left: 5px;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
