/* v67 TERMINAL_VIP · IRC Hacker Casino */
:root {
  --bg: #000000;
  --frame: #050505;
  --lime: #9DFF8A;
  --lime-deep: #4ed058;
  --gray: #7E7E7E;
  --gray-2: #b5b5b5;
  --alert: #FF4D6D;
  --amber: #FFD300;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--lime);
  font-family: 'Share Tech Mono', 'VT323', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}
.tv-mono { font-family: 'Share Tech Mono', monospace; font-size: 11px; letter-spacing: 0.1em; }

#three-container { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.tv-crt {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.45) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.85) 100%);
  mix-blend-mode: multiply;
}

/* Frame */
.tv-frame {
  position: relative; z-index: 10;
  max-width: 1180px;
  margin: 28px auto;
  background: var(--frame);
  border: 1px solid rgba(157,255,138,0.45);
  border-radius: 6px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.6),
    0 0 60px rgba(157,255,138,0.18),
    inset 0 0 80px rgba(157,255,138,0.05);
  overflow: hidden;
}

/* Title bar */
.tv-titlebar {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #0a0a0a, #040404);
  border-bottom: 1px solid rgba(157,255,138,0.32);
  font-family: 'Share Tech Mono', monospace;
  font-size: 12.5px;
  color: var(--gray-2);
}
.tv-dots { display: flex; gap: 6px; }
.tv-dots i {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px currentColor;
}
.tv-title { color: var(--lime); letter-spacing: 0.04em; }
.tv-title::after {
  content: '▮';
  color: var(--lime);
  margin-left: 4px;
  animation: tvCaret 1s steps(2) infinite;
}
@keyframes tvCaret { 50% { opacity: 0; } }
.tv-meta { color: var(--amber); font-size: 12px; }

/* Banner */
.tv-banner {
  padding: 16px 22px 6px;
  border-bottom: 1px dashed rgba(157,255,138,0.22);
  background:
    linear-gradient(180deg, rgba(157,255,138,0.04), transparent);
}
.tv-ascii {
  font-family: 'VT323', monospace;
  font-size: clamp(11px, 1.3vw, 16px);
  line-height: 1.05;
  color: var(--lime);
  text-shadow: 0 0 6px rgba(157,255,138,0.55);
  white-space: pre;
  overflow-x: auto;
}

/* Channel */
.tv-channel {
  padding: 14px 22px;
  border-bottom: 1px dashed rgba(157,255,138,0.18);
}
.tv-chan-head {
  display: flex; gap: 16px; align-items: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--gray-2);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dotted rgba(157,255,138,0.22);
}
.tv-chan-head b { color: var(--amber); font-size: 14px; }
.tv-chan-head .tv-chan-meta { margin-left: auto; color: var(--gray); }

.tv-feed { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.tv-feed li {
  display: grid; grid-template-columns: auto auto 1fr; gap: 12px;
  font-size: 14.5px;
  padding: 4px 0;
  font-family: 'Share Tech Mono', monospace;
  line-height: 1.4;
}
.tv-time { color: var(--gray); }
.tv-user { color: var(--lime); font-weight: 700; }
.tv-user.tv-op { color: var(--alert); }
.tv-text { color: var(--gray-2); }
.tv-feed li.is-new { animation: tvType 0.3s ease-in; }
@keyframes tvType { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: translateX(0); } }

/* Roster */
.tv-roster {
  padding: 14px 22px;
  border-bottom: 1px dashed rgba(157,255,138,0.18);
}
.tv-users {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px 16px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
}
.tv-users li {
  display: flex; justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dotted rgba(157,255,138,0.12);
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}
.tv-users li:hover { color: var(--amber); background: rgba(255,211,0,0.06); padding-left: 6px; }
.tv-users li b { color: var(--lime); font-weight: 700; }
.tv-users li i { color: var(--amber); font-style: normal; font-weight: 700; }

/* Status row */
.tv-status {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px dashed rgba(157,255,138,0.18);
}
.tv-status-cell {
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid rgba(157,255,138,0.12);
}
.tv-status-cell:last-child { border-right: none; }
.tv-status-cell .tv-mono { color: var(--gray); }
.tv-status-cell b {
  font-family: 'VT323', monospace;
  font-size: clamp(20px, 2.6vw, 28px);
  color: var(--lime);
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(157,255,138,0.45);
}
.tv-status-cell:nth-child(1) b { color: var(--amber); text-shadow: 0 0 8px rgba(255,211,0,0.4); }
.tv-status-cell:nth-child(2) b { color: var(--alert); text-shadow: 0 0 8px rgba(255,77,109,0.4); }

/* Prompt */
.tv-prompt { padding: 16px 22px 18px; }
.tv-cta {
  display: flex; align-items: stretch;
  text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--lime);
  border-radius: 4px;
  font-family: 'VT323', monospace;
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--lime);
  letter-spacing: 0.04em;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(157,255,138,0.12), 0 0 22px rgba(157,255,138,0.18) inset;
  transition: filter 0.16s ease, transform 0.16s ease;
}
.tv-cta:hover { filter: brightness(1.18); transform: translateY(-2px); }
.tv-prompt-sym {
  background: var(--lime);
  color: var(--bg);
  padding: 12px 14px;
  display: flex; align-items: center;
  font-weight: 700;
}
.tv-prompt-cmd {
  flex: 1;
  padding: 12px 18px;
  display: flex; align-items: center;
}
.tv-prompt-cmd i { color: var(--amber); padding: 0 6px; font-style: normal; }
.tv-prompt-caret {
  padding: 12px 14px;
  display: flex; align-items: center;
  color: var(--lime);
  animation: tvCaret 1s steps(2) infinite;
}
.tv-foot {
  margin-top: 12px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--gray);
  letter-spacing: 0.16em;
}

.global-redirect-layer { position: fixed; inset: 0; z-index: 99; background: transparent; }

@media (max-width: 1080px) {
  .tv-users { grid-template-columns: repeat(2, 1fr); }
  .tv-status { grid-template-columns: repeat(2, 1fr); }
  .tv-status-cell:nth-child(2n) { border-right: none; }
  .tv-status-cell { border-bottom: 1px solid rgba(157,255,138,0.12); }
}
@media (max-width: 720px) {
  .tv-frame { margin: 12px 8px; }
  .tv-titlebar { font-size: 10.5px; padding: 8px 10px; }
  .tv-banner { padding: 12px; }
  .tv-channel, .tv-roster, .tv-prompt { padding: 12px; }
  .tv-feed li { grid-template-columns: 1fr; gap: 2px; }
  .tv-users { grid-template-columns: 1fr; }
}
