:root {
  --bg-0: #04070d;
  --bg-1: #0a1320;
  --bg-2: #12243a;
  --panel: #0d1624;
  --panel-soft: #15263d;
  --panel-border: #2a4968;
  --panel-border-strong: #3a6f9f;
  --ink: #e2edf2;
  --ink-dim: #a4becb;
  --cyan: #19d7eb;
  --cyan-soft: #33e6f7;
  --lime: #d6f145;
  --lime-deep: #9eb52a;
  --shadow: rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", "Verdana", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 16%, rgba(25, 215, 235, 0.16), transparent 30%),
    radial-gradient(circle at 84% 20%, rgba(214, 241, 69, 0.1), transparent 32%),
    radial-gradient(circle at 80% 82%, rgba(21, 80, 126, 0.2), transparent 34%),
    linear-gradient(155deg, var(--bg-0), var(--bg-1) 48%, var(--bg-2));
  background-color: var(--bg-0);
  background-attachment: fixed;
}

.scanline-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 72%, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.015) 0,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 3px
    );
  background-size: 240px 240px, 280px 280px, auto;
  opacity: 0.55;
  z-index: 0;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 1.4rem));
  margin: 1rem auto 1.6rem;
}

.site-masthead {
  margin: 0.2rem 0 1rem;
  text-align: center;
}

.brand-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  max-width: 100%;
}

.brand-logo {
  width: min(780px, 72vw);
  max-width: 100%;
  height: auto;
  display: block;
}

.pixel-title {
  margin: 0.56rem 0 0;
  font-family: "Impact", "Franklin Gothic Heavy", "Arial Black", sans-serif;
  font-size: clamp(1.45rem, 4.1vw, 2.4rem);
  line-height: 1;
  letter-spacing: 0.08em;
  color: #f1fbff;
  text-transform: uppercase;
  text-shadow:
    0 0 14px rgba(25, 215, 235, 0.34),
    0 6px 18px rgba(0, 0, 0, 0.5);
}

.masthead-subtitle {
  margin: 0.52rem auto 0;
  max-width: 900px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);
}

.main-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.78rem;
  padding: 0;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 0.46rem 0.84rem;
  border-radius: 999px;
  border: 1px solid #6f8420;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  background: linear-gradient(180deg, #e7ff66, #c0e131);
  color: #101c07;
  text-decoration: none;
  font-size: 0.83rem;
  letter-spacing: 0.02em;
}

.nav-button:hover,
.nav-button:focus-visible {
  background: linear-gradient(180deg, #efff8b, #d0eb4a);
}

.nav-button.is-active {
  border-color: #4e6010;
  background: linear-gradient(180deg, #b7d72e, #9cbc20);
}

.stack {
  display: grid;
  gap: 0.9rem;
}

.content-panel {
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(18, 30, 47, 0.95), rgba(10, 18, 30, 0.95));
  box-shadow: 0 14px 34px var(--shadow);
  overflow: hidden;
  animation: rise-in 360ms ease;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.66rem 0.86rem;
  border-bottom: 1px solid rgba(69, 119, 163, 0.5);
  background: linear-gradient(90deg, rgba(21, 39, 62, 0.95), rgba(12, 25, 39, 0.95));
}

.panel-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #d8f0fa;
}

.panel-body {
  padding: 0.84rem;
}

.social-strip {
  display: flex;
  justify-content: center;
  margin-top: 0.05rem;
}

.modern-social-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.modern-social-grid--center {
  justify-content: center;
}

.modern-social-item {
  display: flex;
}

.modern-social-link {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  border: 1px solid #355977;
  background: linear-gradient(180deg, #111f31, #0a1423);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.modern-social-link:hover,
.modern-social-link:focus-visible {
  transform: translateY(-2px);
  border-color: #5f93bf;
  background: linear-gradient(180deg, #172840, #0d1829);
}

.modern-social-icon {
  width: 22px;
  height: 22px;
  display: block;
  filter: brightness(0) invert(1);
}

.modern-social-fallback {
  font-size: 0.8rem;
  line-height: 1;
  color: #f0fbff;
}

.short-form-strip {
  display: grid;
  gap: 0.52rem;
}

.strip-title {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d8f0fa;
}

.short-feed {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  padding-bottom: 0.12rem;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.short-feed::-webkit-scrollbar {
  display: none;
}

.short-feed.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.short-feed.is-dragging .short-card {
  pointer-events: none;
}

.short-card {
  flex: 0 0 228px;
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  border: 1px solid #355a7a;
  background: linear-gradient(180deg, #0c1828, #081220);
  overflow: hidden;
}

.short-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #040a12;
}

.short-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.short-card-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #dff8ff;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.short-card-body {
  display: grid;
  gap: 0.2rem;
  padding: 0.52rem;
}

.short-card-title {
  font-size: 0.82rem;
  line-height: 1.32;
  color: #e6f6fb;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.short-card-meta {
  font-size: 0.72rem;
  color: var(--ink-dim);
}

.short-card:hover,
.short-card:focus-visible {
  border-color: #4d80af;
  transform: translateY(-2px);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.search-row input {
  width: 100%;
  min-height: 2.2rem;
  padding: 0.44rem 0.56rem;
  border-radius: 9px;
  border: 1px solid #32546f;
  background: #0a1422;
  color: #e3f2f7;
  font-family: inherit;
}

.search-row button {
  min-width: 88px;
  min-height: 2.2rem;
  border-radius: 9px;
  border: 1px solid #6f8420;
  background: linear-gradient(180deg, #e7ff66, #c0e131);
  color: #101c07;
  font-family: inherit;
  cursor: pointer;
}

.search-row button:hover,
.search-row button:focus-visible {
  background: linear-gradient(180deg, #efff8b, #d0eb4a);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.tag-chip {
  min-height: 1.82rem;
  padding: 0.2rem 0.56rem;
  border-radius: 999px;
  border: 1px solid #32546f;
  background: #0b1828;
  color: #aec7d2;
  font-size: 0.74rem;
  cursor: pointer;
}

.tag-chip.is-category {
  color: #c8f6ff;
  border-color: #3f8ba0;
}

.tag-chip.is-active,
.tag-chip:hover,
.tag-chip:focus-visible {
  color: #102007;
  border-color: #738a1e;
  background: linear-gradient(180deg, #e7ff66, #c0e131);
}

.feed-pagination {
  margin-bottom: 0.6rem;
}

.feed-pagination:last-child {
  margin-top: 0.6rem;
  margin-bottom: 0;
}

.feed-pagination-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.54rem;
  border-radius: 10px;
  border: 1px solid #2d4e6c;
  background: #0a1524;
}

.pagination-size-group,
.pagination-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pagination-label,
.pagination-range,
.pagination-status {
  font-size: 0.74rem;
  color: #abc4ce;
}

.pagination-select {
  min-height: 1.76rem;
  border-radius: 8px;
  border: 1px solid #2d4e6c;
  background: #0a1220;
  color: #e0f2f8;
  font-family: inherit;
}

.pagination-button {
  min-height: 1.76rem;
  padding: 0.16rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #6f8420;
  background: linear-gradient(180deg, #e7ff66, #c0e131);
  color: #101c07;
  font-family: inherit;
  cursor: pointer;
}

.pagination-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.feed-list {
  display: grid;
  gap: 0.58rem;
}

.post-card {
  padding: 0.64rem;
  border-radius: 10px;
  border: 1px solid #2f506f;
  background: linear-gradient(180deg, #101d2e, #0a1522);
}

.post-date {
  margin: 0;
  font-size: 0.73rem;
  color: #8db7c5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-title {
  margin: 0.22rem 0 0;
  font-size: 1rem;
  line-height: 1.24;
  color: #ecfbff;
}

.post-body {
  margin: 0.4rem 0 0;
  font-size: 0.89rem;
  line-height: 1.43;
  color: #cadfe6;
}

.post-video {
  margin-top: 0.58rem;
  border-radius: 10px;
  border: 1px solid #2d4e6b;
  background: #070f19;
  overflow: hidden;
}

.post-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

.post-tags {
  margin: 0.56rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.post-tags li {
  font-size: 0.71rem;
  color: #adbfca;
  border-radius: 999px;
  border: 1px solid #355876;
  background: #0a1624;
  padding: 0.13rem 0.4rem;
}

.post-tags li.is-category {
  color: #111f08;
  border-color: #70841f;
  background: linear-gradient(180deg, #e7ff66, #c0e131);
}

.post-meta {
  margin-top: 0.53rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.74rem;
  padding: 0.15rem 0.48rem;
  border-radius: 999px;
  border: 1px solid #278698;
  background: linear-gradient(180deg, #3ce8f5, #1dc9de);
  color: #08161f;
  text-decoration: none;
  font-size: 0.73rem;
}

.platform-pill:hover,
.platform-pill:focus-visible {
  background: linear-gradient(180deg, #64f0fa, #31d9ea);
}

.empty-state {
  margin: 0;
  padding: 0.7rem;
  color: #9fb7c3;
  border-radius: 10px;
  border: 1px dashed #39607f;
  background: #0a1524;
}

.about-copy {
  margin: 0;
  color: #d1e6ed;
  line-height: 1.58;
}

.about-copy + .about-copy {
  margin-top: 0.74rem;
}

.retro-footer {
  margin-top: 0.88rem;
  text-align: center;
  font-size: 0.72rem;
  color: #89aab5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@media (max-width: 780px) {
  .brand-strip {
    width: 100%;
    padding: 0;
  }

  .brand-logo {
    width: min(520px, 76vw);
  }

  .pixel-title {
    font-size: clamp(1.28rem, 7vw, 2rem);
  }

  .masthead-subtitle {
    font-size: 0.88rem;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .short-card {
    flex-basis: 208px;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: calc(100% - 0.8rem);
  }

  .modern-social-grid {
    gap: 0.5rem;
  }

  .modern-social-link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .modern-social-icon {
    width: 20px;
    height: 20px;
  }

  .feed-pagination-inner {
    padding: 0.4rem;
  }

  .pagination-label,
  .pagination-range,
  .pagination-status {
    font-size: 0.7rem;
  }

  .short-card {
    flex-basis: 194px;
  }
}
