:root {
  --bg: #0a0c0f;
  --surface: #111318;
  --surface2: #181b22;
  --border: #232730;
  --accent: #ff4500;
  --accent2: #ff6b35;
  --green: #3ecf8e;
  --blue: #5b9cf6;
  --muted: #4a5568;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --glow: rgba(255, 69, 0, .15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 35% at 85% 0%, rgba(255, 69, 0, .08) 0%, transparent 60%),
    radial-gradient(ellipse 35% 25% at 5% 85%, rgba(91, 156, 246, .05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ────────────────────────────────────────────────────────── */
/* Layout */
/* ────────────────────────────────────────────────────────── */

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ────────────────────────────────────────────────────────── */
/* Header */
/* ────────────────────────────────────────────────────────── */

header {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 18px var(--glow);
}

.header-text h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.header-text p {
  font-size: 11px;
  color: var(--text2);
  margin-top: 3px;
  line-height: 1.5;
}

.live {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(62, 207, 142, .5);
  }

  70% {
    box-shadow: 0 0 0 7px rgba(62, 207, 142, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(62, 207, 142, 0);
  }
}

.live-label {
  font-size: 10px;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .12em;
}

/* ────────────────────────────────────────────────────────── */
/* Stats */
/* ────────────────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin: 28px 0 34px;
}

.stat {
  background: var(--surface);
  padding: 26px 18px;
  text-align: center;
  transition: background .2s ease;
}

.stat:hover {
  background: var(--surface2);
}

.stat-val {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-val--timer {
  font-size: 18px;
  line-height: 1;
}

.stat-lbl {
  font-size: 10px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-top: 10px;
}

.stat-lbl-sub {
  font-size: 8px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

/* ────────────────────────────────────────────────────────── */
/* Vertical Feed Layout */
/* ────────────────────────────────────────────────────────── */

.cols {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin-bottom: 42px;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ────────────────────────────────────────────────────────── */
/* Section Header */
/* ────────────────────────────────────────────────────────── */

.sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.sec-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--text2);
}

.sec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-orange {
  background: var(--accent);
}

.dot-blue {
  background: var(--blue);
}

/* ────────────────────────────────────────────────────────── */
/* Cards */
/* ────────────────────────────────────────────────────────── */

.post-card,
.comment-card {
  display: block;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition:
    border-color .18s ease,
    background .18s ease,
    transform .15s ease;
  animation: fadeUp .3s ease both;
}

.post-card:hover,
.comment-card:hover {
  background: var(--surface2);
  border-color: rgba(255, 69, 0, .4);
  transform: translateY(-2px);
}

.post-card:focus-visible,
.comment-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ────────────────────────────────────────────────────────── */
/* Text */
/* ────────────────────────────────────────────────────────── */

.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 12px;
  color: var(--text);
  word-break: break-word;
}

.comment-source {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comment-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 12px;
  word-break: break-word;
}

/* ────────────────────────────────────────────────────────── */
/* Footer Meta */
/* ────────────────────────────────────────────────────────── */

.card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--text2);
}

/* ────────────────────────────────────────────────────────── */
/* Flair */
/* ────────────────────────────────────────────────────────── */

.flair {
  background: rgba(255, 69, 0, .1);
  border: 1px solid rgba(255, 69, 0, .22);
  color: var(--accent2);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ────────────────────────────────────────────────────────── */
/* Keyword Badge */
/* ────────────────────────────────────────────────────────── */

.kw-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(91, 156, 246, .12);
  border: 1px solid rgba(91, 156, 246, .22);
  color: var(--blue);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ────────────────────────────────────────────────────────── */
/* States */
/* ────────────────────────────────────────────────────────── */

.loading,
.empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

.loading::after {
  content: '...';
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  width: 0;
  animation: ldots 1.2s steps(4, end) infinite;
}

@keyframes ldots {
  from {
    width: 0;
  }

  to {
    width: 1.2em;
  }
}

/* ────────────────────────────────────────────────────────── */
/* Footer */
/* ────────────────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  font-size: 10px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ────────────────────────────────────────────────────────── */
/* Responsive */
/* ────────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .wrap {
    padding: 0 16px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat {
    padding: 22px 14px;
  }

  .stat-val {
    font-size: 26px;
  }

  .stat-val--timer {
    font-size: 15px;
  }

  .post-card,
  .comment-card {
    padding: 16px;
    border-radius: 12px;
  }

  .card-title {
    font-size: 13px;
  }

  .comment-body {
    font-size: 12px;
  }

  .header-text h1 {
    font-size: 15px;
  }

  .header-text p {
    font-size: 10px;
  }
}
