:root {
  --bg: #07110c;
  --bg2: #0d1a13;
  --panel: rgba(10, 26, 18, 0.92);
  --line: rgba(116, 255, 178, 0.22);
  --line-strong: rgba(121, 255, 178, 0.42);
  --glow: #79ffb2;
  --glow-soft: rgba(121, 255, 178, 0.18);
  --text: #d4ffe1;
  --muted: #8bb59a;
  --warning: #d6ff63;
  --danger: #ff7b7b;
  --rust: #6f4d31;
  --shadow: 0 0 20px rgba(121, 255, 178, 0.08);
  --max: 1240px;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  background:
    radial-gradient(circle at top, rgba(121,255,178,0.09), transparent 26%),
    linear-gradient(180deg, #08120d 0%, #050a08 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  animation: flicker 6s infinite;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.018) 0px,
    rgba(255,255,255,0.018) 1px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.16;
  mix-blend-mode: screen;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 45%, rgba(0,0,0,0.4) 100%);
}

a { color: inherit; }

img {
  max-width: 100%;
  display: block;
}

.wrap {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(4, 10, 7, 0.84);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
}

.topbar-inner {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;

  display: flex;
  align-items: center;   /* 👈 THIS is the key fix */
  justify-content: space-between;

  gap: 16px;
  padding: 10px 0;       /* slightly tighter to align visually */
}

.nav {
  display: flex;
  align-items: center;   /* 👈 keeps buttons aligned with brand */
  gap: 10px;
  flex-wrap: nowrap;     /* 👈 stops it dropping to a second line */
}
.brand {
  position: relative;
  top: -1px;
}

.brand {
  font-size: 0.98rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--glow);
  text-shadow: 0 0 12px rgba(121,255,178,0.35);
  white-space: nowrap;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.button,
.mini-link {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(12, 28, 19, 0.64);
  padding: 10px 14px;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  border-radius: 8px;
}

.nav a:hover,
.button:hover,
.mini-link:hover {
  color: var(--glow);
  border-color: var(--line-strong);
  box-shadow: 0 0 16px rgba(121,255,178,0.12);
  transform: translateY(-1px);
}

.nav a.active {
  color: var(--glow);
  border-color: var(--line-strong);
}

.hero {
  padding: 84px 0 28px;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 22px;
  align-items: stretch;
}

.page-hero {
  padding: 64px 0 22px;
}

.panel {
  background: linear-gradient(180deg, rgba(13, 29, 20, 0.94), rgba(8, 18, 13, 0.92));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(121,255,178,0.035), transparent 35%, transparent 72%, rgba(214,255,99,0.03));
}

.hero-main,
.page-hero-main {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-main { min-height: 510px; }

.eyebrow,
.section-kicker,
.tag,
.stat-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}.small-label {
  color: var(--warning);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 5vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--glow);
  text-shadow:
    0 0 6px rgba(121,255,178,0.4),
    0 0 12px rgba(121,255,178,0.2);
}

.page-title,
.feature-title,
.card h3,
.footer-title,
.list-item strong,
.note-title {
  margin: 0 0 12px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.feature-title {
  text-shadow:
    0 0 6px rgba(121,255,178,0.4),
    0 0 12px rgba(121,255,178,0.2);
}

.subhead,
.lead,
.feature-copy,
.card p,
.list-item span,
.footer-copy,
.footer-list a,
.footer-list div,
.copy,
.note-copy {
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.button.primary {
  color: var(--glow);
  border-color: rgba(121,255,178,0.42);
}

.hero-note,
.edit-note {
  border-top: 1px dashed var(--line);
  padding-top: 18px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.92rem;
}

.status-panel,
.side-stack {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
}

.status-block,
.micro-card,
.stat,
.notice-item,
.showcase-box,
.note-box {
  border: 1px solid var(--line);
  padding: 15px 16px;
  background: rgba(7, 17, 12, 0.5);
  border-radius: 12px;
}

.status-value,
.micro-value,
.stat-value {
  color: var(--glow);
  line-height: 1.55;
}

.stat-value {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.grid-section {
  padding: 18px 0 22px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--glow);
  font-size: 1.16rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.65;
  font-size: 0.93rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  padding: 22px;
  min-height: 220px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.feature-band {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  margin: 10px 0 22px;
}

.feature-panel,
.notice-panel,
.stats-panel,
.showcase-panel,
.footer-panel,
.page-hero-main {
  padding: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.list {
  display: grid;
  gap: 12px;
}

.terminal {
  padding: 22px;
  margin: 22px 0;
  white-space: pre-wrap;
  line-height: 1.8;
  color: var(--glow);
  font-size: 0.95rem;
}

.terminal .muted { color: var(--muted); }
.terminal .warn { color: var(--warning); }

.notice-list,
.note-list,
.link-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.notice-item strong,
.note-box strong {
  color: var(--text);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.showcase-box {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border-style: dashed;
  background: rgba(4, 10, 7, 0.36);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 18px;
  padding: 8px 0 34px;
}

.footer-list {
  display: grid;
  gap: 8px;
}

.footer-base {
  padding: 0 0 50px;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hazard {
  display: inline-block;
  color: var(--danger);
  margin-right: 8px;
}

.inline-code {
  color: var(--glow);
}

.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

table.data th,
table.data td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  color: var(--muted);
}

table.data th {
  color: var(--glow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

/* ===== HERO IMAGE / LIVE FEED PANEL ===== */

.wheel-panel {
  min-height: 510px;
  padding: 0;
  display: grid;
  align-items: stretch;
  background: #030705;
}

.wheel-image {
  width: 100%;
  height: 100%;
  min-height: 510px;
  object-fit: cover;
  filter:
    contrast(1.12)
    saturate(0.72)
    brightness(0.78)
    sepia(0.18);
  animation: subtleFeedFlicker 5s infinite;
}

.wheel-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(7,17,12,0.05), rgba(7,17,12,0.55)),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.035) 0px,
      rgba(255,255,255,0.035) 1px,
      transparent 2px,
      transparent 5px
    );
  animation: scanlinesMove 6s linear infinite;
}

.wheel-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(121,255,178,0.08) 45%,
    rgba(121,255,178,0.18) 50%,
    rgba(121,255,178,0.08) 55%,
    transparent 100%
  );
  animation: scanSweep 4s linear infinite;
}

.wheel-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  border: 1px solid var(--line);
  background: rgba(4, 10, 7, 0.72);
  color: var(--glow);
  padding: 14px 16px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  box-shadow: 0 0 18px rgba(121,255,178,0.14);
}

.wheel-caption span {
  display: block;
  color: var(--warning);
  font-size: 0.72rem;
  margin-bottom: 6px;
}

.wheel-live-dot {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  color: var(--glow);
  background: rgba(4, 10, 7, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: 0 0 16px rgba(121,255,178,0.14);
}

.wheel-live-dot::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 10px rgba(121,255,178,0.75);
  animation: liveDotBlink 1.4s infinite;
}

.wheel-camera-id {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 4;
  color: var(--warning);
  background: rgba(4, 10, 7, 0.58);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ===== HOMEPAGE BROADCAST CONSOLE LAYOUT ===== */

.broadcast-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.42fr 1.15fr;
  gap: 14px;
  margin: 16px 0 18px;
  align-items: stretch;
}

.event-console,
.countdown-console,
.today-console {
  min-height: 210px;
}

.event-main-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 22px;
  align-items: stretch;
}

.event-icon,
.system-icon {
  border: 1px solid var(--line);
  background: rgba(4, 10, 7, 0.42);
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 8px;
}

/* NEW */
.system-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;

  filter:
    brightness(0.9)
    contrast(1.1)
    saturate(0.8);

  transition: 0.3s ease;
}

.event-icon {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;

  min-height: 128px;
  width: 100%;

  background: #030705;
  padding: 0; /* important */
}
.event-icon img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  filter:
    brightness(0.75)
    contrast(1.1)
    saturate(0.85);

  transition: 0.3s ease;
}
.event-icon::after {
  content: "";
  position: absolute;
  inset: 0;

  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.03) 0px,
    rgba(255,255,255,0.03) 1px,
    transparent 2px,
    transparent 4px
  );

  pointer-events: none;
}
.event-console:hover .event-icon img {
  filter:
    brightness(0.95)
    contrast(1.2)
    saturate(1)
    drop-shadow(0 0 8px rgba(121,255,178,0.4));
}
.event-main-copy {
  min-width: 0;
}

.event-details-grid {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px 12px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.event-details-grid div {
  display: contents;
}

.event-details-grid strong {
  color: var(--warning);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.event-details-grid a {
  color: var(--glow);
  text-decoration: none;
}

.event-details-grid a:hover {
  text-decoration: underline;
}
.clock-image-box {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  overflow: hidden;
  margin: 4px auto 12px;
  box-shadow:
    0 0 20px rgba(121,255,178,0.12),
    inset 0 0 18px rgba(121,255,178,0.08);
  background: #030705;
}

.clock-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter:
    brightness(0.8)
    contrast(1.15)
    saturate(0.8);
}

.live-clock {
  color: var(--glow);
  font-size: 1.55rem;
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(121,255,178,0.35);
  margin-bottom: 6px;
}
.live-clock.slt {
  color: var(--warning);
  text-shadow: 0 0 10px rgba(214,255,99,0.3);
  margin-top: 6px;
}
.countdown-divider {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}
.countdown-console {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-face {
  width: 78px;
  height: 78px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--glow);
  font-size: 3rem;
  margin: 4px auto 10px;
  text-shadow: 0 0 16px rgba(121,255,178,0.28);
  box-shadow:
    0 0 20px rgba(121,255,178,0.09),
    inset 0 0 20px rgba(121,255,178,0.05);
}

.big-countdown {
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 0 0 14px rgba(121,255,178,0.32);
}

.today-console {
  padding: 24px;
}

.today-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(4, 10, 7, 0.34);
}

.today-row {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.9fr;
  gap: 0;
  align-items: center;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.today-row:last-child {
  border-bottom: none;
}

.today-row > span {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.today-row > span:last-child {
  border-right: none;
}

.today-title {
  color: var(--glow);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: bold;
}

.today-time {
  color: var(--text);
}

.today-status {
  color: var(--warning);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.today-next {
  background: rgba(121,255,178,0.035);
}

.today-live {
  background: rgba(255,123,123,0.08);
}

.today-live .today-status {
  color: var(--danger);
  text-shadow: 0 0 10px rgba(255,123,123,0.38);
}

.today-footnote {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.systems-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 18px;
  align-items: stretch;
  margin: 8px 0 18px;
}

.compact-section {
  padding: 0;
}

.compact-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1180px) {
  .compact-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .compact-cards {
    grid-template-columns: 1fr;
  }
}
.system-card {
  min-height: 150px;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  align-items: stretch;
}

.system-card p {
  margin-bottom: 12px;
}

.system-icon {
  width: 100%;
  height: 100%;

  min-height: 120px;

  border: 1px solid var(--line);
  border-radius: 12px;

  overflow: hidden;
  padding: 0;              /* IMPORTANT: remove padding */

  position: relative;
  background: #030705;     /* fallback if image fails */
}
.system-icon img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;       /* THIS makes it fill properly */

  filter:
    brightness(0.75)
    contrast(1.1)
    saturate(0.85);

  transition: 0.3s ease;
}

.live-network-panel {
  margin: 0;
  min-height: 100%;
}
.system-card:hover .system-icon img {
  filter:
    brightness(1.1)
    contrast(1.2)
    saturate(1)
    drop-shadow(0 0 10px rgba(121,255,178,0.4));
}


/* ===== EVENT LIVE PANEL ===== */

#eventPanelWrap.event-live {
  animation: eventPulse 1.6s infinite;
}

#eventPanelWrap.event-live .notice-panel,
#eventPanelWrap.event-live .stats-panel,
#eventPanelWrap.event-live .today-console {
  border-color: rgba(255, 123, 123, 0.65);
  box-shadow:
    0 0 28px rgba(255, 123, 123, 0.25),
    inset 0 0 18px rgba(255, 123, 123, 0.12);
  background:
    linear-gradient(
      90deg,
      rgba(255, 80, 80, 0.08),
      rgba(0, 0, 0, 0.6)
    );
}

#eventPanelWrap.event-live .notice-panel::before,
#eventPanelWrap.event-live .stats-panel::before,
#eventPanelWrap.event-live .today-console::before {
  background: linear-gradient(
    135deg,
    rgba(255, 123, 123, 0.12),
    transparent 45%
  );
}

.event-live .section-kicker,
.event-live .feature-title,
.event-live #eventStatus,
.event-live #eventCountdown {
  color: var(--danger);
  text-shadow: 0 0 10px rgba(255, 123, 123, 0.4);
}

/* ===== ANIMATIONS ===== */

@keyframes eventPulse {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.18);
  }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  98% { opacity: 0.98; }
  99% { opacity: 0.96; }
}

@keyframes scanlinesMove {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 0 0, 0 12px;
  }
}

@keyframes scanSweep {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  10% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.35;
  }
  90% {
    opacity: 0.55;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

@keyframes subtleFeedFlicker {
  0%, 100% { opacity: 1; }
  96% { opacity: 1; }
  97% { opacity: 0.98; }
  98% { opacity: 0.94; }
  99% { opacity: 0.99; }
}

@keyframes liveDotBlink {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 10px rgba(121,255,178,0.75);
  }
  50% {
    opacity: 0.35;
    box-shadow: 0 0 4px rgba(121,255,178,0.35);
  }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1180px) {
  .broadcast-grid,
  .systems-grid {
    grid-template-columns: 1fr;
  }

  .compact-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .hero,
  .feature-band,
  .footer-grid,
  .split,
  .card-grid,
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .broadcast-grid,
  .systems-grid,
  .compact-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar-inner {
    flex-direction: column;
    align-items: start;
  }

  .nav {
    justify-content: start;
  }

  .hero { padding-top: 42px; }

  .hero-main,
  .status-panel,
  .card,
  .terminal,
  .feature-panel,
  .notice-panel,
  .stats-panel,
  .showcase-panel,
  .footer-panel,
  .page-hero-main,
  .today-console {
    padding: 18px;
  }

  .stats-grid { grid-template-columns: 1fr; }

  .ticker-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .ticker-window {
    border-left: none;
    padding-left: 0;
  }

  .event-main-row,
  .system-card {
    grid-template-columns: 1fr;
  }

  .event-icon,
  .system-icon {
    min-height: 80px;
  }

  .event-details-grid {
    grid-template-columns: 1fr;
  }

  .event-details-grid div {
    display: grid;
    gap: 4px;
  }

  .today-row {
    grid-template-columns: 1fr;
  }

  .today-row > span {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .today-row > span:last-child {
    border-bottom: none;
  }

  .wheel-panel,
  .wheel-image {
    min-height: 340px;
  }

  .wheel-camera-id,
  .wheel-live-dot {
    font-size: 0.68rem;
  }
}
.hero-title-image {
  width: 100%;
  max-width: 520px;
  margin-bottom: 18px;
  display: block;

  filter:
    drop-shadow(0 0 8px rgba(121,255,178,0.35))
    drop-shadow(0 0 18px rgba(121,255,178,0.2));
}
/* ===== GALLERY / POSTER WALL ===== */
.gallery-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}

.filter-btn {
  border: 1px solid var(--line);
  background: rgba(12, 28, 19, 0.64);
  color: var(--text);
  padding: 8px 14px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.2s ease;
}

.filter-btn:hover {
  color: var(--glow);
  border-color: var(--line-strong);
}

.filter-btn.active {
  color: var(--glow);
  border-color: var(--line-strong);
  box-shadow: 0 0 10px rgba(121,255,178,0.2);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  overflow: visible;
  height: 420px;
  transition: 0.25s ease;
  transform-origin: center;
}

/* pinned poster feel */
.gallery-card::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 74px;
  height: 24px;
  transform: translateX(-50%) rotate(-2deg);
  background:
    linear-gradient(
      90deg,
      rgba(214,255,99,0.18),
      rgba(214,255,99,0.34),
      rgba(214,255,99,0.16)
    );
  border: 1px solid rgba(214,255,99,0.18);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  z-index: 6;
  opacity: 0.75;
}

.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(111,77,49,0.12), transparent 34%),
    linear-gradient(315deg, rgba(111,77,49,0.16), transparent 38%);
  z-index: 5;
}

.poster-tilt-a { transform: rotate(-0.6deg); }
.poster-tilt-b { transform: rotate(0.45deg); }
.poster-tilt-c { transform: rotate(-0.35deg); }
.poster-tilt-d { transform: rotate(0.7deg); }

.gallery-card img {
  width: 100%;
  height: 100%;
  flex: 1;
  object-fit: cover;
  background: #030705;
  border-bottom: 1px solid var(--line);
  filter:
    brightness(0.76)
    contrast(1.12)
    saturate(0.82);
  transition: 0.35s ease;
}

.gallery-card.contain-image img {
  object-fit: contain;
background: #030705;
  padding: 14px;
}

.gallery-caption {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: rgba(4, 10, 7, 0.72);
  position: relative;
  z-index: 7;
}

.gallery-caption strong {
  display: block;
  color: var(--glow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.gallery-caption span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.gallery-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px) rotate(0deg);
  box-shadow:
    0 0 22px rgba(121,255,178,0.14),
    0 12px 24px rgba(0,0,0,0.28);
}

.gallery-card:hover img {
  filter:
    brightness(0.95)
    contrast(1.18)
    saturate(1);
  transform: scale(1.03);
}

/* ===== LIGHTBOX ===== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background:
    radial-gradient(circle at center, rgba(121,255,178,0.08), transparent 35%),
    rgba(0,0,0,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 34px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  box-shadow:
    0 0 28px rgba(121,255,178,0.16),
    0 22px 60px rgba(0,0,0,0.7);
  background: #030705;
}

.lightbox::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.018) 0px,
    rgba(255,255,255,0.018) 1px,
    transparent 2px,
    transparent 5px
  );
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 26px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(4, 10, 7, 0.82);
  color: var(--glow);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(121,255,178,0.12);
}

.lightbox-close:hover {
  color: var(--danger);
  border-color: rgba(255,123,123,0.5);
}

.lightbox-caption {
  position: fixed;
  left: 34px;
  right: 34px;
  bottom: 22px;
  color: var(--warning);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  z-index: 1000;
}

/* ===== RESPONSIVE GALLERY ===== */

@media (max-width: 1080px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card {
    height: 410px;
    transform: none;
  }

  .gallery-card:hover {
    transform: translateY(-2px);
  }

  .lightbox {
    padding: 18px;
  }

  .lightbox-caption {
    font-size: 0.68rem;
  }
}
/* =========================================
   LATEST UPLOADS (FINAL FIXED)
========================================= */

.latest-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
}

.latest-card {
  position: relative;
  display: block;
  text-decoration: none;
  overflow: hidden;
  height: 300px;
}

/* Bigger first card */
.latest-card:first-child {
  height: 340px;
}

/* IMAGE */
.latest-card img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: contain;
  background: #030705;

  z-index: 1;

  filter:
    brightness(0.8)
    contrast(1.1)
    saturate(0.9);

  transition: 0.35s ease;
}

/* CRT overlay */
.latest-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.02) 0px,
    rgba(255,255,255,0.02) 1px,
    transparent 2px,
    transparent 4px
  );

  z-index: 2;
}

/* CAPTION */
.latest-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;

  z-index: 5;

  background: rgba(4, 10, 7, 0.88);
  border: 1px solid var(--line);
  border-radius: 10px;

  padding: 12px 14px;
}

.latest-caption strong {
  display: block;
  color: var(--glow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =========================================
   NEW BADGE (WORKING)
========================================= */

.new-badge {
  position: absolute;
  top: 14px;
  right: 14px;

  z-index: 30;

  padding: 6px 10px;

  border: 1px solid rgba(214,255,99,0.75);
  border-radius: 999px;

  background: rgba(4, 10, 7, 0.96);
  color: var(--warning);

  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;

  box-shadow: 0 0 18px rgba(214,255,99,0.35);

  animation: newBadgePulse 1.8s infinite;
}

@keyframes newBadgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

/* =========================================
   GALLERY GRID (POSTER WALL)
========================================= */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  overflow: visible;

  transition: 0.25s ease;
  transform-origin: center;
}

/* Tape */
.gallery-card::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 74px;
  height: 24px;
  transform: translateX(-50%) rotate(-2deg);

  background:
    linear-gradient(
      90deg,
      rgba(214,255,99,0.18),
      rgba(214,255,99,0.34),
      rgba(214,255,99,0.16)
    );

  border: 1px solid rgba(214,255,99,0.18);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);

  z-index: 6;
  opacity: 0.75;
}

/* Rust overlay */
.gallery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  border-radius: var(--radius);

  background:
    linear-gradient(135deg, rgba(111,77,49,0.12), transparent 34%),
    linear-gradient(315deg, rgba(111,77,49,0.16), transparent 38%);

  z-index: 5;
}

/* Tilt */
.poster-tilt-a { transform: rotate(-0.6deg); }
.poster-tilt-b { transform: rotate(0.45deg); }
.poster-tilt-c { transform: rotate(-0.35deg); }
.poster-tilt-d { transform: rotate(0.7deg); }

/* IMAGE */
.gallery-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: #030705;

  border-bottom: 1px solid var(--line);

  filter:
    brightness(0.76)
    contrast(1.12)
    saturate(0.82);

  transition: 0.35s ease;
}

/* NON-POSTER ITEMS */
.gallery-card.contain-image img {
  object-fit: contain;
  padding: 14px;
}

/* CAPTION */
.gallery-caption {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);

  background: rgba(4, 10, 7, 0.72);
  position: relative;
  z-index: 7;
}

.gallery-caption strong {
  display: block;
  color: var(--glow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.gallery-caption span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* HOVER */
.gallery-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px) rotate(0deg);

  box-shadow:
    0 0 22px rgba(121,255,178,0.14),
    0 12px 24px rgba(0,0,0,0.28);
}

.gallery-card:hover img {
  filter:
    brightness(0.95)
    contrast(1.18)
    saturate(1);
  transform: scale(1.03);
}

/* =========================================
   LIGHTBOX
========================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;

  background:
    radial-gradient(circle at center, rgba(121,255,178,0.08), transparent 35%),
    rgba(0,0,0,0.88);

  display: none;
  align-items: center;
  justify-content: center;
  padding: 34px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 82vh;
  object-fit: contain;

  border: 1px solid var(--line-strong);

  box-shadow:
    0 0 28px rgba(121,255,178,0.16),
    0 22px 60px rgba(0,0,0,0.7);

  background: #030705;
}

/* CRT overlay */
.lightbox::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.018) 0px,
    rgba(255,255,255,0.018) 1px,
    transparent 2px,
    transparent 5px
  );
}

/* CLOSE */
.lightbox-close {
  position: fixed;
  top: 22px;
  right: 26px;
  z-index: 1000;

  width: 44px;
  height: 44px;

  border: 1px solid var(--line);
  border-radius: 50%;

  background: rgba(4, 10, 7, 0.82);
  color: var(--glow);

  font-size: 2rem;
  cursor: pointer;
}

/* CAPTION */
.lightbox-caption {
  position: fixed;
  left: 34px;
  right: 34px;
  bottom: 22px;

  color: var(--warning);
  text-align: center;

  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1080px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .latest-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card {
    transform: none;
  }

  .latest-card,
  .latest-card:first-child {
    height: 260px;
  }

  .lightbox {
    padding: 18px;
  }

  .lightbox-caption {
    font-size: 0.7rem;
  }
}
/* ===== ARCADE IMAGE PANEL ===== */

.arcade-image-panel {
  position: relative;
  overflow: hidden;
  padding: 0;

  min-height: 520px; /* 🔥 THIS IS THE FIX */
}

/* IMAGE */
.arcade-image-panel img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  filter:
    brightness(0.7)
    contrast(1.1)
    saturate(0.85);
}

/* CRT SCANLINES */
.arcade-image-panel::after {
  content: "";
  position: absolute;
  inset: 0;

  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.025) 0px,
    rgba(255,255,255,0.025) 1px,
    transparent 2px,
    transparent 4px
  );

  pointer-events: none;
  z-index: 2;
}

/* DARK FADE (for readability) */
.arcade-image-panel::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3),
    rgba(0,0,0,0.6)
  );

  z-index: 1;
}

/* TEXT OVERLAY */
.arcade-overlay {
  position: relative;
  z-index: 3;

  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  height: 100%;
}

/* TERMINAL TEXT */
.arcade-text {
  color: var(--glow);
  font-size: 0.9rem;
  line-height: 1.6;
  text-shadow: 0 0 10px rgba(121,255,178,0.3);
}
/* ===== TICKER FINAL CLEAN VERSION ===== */

.ticker-panel {
  margin: 22px 0;
  padding: 14px 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  overflow: hidden;
}

.ticker-label {
  color: var(--warning);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  flex: 0 0 auto;
}

.ticker-window {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.ticker {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 36px;
  width: fit-content;
  min-width: fit-content;
  white-space: nowrap;
  animation: tickerScroll 70s linear infinite;
  will-change: transform;
  color: var(--glow);
  text-shadow: 0 0 8px rgba(121,255,178,0.25);
}

.ticker-track span {
  display: block;
  flex: 0 0 auto;
  white-space: nowrap;
}

@keyframes tickerScroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (max-width: 680px) {
  .ticker-panel {
    display: block;
    overflow: hidden;
  }

  .ticker-label {
    display: block;
    margin-bottom: 10px;
  }

  .ticker-window {
    display: block;
    width: 100%;
    overflow: hidden;
    border-left: none;
    padding-left: 0;
  }

  .ticker {
    width: 100%;
    overflow: hidden;
  }

  .ticker-track {
    display: flex;
    flex-wrap: nowrap;
    width: fit-content;
    min-width: fit-content;
    animation: tickerScroll 55s linear infinite;
  }
}
/* ===== MOBILE CLOCK ALIGNMENT FIX ===== */

@media (max-width: 680px) {
  .countdown-console {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .clock-image-box {
    margin-left: auto;
    margin-right: auto;
  }

  .clock-image {
    display: block;
    margin: 0 auto;
  }

  .live-clock,
  .stat-label,
  .big-countdown {
    text-align: center;
    width: 100%;
  }
}
/* ===== PUBLIC TRANSMISSION LOG ===== */

.transmission-form {
  display: grid;
  gap: 12px;
}

.transmission-form input,
.transmission-form textarea {
  width: 100%;
  background: rgba(4, 10, 7, 0.72);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font-family: inherit;
}

#transmissionTrap {
  display: none;
}

.transmission-status {
  color: var(--warning);
  font-size: 0.85rem;
}

.transmission-list {
  display: grid;
  gap: 12px;
}

.transmission-entry {
  border: 1px solid var(--line);
  background: rgba(4, 10, 7, 0.45);
  border-radius: 12px;
  padding: 14px 16px;
}

.transmission-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.transmission-head strong {
  color: var(--glow);
}

.transmission-head span {
  color: var(--muted);
  font-size: 0.8rem;
}

.transmission-entry p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}
/* ===== LIVE FEED PANEL ===== */

.live-feed-panel {
  padding: 22px;
  margin: 0 0 24px;
}

.live-feed-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.live-feed-item {
  border: 1px solid var(--line);
  background: rgba(4, 10, 7, 0.5);
  border-radius: 12px;

  padding: 14px 16px 14px 20px; /* 👈 extra left padding */

  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;

  min-height: 64px;

  display: flex;
  align-items: center;

  position: relative;
}

.live-feed-item {
  animation: liveFeedIn 0.45s ease both;
}

.live-feed-item:nth-child(1) { animation-delay: 0.02s; }
.live-feed-item:nth-child(2) { animation-delay: 0.08s; }
.live-feed-item:nth-child(3) { animation-delay: 0.14s; }
.live-feed-item:nth-child(4) { animation-delay: 0.20s; }
.live-feed-item:nth-child(5) { animation-delay: 0.26s; }
.live-feed-item:nth-child(6) { animation-delay: 0.32s; }

@keyframes liveFeedIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
    filter: brightness(1.4);
  }

  to {
    opacity: 1;
    transform: translateX(0);
    filter: brightness(1);
  }
}
.live-feed-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
  background: var(--glow-soft);
}

.live-feed-item strong {
  color: var(--glow);
}

.live-feed-item.warning {
  color: var(--warning);
}

.live-feed-item.danger {
  color: var(--danger);
  text-shadow: 0 0 8px rgba(255,123,123,0.25);
}

@media (max-width: 780px) {
  .live-feed-list {
    grid-template-columns: 1fr;
  }
}
/* ===== GLOBAL EVENT MODE ===== */

body.event-live {
  filter: brightness(1.05);
}

/* panels glow slightly red */
body.event-live .panel {
  border-color: rgba(255, 123, 123, 0.35);
  box-shadow:
    0 0 22px rgba(255, 123, 123, 0.12),
    inset 0 0 12px rgba(255, 123, 123, 0.05);
}

/* ticker speeds up */
body.event-live .ticker-track {
  animation-duration: 40s !important;
}

/* live feed intensifies */
body.event-live .live-feed-item {
  border-color: rgba(255,123,123,0.45);
  background: rgba(40, 8, 8, 0.35);
}

/* subtle red flicker overlay */
body.event-live::after {
  background:
    radial-gradient(circle at center, transparent 45%, rgba(80,0,0,0.4) 100%);
}

/* optional pulse */
@keyframes eventPulseGlobal {
  0%, 100% { filter: brightness(1.05); }
  50% { filter: brightness(1.12); }
}

body.event-live {
  animation: eventPulseGlobal 2.5s infinite;
}
.last-seen-list {
  display: grid;
  gap: 8px;
}

.last-seen-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;

  border: 1px solid var(--line);
  padding: 12px 14px 12px 20px;

  border-radius: 10px;
  background: rgba(4,10,7,0.45);

  position: relative;
}

.last-seen-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 2px;
  background: var(--glow-soft);
}
.last-seen-item strong {
  color: var(--glow);
}

.last-seen-item span {
  color: var(--muted);
  font-size: 0.8rem;
}
/* ===== LAST SEEN PANEL HEADER FIX ===== */

.last-seen-panel {
  padding: 22px 22px 22px 26px; /* 👈 adds left breathing room */
}

.last-seen-panel .section-kicker,
.last-seen-panel h3 {
  padding-left: 4px; /* 👈 subtle offset from edge */
}
.live-feed-text {
  display: block;
  padding-left: 8px;
  width: 100%;
}

.live-feed-text strong {
  margin: 0 4px;
}
/* ===== EVENT WARNING MODE ===== */

#eventPanelWrap.event-warning .notice-panel,
#eventPanelWrap.event-warning .stats-panel,
#eventPanelWrap.event-warning .today-console {
  border-color: rgba(214, 255, 99, 0.65);
  box-shadow:
    0 0 26px rgba(214, 255, 99, 0.18),
    inset 0 0 18px rgba(214, 255, 99, 0.08);
}

#eventPanelWrap.event-warning .section-kicker,
#eventPanelWrap.event-warning .feature-title,
#eventPanelWrap.event-warning #eventStatus,
#eventPanelWrap.event-warning #eventCountdown {
  color: var(--warning);
  text-shadow: 0 0 10px rgba(214,255,99,0.35);
}
/* ===== FINAL LIVE SYSTEMS 4-CARD FIX ===== */

.systems-grid {
  display: block;
  margin: 8px 0 18px;
}

.systems-grid .compact-section {
  width: 100%;
}

.systems-grid .compact-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.systems-grid .system-card {
  width: 100%;
}

.live-network-panel {
  margin-top: 18px;
}

@media (max-width: 1180px) {
  .systems-grid .compact-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* ===== DIARY IMAGE PANEL ===== */

.diary-image-panel {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-height: 420px;
  background: #030705;
}

.diary-image-panel img {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;

  filter:
    brightness(0.65)
    contrast(1.1)
    saturate(0.7)
    sepia(0.2);
}

/* CRT scanlines */
.diary-image-panel::after {
  content: "";
  position: absolute;
  inset: 0;

  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.025) 0px,
    rgba(255,255,255,0.025) 1px,
    transparent 2px,
    transparent 4px
  );

  pointer-events: none;
  z-index: 2;
}

/* dark vignette */
.diary-image-panel::before {
  content: "";
  position: absolute;
  inset: 0;

  background: radial-gradient(
    circle at center,
    transparent 40%,
    rgba(0,0,0,0.65) 100%
  );

  z-index: 1;
}

/* overlay text */
.diary-overlay {
  position: relative;
  z-index: 3;

  padding: 20px;
  height: 100%;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.diary-text {
  color: var(--glow);
  font-size: 0.85rem;
  line-height: 1.6;
  text-shadow: 0 0 10px rgba(121,255,178,0.3);
}

@media (max-width: 680px) {
  .systems-grid .compact-cards {
    grid-template-columns: 1fr;
  }
}
.diary-image-panel img {
  transition: opacity 0.5s ease, transform 0.35s ease;
}
.diary-cycler img {
  border: 1px solid var(--line);
  background: #030705;
  box-shadow:
    0 0 18px rgba(121,255,178,0.12),
    0 10px 24px rgba(0,0,0,0.5);

  transition: opacity 0.6s ease, transform 0.6s ease;
}

.diary-cycler img:nth-child(1) { transform: rotate(-1.2deg); }
.diary-cycler img:nth-child(2) { transform: rotate(0.8deg); }
.diary-cycler img:nth-child(3) { transform: rotate(-0.6deg); }
.diary-cycler img {
  animation: diaryFlicker 6s infinite;
}

@keyframes diaryFlicker {
  0%, 100% { opacity: 1; }
  98% { opacity: 0.92; }
  99% { opacity: 0.85; }
}
/* ===== LEADERBOARDS 4-CARD RECORD FIX ===== */

.leaderboards-records .card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .leaderboards-records .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .leaderboards-records .card-grid {
    grid-template-columns: 1fr;
  }
}
/* ===== HOME PAGE TICKER EDGE FADE ===== */

.ticker-window,
.ticker {
  position: relative;
  overflow: hidden;
}

.ticker::before,
.ticker::after {
  content: "";
  position: absolute;
  top: 0;
  width: 70px;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.ticker::before {
  left: 0;
  background: linear-gradient(to right, #050a08, transparent);
}

.ticker::after {
  right: 0;
  background: linear-gradient(to left, #050a08, transparent);
}
/* ===== ESCAPE HALL OF FAME PANEL ===== */

.escape-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.escape-stat {
  border: 1px solid var(--line);
  background: rgba(4, 10, 7, 0.48);
  border-radius: 12px;
  padding: 14px 16px;
}

.escape-stat .label {
  color: var(--warning);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  margin-bottom: 8px;
}

.escape-stat .value {
  color: var(--glow);
  font-size: 1.35rem;
  text-shadow: 0 0 10px rgba(121,255,178,0.3);
}

@media (max-width: 680px) {
  .escape-stat-grid {
    grid-template-columns: 1fr;
  }
}
.escape-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.escape-hero-copy {
  min-height: 320px;
}

.escape-hero-image-panel {
  min-height: 320px;
  padding: 0;
  overflow: hidden;
  background: #030705;
}

.escape-hero-image-panel img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  filter:
    brightness(0.78)
    contrast(1.15)
    saturate(0.85);
}

@media (max-width: 1080px) {
  .escape-hero-grid {
    grid-template-columns: 1fr;
  }
}
/* ===== PRIPYAT MUSIC PLAYER ===== */

.prip-music-player {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(4, 10, 7, 0.85);
  padding: 6px 10px;
  border-radius: 10px;
  min-width: 430px;
  max-width: 520px;
  box-shadow: 0 0 12px rgba(121,255,178,0.08);
}

.prip-music-player button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  background: rgba(12, 28, 19, 0.7);
  color: var(--glow);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: 0.2s ease;
}

.prip-music-player button:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 10px rgba(121,255,178,0.2);
}

.music-readout {
  flex: 1;
  min-width: 0;
}

.music-label {
  color: var(--warning);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
}

#musicTrackName {
  color: var(--glow);
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-waveform {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 22px;
}

.music-waveform span {
  width: 2px;
  height: 6px;
  background: var(--glow);
  opacity: 0.4;
}

.prip-music-player.playing .music-waveform span {
  animation: wavePulse 0.9s infinite ease-in-out;
}

.music-waveform span:nth-child(1) { animation-delay: 0s; }
.music-waveform span:nth-child(2) { animation-delay: 0.1s; }
.music-waveform span:nth-child(3) { animation-delay: 0.2s; }
.music-waveform span:nth-child(4) { animation-delay: 0.3s; }
.music-waveform span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wavePulse {
  0%, 100% { height: 6px; opacity: 0.3; }
  50% { height: 20px; opacity: 1; }
}

.music-progress {
  width: 40px;
  height: 4px;
  border: 1px solid var(--line);
  background: rgba(4,10,7,0.8);
  border-radius: 999px;
  overflow: hidden;
}

#musicProgressFill {
  width: 0%;
  height: 100%;
  background: var(--glow);
  box-shadow: 0 0 6px rgba(121,255,178,0.4);
}

/* ===== BUNKER VOLUME DIAL ===== */

.music-volume-wrap {
  display: grid;
  place-items: center;
  gap: 2px;
  width: 42px;
  flex: 0 0 auto;
}

.music-volume-icon {
  color: var(--warning);
  font-size: 0.48rem;
  letter-spacing: 0.12em;
}

.music-volume {
  width: 34px;
  height: 34px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(121,255,178,0.16) 0 22%, transparent 24%),
    conic-gradient(var(--glow) 0deg, var(--glow) 250deg, rgba(121,255,178,0.16) 250deg 360deg);
  border: 1px solid var(--line);
  cursor: pointer;
  box-shadow:
    0 0 10px rgba(121,255,178,0.14),
    inset 0 0 8px rgba(0,0,0,0.75);
}

.music-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warning);
  border: 1px solid rgba(4,10,7,0.95);
  box-shadow: 0 0 8px rgba(214,255,99,0.6);
}

.music-volume::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warning);
  border: 1px solid rgba(4,10,7,0.95);
  box-shadow: 0 0 8px rgba(214,255,99,0.6);
}

.prip-music-player.playing {
  box-shadow:
    0 0 14px rgba(121,255,178,0.18),
    inset 0 0 8px rgba(121,255,178,0.06);
}

@media (max-width: 1180px) {
  .prip-music-player {
    min-width: 100%;
    max-width: 100%;
  }
}
.escape-title-image {
  width: 100%;
  max-width: 520px;
  margin: 0 0 18px;

  display: block;

  filter:
    drop-shadow(0 0 8px rgba(121,255,178,0.35))
    drop-shadow(0 0 18px rgba(121,255,178,0.2));

  transition: 0.3s ease;
}

/* subtle hover "terminal flicker" */
.escape-title-image:hover {
  filter:
    drop-shadow(0 0 12px rgba(121,255,178,0.6))
    drop-shadow(0 0 24px rgba(121,255,178,0.35));
}
/* ===== HOMEPAGE TOPBAR HARD ALIGN FIX ===== */

.topbar-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 18px;
}

.brand {
  align-self: start;
  padding-top: 10px;
}

.nav {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.prip-music-player {
  margin-top: 0;
}
/* ===== VISITOR PANEL (HORIZONTAL) ===== */

.visit-panel-horizontal {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  min-height: 64px;
}

/* layout row */
.visit-row {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 22px;
}

/* each stat block */
.visit-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* labels */
.visit-item .label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warning);
}

/* values */
.visit-item .value {
  color: var(--glow);
  font-size: 1rem;
  text-shadow: 0 0 10px rgba(121,255,178,0.3);
}

/* subtle CRT flicker */
.visit-panel-horizontal {
  animation: visitPulse 6s infinite;
}

@keyframes visitPulse {
  0%, 100% { opacity: 1; }
  98% { opacity: 0.92; }
  99% { opacity: 0.85; }
}
.visit-item:not(:last-child) {
  border-right: 1px solid var(--line);
  padding-right: 18px;
}
/* ===== VISITOR PANEL FLASH ===== */

.visit-panel-horizontal.visit-flash {
  animation: visitFlash 0.9s ease-out;
}

@keyframes visitFlash {
  0% {
    border-color: rgba(214,255,99,0.9);
    box-shadow:
      0 0 24px rgba(214,255,99,0.35),
      inset 0 0 18px rgba(214,255,99,0.16);
    filter: brightness(1.35);
  }

  100% {
    border-color: var(--line);
    box-shadow: var(--shadow);
    filter: brightness(1);
  }
}