/* ===== COLLIDE HL2 RP — Alliance Terminal Style ===== */

:root {
  --bg: #050708;
  --panel: #0a0f12;
  --accent: #34b3e4;
  --accent-dim: #1a5a73;
  --text: #9fd8ec;
  --text-dim: #4a7a8c;
  --ok: #4fd07a;
  --warn: #e4b234;
  --err: #e44f4f;
}

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

html {
  scrollbar-color: var(--accent-dim) var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.divider,
#boot-text {
  font-family: "Consolas", "Courier New", monospace;
}

/* ===== CRT EFFECTS ===== */
.crt-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);
  mix-blend-mode: multiply;
}

.scanline {
  position: fixed;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 101;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(52, 179, 228, 0.04),
    transparent
  );
  animation: scan 7s linear infinite;
}

@keyframes scan {
  0%   { top: -120px; }
  100% { top: 100vh; }
}

/* ===== NOISE ===== */
.noise {
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 99;
  opacity: 0.05;
  background-image: repeating-conic-gradient(
    rgba(255,255,255,0.4) 0% 0.0001%,
    transparent 0.0002% 0.0004%
  );
  animation: noise-shift 0.4s steps(4) infinite;
}

@keyframes noise-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 1%); }
  50%  { transform: translate(1%, -2%); }
  75%  { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}

/* ===== RANDOM FLICKER ===== */
.flicker {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 98;
  background: rgba(52, 179, 228, 0.02);
  opacity: 0;
  animation: flicker-anim 9s infinite;
}

@keyframes flicker-anim {
  0%, 100% { opacity: 0; }
  41% { opacity: 0; }
  42% { opacity: 1; }
  43% { opacity: 0; }
  45% { opacity: 1; }
  46% { opacity: 0; }
  71% { opacity: 0; }
  72% { opacity: 1; }
  73% { opacity: 0; }
}

/* ===== TICKER ===== */
.ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 97;
  background: rgba(5, 7, 8, 0.9);
  border-top: 1px solid var(--accent-dim);
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 1px;
  padding: 6px 0;
  white-space: nowrap;
  overflow: hidden;
}

.ticker span {
  display: inline-block;
  padding-left: 100vw;
  animation: ticker-move 40s linear infinite;
}

@keyframes ticker-move {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ===== BOOT SCREEN ===== */
#boot-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease;
  cursor: pointer;
}

#boot-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

#boot-noise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  transition: opacity 1.2s ease;
}

.boot-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

#boot-logo-text {
  width: 420px;
  max-width: 80vw;
  overflow: visible;
}

.boot-letter-svg {
  font-family: "Roboto", sans-serif;
  font-size: 110px;
  font-weight: 700;
  letter-spacing: 10px;
  fill: var(--accent);
  filter: drop-shadow(0 0 10px rgba(52, 179, 228, 0.7));
}

.wipe-rect {
  transform-box: fill-box;
  transform-origin: left center;
  transform: scaleX(0);
  animation: wipe-in 0.9s ease forwards;
}

#boot-logo-text clipPath:nth-of-type(1) .wipe-rect { animation-delay: 0.2s; }
#boot-logo-text clipPath:nth-of-type(2) .wipe-rect { animation-delay: 1s; }
#boot-logo-text clipPath:nth-of-type(3) .wipe-rect { animation-delay: 1.8s; }

@keyframes wipe-in {
  0%   { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

#boot-skip {
  position: absolute;
  bottom: -70px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 2px;
  animation: blink 1.5s steps(1) infinite;
}

/* ===== TERMINAL FRAME ===== */
.terminal {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  min-height: 100vh;
}

.divider {
  color: var(--accent-dim);
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
  font-size: 13px;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 4px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  transition: transform 0.3s;
}

.logo:hover {
  transform: scale(1.06);
}

/* ===== GLITCH TITLE ===== */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.glitch::before {
  color: var(--err);
  animation: glitch-a 4s infinite steps(1);
}

.glitch::after {
  color: var(--accent);
  animation: glitch-b 4s infinite steps(1);
}

@keyframes glitch-a {
  0%, 93%, 100% { opacity: 0; }
  94% { opacity: 0.8; transform: translate(-3px, 1px); clip-path: inset(10% 0 55% 0); }
  95% { opacity: 0.8; transform: translate(3px, -1px); clip-path: inset(60% 0 10% 0); }
  96% { opacity: 0; }
}

@keyframes glitch-b {
  0%, 91%, 100% { opacity: 0; }
  92% { opacity: 0.8; transform: translate(3px, -1px); clip-path: inset(40% 0 30% 0); }
  93% { opacity: 0.8; transform: translate(-3px, 2px); clip-path: inset(5% 0 70% 0); }
  94% { opacity: 0; }
}

.header-titles h1 {
  font-size: 28px;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 0 0 10px rgba(52, 179, 228, 0.7);
}

.header-titles .accent { color: var(--accent); }

.subtitle {
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 2px;
}

.header-right {
  text-align: right;
  font-size: 13px;
  color: var(--text-dim);
}

.status-line .ok {
  color: var(--ok);
  text-shadow: 0 0 6px rgba(79, 208, 122, 0.5);
}

#clock {
  color: var(--accent);
  text-shadow: 0 0 6px rgba(52, 179, 228, 0.5);
}

.discord-btn {
  display: inline-flex;
  margin-top: 10px;
  transition: all 0.2s;
}

.discord-btn img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 6px;
}

.discord-btn:hover {
  filter: drop-shadow(0 0 8px rgba(52, 179, 228, 0.7));
  transform: scale(1.1);
}

/* ===== NAV ===== */
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 4px;
}

.nav-btn {
  background: transparent;
  border: 1px solid var(--accent-dim);
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 10px rgba(52, 179, 228, 0.25), inset 0 0 10px rgba(52, 179, 228, 0.08);
}

.nav-btn.active {
  border-color: var(--accent);
  color: var(--bg);
  background: var(--accent);
  text-shadow: none;
  box-shadow: 0 0 14px rgba(52, 179, 228, 0.5);
}

/* ===== CONTENT ===== */
.content {
  padding: 22px 4px;
  min-height: 420px;
}

.tab {
  display: none;
  animation: flicker-in 0.35s ease;
}

.tab.active { display: block; }

@keyframes flicker-in {
  0%   { opacity: 0; }
  30%  { opacity: 0.6; }
  40%  { opacity: 0.2; }
  60%  { opacity: 0.9; }
  100% { opacity: 1; }
}

.section-title {
  color: var(--accent);
  font-size: 17px;
  letter-spacing: 1px;
  margin-bottom: 20px;
  text-shadow: 0 0 8px rgba(52, 179, 228, 0.5);
}

.block {
  background: var(--panel);
  border: 1px solid var(--accent-dim);
  border-left: 3px solid var(--accent);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.block h3 {
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.block p { margin-bottom: 8px; }

.block.warning {
  border-left-color: var(--warn);
  color: var(--warn);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.data-list {
  list-style: none;
}

.data-list li {
  padding: 4px 0;
  color: var(--text);
}

.data-list li .accent { color: var(--accent); }
.data-list li .ok { color: var(--ok); }
.data-list li .warn { color: var(--warn); }
.data-list li .err { color: var(--err); }

.note {
  color: var(--text-dim);
  font-size: 13px;
}

/* ===== SCREENSHOTS ===== */
.screens-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.screen-frame {
  border: 1px solid var(--accent-dim);
  background: var(--panel);
  padding: 10px;
  cursor: pointer;
  transition: all 0.25s;
}

.screen-frame:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(52, 179, 228, 0.3);
  transform: translateY(-2px);
}

.screen-frame img {
  width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.85) contrast(1.05);
  transition: filter 0.25s;
}

.screen-frame:hover img {
  filter: saturate(1) contrast(1);
}

/* ===== UPDATE ===== */
.update-header {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--accent-dim);
}

/* ===== FOOTER ===== */
.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 4px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 1px;
}

.blink { animation: blink 1.2s steps(1) infinite; }

@keyframes blink {
  50% { opacity: 0; }
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 5, 0.94);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border: 1px solid var(--accent);
  box-shadow: 0 0 40px rgba(52, 179, 228, 0.3);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 28px;
  font-size: 42px;
  color: var(--accent);
  cursor: pointer;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(5, 7, 8, 0.7);
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  font-size: 22px;
  padding: 18px 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.lightbox-arrow:hover {
  border-color: var(--accent);
  background: rgba(52, 179, 228, 0.15);
  box-shadow: 0 0 12px rgba(52, 179, 228, 0.4);
}

.lightbox-arrow.prev { left: 24px; }
.lightbox-arrow.next { right: 24px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 2px;
}

/* ===== CURSOR ===== */
.typed::after {
  content: "▌";
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}
