@font-face {
    font-family: 'Fira Code';
    src: url('../fonts/FiraCode/FiraCode-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'LXGW WenKai Mono Light';
    src: url('../fonts/LXGWWenKai/LXGWWenKaiMonoLight-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* --- 基础样式 --- */
:root {
    --bg-color: #0d0d0d;
    --term-bg: rgba(20, 20, 20, 0.2);
    --term-header: #333;
    --text-color: #00ff41; /* 经典黑客绿 */
    --prompt-color: #00bfff; /* 提示符蓝色 */
    --white: #f0f0f0;
    --font-stack: 'Fira Code', 'LXGW WenKai Mono Light', 'Courier New', monospace;
}

::selection {
    background: rgba(100, 255, 100, 0.2);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-stack);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    user-select: none;
}

/* --- 背景 Canvas (数字雨) --- */
#matrix-bg {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    opacity: 0.3;
}

/* --- 顶部状态栏 --- */
#top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    border-bottom: 1px solid #333;
    z-index: 10;
    font-size: 14px;
    color: var(--white);
}

/* --- 终端窗口 --- */
#terminal {
    position: absolute;
    width: min(700px, 80vw);
    height: min(450px, 60vh);
    background-color: var(--term-bg);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    z-index: 20;
    border: 1px solid #333;
    backdrop-filter: blur(5px);
}

/* 终端标题栏 */
.term-header {
    height: 30px;
    background: #1a1a1a;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: move; /* 拖拽手势 */
    border-bottom: 1px solid #333;
}

.term-title {
    margin-left: 20px;
    color: #aaa;
    font-size: 12px;
}

/* 终端内容区 */
.term-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    color: var(--white);
    font-size: 15px;
    cursor: text;
    user-select: text; /* 允许复制内容 */
}
.term-resizer {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -8px;
    bottom: -8px;
    cursor: se-resize;
    border-right: #888 solid 2px;
    border-bottom: #888 solid 2px;
    border-bottom-right-radius: 10px;
}

/* 滚动条样式 */
.term-body::-webkit-scrollbar { width: 8px; }
.term-body::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }

/* 命令行交互 */
.output-line { margin-bottom: 5px; line-height: 1.4; word-wrap: break-word; }
.command-line { display: flex; align-items: center; }
.prompt { color: var(--prompt-color); margin-right: 8px; font-weight: bold; }

.user-input {
    color: var(--white);
    font-family: var(--font-stack);
    font-size: 15px;
}

input#cmd-input {
    background: transparent;
    border: none;
    padding: 1px 0;
    color: var(--white);
    font-family: var(--font-stack);
    font-size: 15px;
    flex: 1;
    outline: none;
}

/* 特殊颜色类 */
.c-green { color: var(--text-color); }
.c-cyan { color: #00bcd4; }
.c-yellow { color: #ffeb3b; }
.ascii-art { white-space: pre; color: var(--prompt-color); font-size: 12px; line-height: 1.2; }

.term-media-wrap {
    margin-top: 6px;
    padding: 8px;
    border: 1px solid #2e2e2e;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    max-width: 100%;
}

.term-media-label {
    color: #9ad3ff;
    font-size: 12px;
    margin-bottom: 6px;
    word-break: break-all;
}

.term-media {
    width: 100%;
    max-width: 560px;
    max-height: 320px;
    border-radius: 4px;
    background: #000;
    object-fit: contain;
}