/* components.css — 终端 / 命令面板 */

/* 互动终端 */
.terminal { background: #0d1117; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; overflow: hidden; font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; color: #c9d1d9; box-shadow: 0 8px 28px rgba(0,0,0,0.3); }
.term-titlebar { display: flex; align-items: center; gap: 7px; padding: 9px 14px; background: #161b22; border-bottom: 1px solid rgba(255,255,255,0.06); }
.term-dot { width: 12px; height: 12px; border-radius: 50%; }
.term-dot.r { background: #ff5f56; } .term-dot.y { background: #ffbd2e; } .term-dot.g { background: #27c93f; }
.term-title { margin-left: 8px; font-size: 0.78rem; color: #8b949e; }
.term-out { padding: 14px 16px; height: 300px; overflow-y: auto; font-size: 0.85rem; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.term-out::-webkit-scrollbar { width: 6px; }
.term-out::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.term-line { margin: 0; }
.term-line.cmd { color: #79c0ff; } .term-line.ok { color: #56d364; } .term-line.dim { color: #8b949e; }
.term-line.accent { color: #d2a8ff; } .term-line.err { color: #ff7b72; }
.term-input-row { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #0d1117; border-top: 1px solid rgba(255,255,255,0.06); }
.term-prompt { color: #27c93f; font-weight: 700; }
.term-input { flex: 1; background: transparent; border: none; outline: none; color: #c9d1d9; font-family: inherit; font-size: 0.85rem; caret-color: transparent; }
.term-input::placeholder { color: #484f58; }
.term-cursor { width: 8px; height: 16px; background: #27c93f; animation: termBlink 1.1s steps(1) infinite; }
@keyframes termBlink { 50% { opacity: 0; } }
.terminal.busy .term-cursor { background: #ffbd2e; }

/* 命令面板 */
.palette-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; z-index: 300; opacity: 0; visibility: hidden; transition: opacity 0.2s ease; }
.palette-overlay.open { opacity: 1; visibility: visible; }
.palette { width: 92%; max-width: 560px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.35); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); overflow: hidden; transform: translateY(-8px) scale(0.98); transition: transform 0.2s ease; }
.palette-overlay.open .palette { transform: translateY(0) scale(1); }
.palette-input-wrap { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--card-border); }
.palette-icon { color: var(--text-soft); font-size: 1.1rem; }
.palette-input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 1rem; font-family: inherit; }
.palette-list { list-style: none; max-height: 320px; overflow-y: auto; margin: 0; padding: 8px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--text); transition: background 0.15s ease; }
.palette-item.active, .palette-item:hover { background: var(--accent-soft); }
.palette-item .pi-icon { font-size: 1.1rem; width: 22px; text-align: center; }
.palette-item .pi-title { flex: 1; font-size: 0.9rem; }
.palette-item .pi-hint { font-size: 0.76rem; color: var(--text-soft); }
.palette-empty { padding: 24px; text-align: center; color: var(--text-soft); font-size: 0.88rem; }
.palette-foot { display: flex; gap: 18px; justify-content: flex-end; padding: 10px 18px; border-top: 1px solid var(--card-border); font-size: 0.74rem; color: var(--text-soft); }
.palette-foot kbd { background: var(--accent-soft); color: var(--accent); padding: 2px 7px; border-radius: 5px; font-family: inherit; margin-right: 4px; }

@media (max-width: 768px) {
    .term-out { height: 240px; font-size: 0.78rem; }
    .palette { max-width: 100%; }
    .palette-overlay { padding-top: 6vh; }
}
