@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --green: #22cc22;
  --green-dim: #157a15;
  --red: #cc2200;
  --black: #000000;
  --font: 'Courier Prime', 'Courier New', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--black);
  overflow: hidden;
}

/* ── Scanline overlay ── */
#scanline {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 2px,
    rgba(0, 0, 0, 0.18) 3px
  );
  pointer-events: none;
  z-index: 100;
}

/* ── Terminal wrapper ── */
#terminal {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: clamp(12px, 1.6vw, 16px);
  color: var(--green);
  background: var(--black);
}

/* ── Top bar ── */
#top-bar {
  flex-shrink: 0;
  background: #2a0000;
  color: var(--red);
  display: flex;
  justify-content: space-between;
  padding: 2px 8px;
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: bold;
  letter-spacing: 0.03em;
}

/* ── Content area ── */
#content-area {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* ── Left image panel ── */
#image-panel {
  width: 42%;
  flex-shrink: 0;
  overflow: hidden;
  border-right: 2px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
}

#image-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(0.7) brightness(0.85);
}

/* ── Right text panel ── */
#text-panel {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px 24px 28px;
  scrollbar-width: none;
  font-size: clamp(13px, 1.8vw, 17px);
}
#text-panel::-webkit-scrollbar { display: none; }

/* ── Scroll body ── */
#scroll-body {
  line-height: 1.7;
}

/* ── Text output ── */
#text-output {
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Sections within output ── */
#text-output .section-gap {
  display: block;
  height: 1.4em;
}

#text-output .dim {
  color: var(--green-dim);
}

#text-output .link-line {
  display: block;
  color: var(--green);
  text-decoration: none;
  cursor: pointer;
}

#text-output .link-line:hover {
  color: #fff;
  text-decoration: underline;
}

/* ── Blinking cursor ── */
#cursor-blink {
  display: inline-block;
  color: var(--green);
  animation: blink 1s step-end infinite;
  margin-left: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Bottom bar ── */
#bottom-bar {
  flex-shrink: 0;
  background: #2a0000;
  color: var(--red);
  display: flex;
  justify-content: space-between;
  padding: 2px 8px;
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: bold;
  letter-spacing: 0.03em;
}

#bottom-left {
  color: var(--red);
  text-decoration: none;
  font-weight: bold;
}
#bottom-left:hover {
  text-decoration: underline;
  color: #ff4422;
}

/* ── Interrupt overlay ── */
#interrupt-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 200;
  flex-direction: column;
  padding: 32px 40px;
  font-family: var(--font);
  color: var(--green);
  cursor: pointer;
  overflow-y: auto;
}
#interrupt-overlay.active { display: flex; }

#interrupt-header {
  color: var(--red);
  font-size: clamp(11px, 1.4vw, 14px);
  font-weight: bold;
  letter-spacing: 0.2em;
  margin-bottom: 32px;
  animation: blink 1s step-end infinite;
}

#interrupt-text {
  font-size: clamp(13px, 1.8vw, 17px);
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
  width: 100%;
}

#interrupt-footer {
  margin-top: 40px;
  color: var(--green-dim);
  font-size: clamp(11px, 1.3vw, 13px);
  letter-spacing: 0.15em;
}

/* clickable trigger spans */
.trigger {
  cursor: pointer;
  border-bottom: 1px dotted var(--green-dim);
}
.trigger:hover {
  color: #fff;
  border-bottom-color: #fff;
}