@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
  --green: #35ff6e;
  --green-dim: #14a83f;
  --green-faint: #0a4d1f;
  --bg: #030603;
  --panel-bg: #050d06;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--green);
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  letter-spacing: 0.03em;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ---------- CRT / scanline overlay ---------- */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0.15) 1px,
      rgba(0, 0, 0, 0) 2px
    );
  mix-blend-mode: multiply;
}
.crt-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 12vw rgba(0, 0, 0, 0.85);
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.82; }
  94% { opacity: 1; }
  96% { opacity: 0.88; }
  97% { opacity: 1; }
}

/* ---------- console shell ---------- */
.console {
  width: 100%;
  max-width: 640px;
  border: 1px solid var(--green-dim);
  background: var(--panel-bg);
  box-shadow: 0 0 24px rgba(53, 255, 110, 0.12), inset 0 0 40px rgba(0, 0, 0, 0.6);
  padding: 1.5rem;
  animation: flicker 7s infinite;
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--green-faint);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.logo-slot { display: flex; align-items: center; gap: 0.6rem; }
.logo-slot img { max-height: 42px; display: block; filter: drop-shadow(0 0 6px rgba(53,255,110,0.5)); }
.logo-text {
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 0.3em;
  text-shadow: 0 0 8px rgba(53, 255, 110, 0.7);
}

.header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.68rem;
  color: var(--green-dim);
  line-height: 1.5;
}

/* ---------- panels ---------- */
.panel {
  border: 1px solid var(--green-faint);
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(53, 255, 110, 0.02);
}

.display-label, .status-row span:first-child {
  color: var(--green-dim);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
}

.display-readout {
  font-size: 2rem;
  text-align: center;
  padding: 1rem 0;
  text-shadow: 0 0 10px rgba(53, 255, 110, 0.8);
  min-height: 2.4rem;
}

.display-readout.is-error {
  color: #ff3b3b;
  text-shadow: 0 0 10px rgba(255, 59, 59, 0.8);
}

.display-readout.is-alert {
  color: #ff3b3b;
  text-shadow: 0 0 12px rgba(255, 59, 59, 0.85);
  animation: alert-pulse 0.6s infinite;
}

@keyframes alert-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.display-sub {
  text-align: center;
  font-size: 0.7rem;
  color: var(--green-dim);
  letter-spacing: 0.15em;
}

.status-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  padding: 0.25rem 0;
}

/* ---------- transport / seek bar ---------- */
.transport-panel { padding: 1rem 1rem 0.75rem; }

.seek-bar {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--green) 0%, var(--green-faint) 0%);
  outline: none;
  cursor: pointer;
}

.seek-bar:disabled { cursor: default; opacity: 0.4; }

.seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  background: var(--green);
  box-shadow: 0 0 6px rgba(53, 255, 110, 0.9);
  border-radius: 0;
  margin-top: -3.5px;
}

.seek-bar::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: var(--green);
  box-shadow: 0 0 6px rgba(53, 255, 110, 0.9);
  border: none;
  border-radius: 0;
}

.seek-bar::-moz-range-track {
  height: 3px;
  background: transparent;
}

.transport-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 0.5rem;
  margin-top: 0.6rem;
}

.transport-buttons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.time-row {
  display: flex;
  gap: 0.35rem;
  font-size: 0.68rem;
  color: var(--green-dim);
  white-space: nowrap;
  margin-left: auto;
}

.btn-mini {
  font-size: 0.65rem;
  padding: 0.3rem 0.5rem;
  letter-spacing: 0.1em;
}

/* ---------- controls ---------- */
.controls-panel {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border: none;
  background: none;
  padding: 0;
}

.btn {
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green-dim);
  padding: 0.75rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover { background: rgba(53, 255, 110, 0.12); }
.btn:active { background: rgba(53, 255, 110, 0.25); }

.btn-primary { border-color: var(--green); }
.btn:disabled { opacity: 0.4; cursor: default; }

/* ---------- glitch text ---------- */
.glitch-char { display: inline-block; }

/* ---------- views ---------- */
.view { display: none; }
.view-active { display: block; }

.brief-text {
  height: 60vh;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--green);
  text-shadow: 0 0 4px rgba(53, 255, 110, 0.35);
  padding-right: 0.5rem;
}

.brief-text::-webkit-scrollbar { width: 6px; }
.brief-text::-webkit-scrollbar-track { background: transparent; }
.brief-text::-webkit-scrollbar-thumb { background: var(--green-faint); }

.brief-text p { margin: 0 0 1em 0; }

.brief-letterhead {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--green-faint);
  padding-bottom: 0.9rem;
  margin-bottom: 1.2rem;
}

.brief-logo { filter: drop-shadow(0 0 6px rgba(53,255,110,0.5)); }
.brief-letterhead .brief-logo { max-height: 36px; }

.brief-letterhead h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.2em;
  text-shadow: 0 0 8px rgba(53, 255, 110, 0.7);
}

.brief-profile {
  border: 1px solid var(--green-faint);
  padding: 0.75rem 1rem;
  margin-bottom: 1em;
  font-size: 0.8rem;
}

.brief-profile-name {
  font-weight: bold;
  letter-spacing: 0.2em;
  color: var(--green);
  margin-bottom: 0.3rem;
}

.brief-entry { margin-bottom: 1.1em; }

.brief-date {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--green-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 0.3rem;
}

.brief-filename { font-style: italic; }

.brief-end {
  text-align: center;
  letter-spacing: 0.3em;
  color: var(--green-dim);
  font-size: 0.75rem;
  margin: 1.5em 0 1.5em;
}

.brief-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  border-top: 1px solid var(--green-faint);
  padding-top: 1.2rem;
  margin-top: 1em;
  font-size: 0.75rem;
  color: var(--green-dim);
  text-align: center;
}

.brief-footer .brief-logo { max-height: 40px; }

@media (max-width: 480px) {
  .console-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .header-meta { align-items: flex-start; }
}
