﻿:root { --bg:#0b0e12; --card:#121720; --text:#e5ecff; --muted:#94a3b8; --accent:#7c3aed; --accent2:#22d3ee; }
* { box-sizing: border-box; }
html, body { height:100%; }
body { margin:0; min-height:100vh; background:linear-gradient(160deg,#0b0e12,#0f1420 60%, #0b0e12); background-attachment: fixed; color:var(--text); font:16px/1.5 system-ui,Segoe UI,Roboto,Arial; }
header { display:flex; justify-content:space-between; align-items:center; padding:18px 22px; border-bottom:1px solid #1f2937; background:rgba(10,12,18,.6); backdrop-filter: blur(8px); position:sticky; top:0; z-index:10; }
.logo { font-weight:800; letter-spacing:0.5px; }
nav button { margin-left:10px; background:#1f2937; color:var(--text); border:1px solid #263042; padding:10px 14px; border-radius:10px; cursor:pointer; font-size:15px; }
nav button:hover { border-color: var(--accent); }
main { padding:22px; max-width:1280px; margin:0 auto; }
h1 { margin:10px 0 18px; font-size:22px; }
.cards { display:grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap:14px; }
.card { background: radial-gradient(120% 120% at 0% 0%, #182033 0%, #121720 80%); border:1px solid #1f2a3f; border-radius:16px; padding:18px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.card .name { font-weight:600; margin-bottom:6px; }
.muted { color: var(--muted); }
.player-card { background:#0d1220; border:1px solid #1f2a3f; border-radius:12px; padding:12px; display:flex; align-items:center; justify-content:space-between; }
.player-info { display:flex; align-items:center; gap:10px; }
.player-actions button { margin-left:6px; }
.row { display:flex; gap:12px; align-items:center; margin:8px 0; }
.row label { width:140px; color: var(--muted); }
input, select { flex:1; background:#0d1220; color:var(--text); border:1px solid #1f2a3f; padding:10px 12px; border-radius:10px; }
button { background:linear-gradient(90deg,var(--accent),var(--accent2)); color:white; border:none; padding:10px 14px; border-radius:10px; cursor:pointer; font-size:15px; }
button.secondary { background:#1f2937; color:var(--text); border:1px solid #263042; }
.hidden { display:none; }
.details-header { display:flex; justify-content:space-between; align-items:center; }
.grid { display:grid; grid-template-columns: 1fr 1fr; gap:18px; }
.logs { background:#0d1220; border:1px solid #1f2a3f; border-radius:8px; padding:12px; height:440px; overflow:auto; }
.search { display:flex; gap:8px; margin-bottom:10px; }
#plugin-results .plugin { border:1px solid #1f2a3f; border-radius:10px; padding:12px; margin-bottom:8px; display:flex; justify-content:space-between; align-items:center; background:#0d1220; }
#plugin-results .plugin .progress { font-size:13px; color:var(--muted); margin-left:10px; }
.plugins-wrap { max-height: 480px; overflow: auto; border:1px solid #1f2a3f; border-radius:10px; padding:8px; background:#0d1220; }

/* Sidebar layout for details */
.details-layout { display:grid; grid-template-columns: 260px 1fr; gap:18px; }
.sidebar { background:#0d1220; border:1px solid #1f2a3f; border-radius:10px; padding:12px; display:flex; flex-direction:column; height: fit-content; min-height: 520px; }
.sidebar .tab-btn { background:#101726; border:1px solid #1f2a3f; color:var(--text); text-align:left; padding:12px; margin-bottom:8px; border-radius:8px; }
.sidebar .tab-btn.active { border-color: var(--accent); }
.sidebar .spacer { flex:1; }
.sidebar .danger { background:#7f1d1d; border:1px solid #b91c1c; }
.tab-views { display:block; }
.tab-view { background: radial-gradient(120% 120% at 0% 0%, #182033 0%, #121720 80%); border:1px solid #1f2a3f; border-radius:16px; padding:18px; }
.status-cards { display:grid; grid-template-columns: repeat(4, minmax(120px,1fr)); gap:10px; margin:10px 0 14px; }
.stat { background:#0d1220; border:1px solid #1f2a3f; border-radius:10px; padding:12px; }
.stat .k { color:var(--muted); font-size:13px; }
.stat .v { font-weight:700; margin-top:6px; font-size:18px; }
/* Charts */
\.chart { width: 100%; height: 180px; background:#0b0e12; border:1px solid #1f2a3f; border-radius:10px; display:block; }
.chart-section { margin: 8px 0 14px; }

/* Segmented control and version chips */
.seg { display:flex; background:#0d1220; border:1px solid #1f2a3f; border-radius:10px; padding:4px; gap:6px; }
.seg button { background:#101726; border:1px solid #1f2a3f; color:var(--text); padding:6px 10px; border-radius:8px; }
.seg button.on { border-color: var(--accent); background:linear-gradient(90deg,var(--accent),#4c1d95); }
.chips { display:flex; gap:6px; overflow:auto; max-width: 100%; padding:4px; background:#0d1220; border:1px solid #1f2a3f; border-radius:10px; }
.chip { background:#101726; border:1px solid #1f2a3f; color:var(--text); padding:6px 10px; border-radius:999px; cursor:pointer; white-space:nowrap; }
.chip.on { border-color: var(--accent); }

/* Files */
.files-toolbar { display:flex; gap:8px; align-items:center; margin-bottom:10px; }
.files-list { background:#0d1220; border:1px solid #1f2a3f; border-radius:10px; padding:8px; max-height: 70vh; overflow:auto; }
.fs-row { display:grid; grid-template-columns: 1fr 120px 160px 220px; gap:8px; padding:6px 8px; border-bottom:1px solid #1b2334; align-items:center; }
.fs-row.header { font-weight:700; color:var(--muted); position:sticky; top:0; background:#0d1220; }
.fs-actions button { margin-right:6px; }
.fs-row.clickable { cursor: pointer; }
.fs-row:hover { background: #0f1525; }
/* File badges */
.badge { display:inline-block; font-size:12px; padding:2px 6px; border-radius:6px; border:1px solid #1f2a3f; color: var(--muted); background:#0d1220; margin-right:6px; }
.badge.dir { border-color:#2563eb; color:#93c5fd; }
.badge.file { border-color:#16a34a; color:#86efac; }

/* Modal */
.modal { position:fixed; inset:0; background:rgba(0,0,0,.5); display:flex; align-items:center; justify-content:center; }
.modal.hidden { display:none; }
.modal-card { background:#0d1220; border:1px solid #1f2a3f; border-radius:10px; padding:16px; min-width:420px; box-shadow: 0 20px 50px rgba(0,0,0,.4); }

/* Editor */
.editor-modal { position:fixed; inset:0; background:#0b0e12; display:flex; flex-direction:column; z-index:1000; }
.editor-modal.hidden { display:none; }
.editor-bar { display:flex; justify-content:space-between; align-items:center; padding:10px 14px; border-bottom:1px solid #1f2a3f; background:#0d1220; position:relative; z-index:1001; }
.editor-title { color:var(--muted); font-weight:600; }
.editor-wrap { position:relative; flex:1; }
.editor-pre, .editor-ta { position:absolute; inset:0; margin:0; padding:14px; font:13px/1.5 ui-monospace,Consolas,Menlo,Monaco,monospace; border:none; }
.editor-pre { overflow:auto; background:#0b0e12; color:#cbd5e1; }
.editor-ta { background:transparent; color:transparent; caret-color:#fff; resize:none; outline:none; overflow:auto; }
.editor-ta::selection { background: rgba(124,58,237,.35); }
.editor-pre code { white-space:pre; }
/* Tokens */
.tok-comm { color:#64748b; }
.tok-key  { color:#f59e0b; }
.tok-str  { color:#22d3ee; }
.tok-num  { color:#a3e635; }
.tok-bool { color:#fb7185; }

/* Toasts */
.toast-wrap { position: fixed; right: 16px; bottom: 16px; display:flex; flex-direction:column; gap:8px; z-index: 1100; }
.toast { background:#0d1220; border:1px solid #1f2a3f; color:var(--text); padding:10px 12px; border-radius:8px; box-shadow: 0 10px 20px rgba(0,0,0,.25); display:flex; align-items:center; gap:10px; }
.toast.info { border-color:#2563eb; }
.toast.success { border-color:#16a34a; }
.toast.error { border-color:#b91c1c; }
.toast .close { background:transparent; border:none; color:var(--muted); cursor:pointer; margin-left:6px; }
.toast .close::before { content: '' !important; }

/* Animations */
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }
@keyframes slideUp { from { opacity:0; transform: translateY(6px) } to { opacity:1; transform:none } }
@keyframes popIn { from { opacity:0; transform: scale(.96) } to { opacity:1; transform:none } }
@keyframes toastIn { from { opacity:0; transform: translateY(8px)} to { opacity:1; transform:none } }

.card { animation: slideUp .3s ease both; }
.fs-row { animation: fadeIn .2s ease both; }
.modal:not(.hidden) .modal-card { animation: popIn .22s ease both; }
.editor-modal:not(.hidden) { animation: fadeIn .18s ease both; }
.toast { animation: toastIn .2s ease both; }

button, .tab-btn { transition: transform .08s ease, background .2s ease, border-color .2s ease; }
button:hover, .tab-btn:hover { transform: translateY(-1px); }
.tab-view.enter-anim { animation: fadeIn .18s ease both; }

/* Console layout */
.console-body { position:absolute; top:0; left:0; right:0; bottom:64px; }
.console-body .logs { position:absolute; inset:0; height:100%; }
.console-inputbar { position:absolute; left:0; right:0; bottom:0; display:flex; gap:8px; padding:10px 14px; background:#0d1220; border-top:1px solid #1f2a3f; }
.console-inputbar input { flex:1; background:#0b0e12; color:var(--text); border:1px solid #1f2a3f; padding:8px 10px; border-radius:8px; }

/* Slide-in animation for console */
@keyframes slideInUp { from { opacity:0; transform: translateY(12px) } to { opacity:1; transform:none } }
#console.enter-anim { animation: slideInUp .2s ease both; }
