:root {
    --bg-color: #0d1117;
    --term-glass: rgba(22, 27, 34, 0.85);
    --primary: #58a6ff; /* 现代蓝 */
    --accent: #238636;  /* 成功绿 */
    --error: #da3633;
    --text: #c9d1d9;
    --font: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    height: 100vh;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 50% 50%, #161b22 0%, #000 100%);
    color: var(--text);
    font-family: var(--font);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CRT 扫描线遮罩 */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    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));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

.container {
    width: 90%;
    height: 90%;
    display: flex;
    gap: 20px;
}

/* 侧边栏设计 (EDEX-UI 风格) */
.sidebar {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background: var(--term-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.widget h3 {
    margin: 0 0 5px 0;
    font-size: 0.8rem;
    color: var(--primary);
    border-bottom: 1px solid rgba(88, 166, 255, 0.3);
}

.bar-graph {
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.bar-graph .fill {
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.status-ok { color: var(--accent); font-weight: bold; text-shadow: 0 0 5px var(--accent); }

/* 终端主体 */
.terminal {
    flex: 1;
    background: var(--term-glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
    position: relative;
}

.terminal-header {
    margin-bottom: 15px;
    opacity: 0.7;
    font-size: 0.9rem;
}

#output {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* 滚动条美化 */
#output::-webkit-scrollbar { width: 8px; }
#output::-webkit-scrollbar-thumb { background: rgba(88, 166, 255, 0.3); border-radius: 4px; }

.cmd-line { margin-bottom: 5px; }
.response { margin-bottom: 15px; color: #ddd; white-space: pre-wrap; }
.response a { color: var(--primary); text-decoration: none; border-bottom: 1px dashed var(--primary); }
.response a:hover { color: #fff; text-shadow: 0 0 8px var(--primary); }

.input-line { display: flex; align-items: center; }
.prompt { color: var(--accent); margin-right: 10px; font-weight: bold; }

#command-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font);
    font-size: 1rem;
    flex: 1;
    outline: none;
    caret-color: var(--primary);
}