/* ============================================================================
   GP-B971-L :: TERMINAL THEME (clean)
   ========================================================================== */

:root{
  --bg:#050607;
  --fg:#d7fbdc;
  --muted:#8fd29a;
  --dim:#5aa56a;
  --warn:#ffd27a;
  --err:#ff7a7a;
  --accent:#7CFF9A;

  --line:rgba(215,251,220,.14);
  --shadow:rgba(124,255,154,.08);
}

/* Global reset */
*{ box-sizing:border-box; }
html,body{ height:100%; }

/* Force MONOSPACE everywhere (prevents ASCII distortion) */
body, pre, code, textarea, input, button{
  font-family:
    "JetBrains Mono",
    "Fira Code",
    "Cascadia Mono",
    "Source Code Pro",
    "Consolas",
    "Menlo",
    "Monaco",
    "Courier New",
    monospace;
  font-variant-ligatures: none; /* prevent == -> || etc */
  text-rendering: geometricPrecision;
}

body{
  margin:0;
  background:
    radial-gradient(1200px 700px at 50% 10%, rgba(124,255,154,.06), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.02), transparent 30%),
    var(--bg);
  color:var(--fg);
  letter-spacing:.2px;
  line-height:1.25;
}

a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 18px 64px;
}

/* ============================================================================
   Terminal shell
   ========================================================================== */

.terminal{
  border:1px solid var(--line);
  border-radius: 14px;
  overflow:hidden;
  background: rgba(0,0,0,.28);
  position:relative;
  box-shadow:
    0 0 0 1px rgba(124,255,154,.06) inset,
    0 22px 80px rgba(0,0,0,.55);
}

.scanlines::before{
  content:"";
  position:absolute; inset:0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.03),
    rgba(255,255,255,.03) 1px,
    transparent 2px,
    transparent 4px
  );
  pointer-events:none;
  mix-blend-mode: overlay;
  opacity:.35;
}

.glow::after{
  content:"";
  position:absolute; inset:-1px;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(124,255,154,.08),
    0 0 26px rgba(124,255,154,.08);
  pointer-events:none;
}

.topbar{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  background: rgba(0,0,0,.35);
}

.dots{ display:flex; gap:7px; margin-right:8px; }
.dot{ width:10px; height:10px; border-radius:99px; opacity:.75; }
.dot.red{ background:#ff6b6b; }
.dot.yellow{ background:#ffd166; }
.dot.green{ background:#70e000; }

.title{
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spacer{ flex:1; }

.badge{
  font-size: 11px;
  color: var(--muted);
  border:1px solid var(--line);
  padding:3px 8px;
  border-radius:999px;
  background: rgba(0,0,0,.25);
}

.content{
  padding: 16px 16px 10px;
}

/* Default PRE: wrap (good for logs text) */
pre{
  margin:0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
}

/* Separators */
.hr{
  height:1px;
  background: var(--line);
  margin: 14px 0;
}

.kbd{
  display:inline-block;
  padding:1px 6px;
  border:1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(0,0,0,.25);
  font-size: 12px;
  vertical-align: middle;
}

.hint{
  margin-top: 10px;
  color: var(--dim);
  font-size: 12px;
}

/* Prompt */
.prompt{
  margin-top: 14px;
  border-top:1px solid var(--line);
  padding: 12px 16px 16px;
  background: rgba(0,0,0,.22);
  display:flex;
  gap:10px;
  align-items: center;
}

.prompt .path{
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.prompt input{
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-size: 14px;
  caret-color: var(--accent);
}

/* Status bar */
.statusbar{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-top:1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  background: rgba(0,0,0,.28);
}

.tag{ color: var(--dim); }
.warn{ color: var(--warn); }
.err{ color: var(--err); }

/* ============================================================================
   Index grid + terminal “buttons”
   ========================================================================== */

.navgrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.card{
  position: relative;
  border:1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.06)),
    rgba(0,0,0,.22);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.04),
    0 10px 30px rgba(0,0,0,.45);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:14px;
  pointer-events:none;
  box-shadow: 0 0 0 1px rgba(124,255,154,.08);
  opacity:.6;
}

.card:hover{
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 14px 38px rgba(0,0,0,.6);
  background:
    linear-gradient(180deg, rgba(124,255,154,.08), rgba(0,0,0,.08)),
    rgba(0,0,0,.26);
}

.card:active{
  transform: translateY(0);
  box-shadow:
    inset 0 0 0 1px rgba(124,255,154,.18),
    0 8px 20px rgba(0,0,0,.5);
}

.card .name{ color: var(--accent); font-size: 13px; }
.card .desc{ color: var(--muted); font-size: 12px; margin-top: 4px; }

.card.active{
  border-color: rgba(124,255,154,.35);
  background:
    linear-gradient(180deg, rgba(124,255,154,.12), rgba(0,0,0,.08)),
    rgba(0,0,0,.28);
}

/* ============================================================================
   Logbook / Journal (list + viewer)
   ========================================================================== */

.journalLayout{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap: 12px;
  margin-top: 10px;
}

.panel{
  border:1px solid var(--line);
  border-radius: 12px;
  background: rgba(0,0,0,.18);
  overflow:hidden;
}

.panelHead{
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  background: rgba(0,0,0,.22);
  color: var(--muted);
  font-size: 12px;
}

.searchRow{
  display:flex;
  gap:8px;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  background: rgba(0,0,0,.16);
}

.searchRow input{
  width:100%;
  background: rgba(0,0,0,.18);
  border:1px solid var(--line);
  border-radius:10px;
  padding:8px 10px;
  color: var(--fg);
  outline:none;
  font-size: 13px;
}

.list{
  max-height: 420px;
  overflow:auto;
}

.entryBtn{
  display:block;
  width:100%;
  text-align:left;
  padding:10px 12px;
  border:0;
  border-bottom:1px solid rgba(255,255,255,.05);
  background: transparent;
  color: var(--fg);
  cursor:pointer;
}

.entryBtn:hover{ background: rgba(124,255,154,.06); }

/* Active entry = clear indicator (nice “cursor bar”) */
.entryBtn.active{
  background: rgba(124,255,154,.12);
  box-shadow: inset 2px 0 0 rgba(124,255,154,.45);
}

.entryMeta{
  color: var(--dim);
  font-size: 12px;
  margin-top: 4px;
}

.small{
  color: var(--dim);
  font-size: 12px;
  padding: 10px 12px;
}

/* ============================================================================
   ASCII viewport (no-wrap) for big ASCII “gifs”
   ========================================================================== */

.asciiViewport{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:auto;
  padding:16px;
  border:1px solid var(--line);
  border-radius:12px;
  background: rgba(0,0,0,.22);
}

/* IMPORTANT: no wrapping, fixed line-height */
.asciiViewport pre,
#asciiPlayer{
  white-space: pre;
  word-break: normal;
  line-height: 0.6;
  letter-spacing: 0;
  font-variant-ligatures: none;
  font-size: 10 px;
}

/* If your ASCII is huge, you can uncomment one of these:
#asciiPlayer { font-size: 13px; }
.asciiViewport pre { min-width: 160ch; }
*/

/* ============================================================================
   Responsive
   ========================================================================== */

@media (max-width: 760px){
  .journalLayout{ grid-template-columns: 1fr; }
  .list{ max-height: 280px; }
}

@media (max-width: 560px){
  .navgrid{ grid-template-columns: 1fr; }
  pre{ font-size: 13px; }
}
