:root {
  --win-border: #96a0b2;
  --win-bg: #cfd5df;
  --panel-bg: #f2f3f5;
  --chat-bg: #ffffff;
  --line: #7a8494;
  --title-a: #0f2d74;
  --title-b: #1b57c1;
  --title-text: #eef5ff;
  --green: #20ff7c;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Tahoma, "Segoe UI", sans-serif;
  color: #d9fbe7;
  background: #000;
  overflow: hidden;
}

.matrix-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(0, 255, 100, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(0, 30, 0, 0.5), rgba(0, 0, 0, 0.94));
}

.matrix-bg::before,
.matrix-bg::after {
  content: "";
  position: absolute;
  inset: -20% 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(64, 255, 130, 0.13) 0,
      rgba(64, 255, 130, 0.13) 1px,
      transparent 1px,
      transparent 24px
    ),
    repeating-linear-gradient(
      180deg,
      rgba(64, 255, 130, 0.15) 0,
      rgba(64, 255, 130, 0.15) 2px,
      transparent 2px,
      transparent 16px
    );
  mix-blend-mode: screen;
  opacity: 0.24;
  animation: matrixDrop 7s linear infinite;
}

.matrix-bg::after {
  opacity: 0.16;
  filter: blur(0.6px);
  animation-duration: 11s;
  animation-direction: reverse;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 45%, rgba(0, 0, 0, 0.78) 100%);
}

.stage {
  position: relative;
  z-index: 2;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: center;
  align-content: start;
  padding: clamp(0.6rem, 1.4vh, 1rem) 0.8rem 0.8rem;
  gap: 0.5rem;
  overflow: hidden;
}

.tribute-head {
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: #67ff95;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(103, 255, 149, 0.45);
}

h1 {
  margin: 0.1rem 0 0;
  font-family: "Bebas Neue", Tahoma, sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  letter-spacing: 0.08em;
  color: #eafff5;
  text-shadow:
    0 0 14px rgba(80, 255, 132, 0.45),
    0 0 30px rgba(80, 255, 132, 0.2);
}

.subhead {
  margin: 0.16rem 0 0;
  color: #9cd4b1;
  font-size: 0.8rem;
}

.mirc-window {
  width: min(1000px, calc(100vw - 1rem));
  height: var(--mirc-window-height, clamp(360px, 62dvh, 520px));
  min-height: 340px;
  border: 1px solid #6b7485;
  background: var(--win-bg);
  box-shadow:
    0 0 0 1px #f4f8ff inset,
    0 26px 80px rgba(0, 0, 0, 0.68);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.title-bar {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
  color: var(--title-text);
  font-size: 12px;
  font-weight: 700;
}

.title-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title-buttons {
  display: flex;
  gap: 4px;
}

.title-buttons span {
  width: 12px;
  height: 12px;
  border: 1px solid #3f4d68;
  background: #d6deef;
  box-shadow: 0 0 0 1px #ffffff inset;
}

.menu-bar {
  height: 23px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 12px;
  color: #1f242e;
  background: #e6eaf0;
  border-top: 1px solid #f8f9ff;
  border-bottom: 1px solid #a6afbc;
}

.workspace {
  display: grid;
  grid-template-columns: 160px 1fr 170px;
  flex: 1;
  min-height: 0;
  border-top: 1px solid #f8f9ff;
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel-bg);
  border-right: 1px solid #a3adba;
  border-left: 1px solid #f9fbff;
  color: #1f2630;
}

.panel-head {
  height: 24px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #20324e;
  background: linear-gradient(180deg, #e5eaf3, #d5dce8);
  border-bottom: 1px solid #a6afbc;
}

.panel ul {
  list-style: none;
  margin: 0;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.5;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.panel.nicks ul {
  scrollbar-width: thin;
}

.panel.nicks li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #243049;
}

.panel.nicks li.active {
  color: #0c6b17;
  font-weight: 700;
}

.chat-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #edf0f5;
  border-left: 1px solid #f8faff;
  border-right: 1px solid #a3adba;
}

.topic-line {
  padding: 6px 8px;
  font-size: 12px;
  color: #14355f;
  background: #dde4f0;
  border-bottom: 1px solid #9ca6b4;
}

.chat-feed {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  background: var(--chat-bg);
  border-top: 1px solid #ffffff;
  border-bottom: 1px solid #a3adba;
  font-family: "Lucida Console", Consolas, monospace;
  font-size: 13px;
  line-height: 1.32;
  overflow: hidden;
  position: relative;
}

.chat-line {
  position: absolute;
  left: 0;
  right: 0;
  padding: 0 8px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: #000;
  opacity: 0;
  animation: lineIn 120ms linear forwards;
}

.chat-time {
  color: #6f6f6f;
  margin-right: 5px;
}

.chat-user {
  margin-right: 5px;
  font-weight: 700;
}

.chat-message {
  color: #060606;
  white-space: pre-wrap;
}

.input-line {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: #ffffff;
  color: #455062;
  font-size: 12px;
  border-top: 1px solid #f8faff;
}

.status-bar {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 11px;
  color: #1a2639;
  background: linear-gradient(180deg, #dbe2ed, #cfd8e6);
  border-top: 1px solid #f8faff;
}

.status-right {
  color: #2d4f79;
}

@keyframes matrixDrop {
  0% {
    transform: translateY(-6%);
  }
  100% {
    transform: translateY(6%);
  }
}

@keyframes lineIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 120px 1fr 130px;
  }

  .chat-feed {
    font-size: 12px;
  }
}

@media (max-width: 760px) {
  body {
    overflow-y: auto;
  }

  .stage {
    min-height: 100dvh;
    height: auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0.7rem;
  }

  .subhead {
    font-size: 0.76rem;
  }

  .workspace {
    grid-template-columns: 1fr;
    height: auto;
  }

  .panel {
    display: none;
  }

  .chat-pane {
    min-height: 58vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .matrix-bg::before,
  .matrix-bg::after,
  .chat-line {
    animation: none;
  }
}
