:root {
  --bg: #06090a;
  --panel: rgba(12, 18, 20, 0.88);
  --panel-2: #121b1d;
  --line: rgba(219, 247, 232, 0.11);
  --line-strong: rgba(92, 255, 168, 0.36);
  --text: #edf8f1;
  --muted: #a6b8ad;
  --dim: #697a70;
  --green: #33f28b;
  --cyan: #57d8ff;
  --amber: #ffc857;
  --rose: #ff6b8b;
  --ink: #03100a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --mono: "JetBrains Mono", Consolas, monospace;
  --sans: "Syne", Inter, system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(6, 9, 10, 0.8), rgba(6, 9, 10, 0.98) 58%, #050708 100%),
    linear-gradient(135deg, rgba(51, 242, 139, 0.12), transparent 36%, rgba(87, 216, 255, 0.06) 70%, transparent);
  color: var(--text);
  font-family: var(--mono);
  letter-spacing: 0;
  animation: pageGlow 14s ease-in-out infinite alternate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(219, 247, 232, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(219, 247, 232, 0.035) 1px, transparent 1px),
    linear-gradient(120deg, rgba(51, 242, 139, 0.05), transparent 32%, rgba(87, 216, 255, 0.035) 68%, transparent);
  background-size: 54px 54px, 54px 54px, auto;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(255, 255, 255, 0.018) 2px 3px);
  opacity: 0.55;
}

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

::selection {
  background: rgba(51, 242, 139, 0.25);
  color: var(--text);
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 9, 10, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(51, 242, 139, 0.08), 0 18px 50px rgba(0, 0, 0, 0.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(51, 242, 139, 0.4);
  border-radius: var(--radius);
  background: #07100b;
  object-fit: contain;
  box-shadow: 0 0 22px rgba(51, 242, 139, 0.16);
  transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}

.brand:hover .brand-mark {
  border-color: rgba(87, 216, 255, 0.7);
  box-shadow: 0 0 28px rgba(87, 216, 255, 0.18), 0 0 18px rgba(51, 242, 139, 0.22);
  transform: translateY(-1px) rotate(-2deg);
}

.brand-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-title {
  font-family: var(--sans);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.brand-version {
  color: var(--green);
  font-size: 0.72rem;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  list-style: none;
}

.nav-links a,
.lang-btn,
.toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-links a {
  padding: 0 14px;
  font-size: 0.74rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(51, 242, 139, 0.12);
  box-shadow: inset 0 0 0 1px rgba(51, 242, 139, 0.08), 0 0 18px rgba(51, 242, 139, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.lang-btn {
  padding: 0 10px;
  font-size: 0.7rem;
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--ink);
  background: var(--green);
}

.menu-toggle {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.menu-toggle::before {
  transform: translateY(-6px);
}

.menu-toggle::after {
  transform: translateY(6px);
}

.menu-toggle.open {
  color: var(--ink);
  border-color: var(--green);
  background: var(--green);
}

.menu-toggle.open span {
  opacity: 0;
}

.menu-toggle.open::before {
  transform: rotate(45deg);
}

.menu-toggle.open::after {
  transform: rotate(-45deg);
}

.mobile-menu {
  display: none;
}

.ghost-link,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.primary-link {
  border: 1px solid rgba(51, 242, 139, 0.65);
  color: var(--ink);
  background: linear-gradient(135deg, var(--green), #6fffb2);
  box-shadow: 0 0 28px rgba(51, 242, 139, 0.22);
}

.ghost-link {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.primary-link:hover,
.ghost-link:hover {
  transform: translateY(-2px);
}

.primary-link:hover {
  box-shadow: 0 0 36px rgba(51, 242, 139, 0.3), 0 12px 34px rgba(51, 242, 139, 0.12);
}

.ghost-link:hover {
  border-color: var(--line-strong);
  color: var(--green);
  background: rgba(51, 242, 139, 0.08);
}

.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.page {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
  padding: 132px 0 86px;
  animation: pageIn 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body.is-leaving .page,
body.is-leaving .site-footer {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.45fr);
  gap: 36px;
  align-items: end;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--green);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px rgba(51, 242, 139, 0.8);
}

.page-title {
  max-width: 780px;
  font-family: var(--sans);
  font-size: 4.2rem;
  line-height: 0.96;
  font-weight: 800;
  letter-spacing: 0;
}

.page-title span {
  color: var(--green);
  background: linear-gradient(90deg, var(--green), var(--cyan), var(--green));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: titleSweep 6s ease-in-out infinite;
  -webkit-text-fill-color: transparent;
}

.page-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.78;
}

.panel,
.card,
.release-card,
.license-card,
.distro-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.panel:hover,
.release-card:hover,
.license-card:hover,
.distro-card:hover {
  transform: translateY(-4px);
  border-color: rgba(219, 247, 232, 0.22);
  background: rgba(16, 25, 27, 0.94);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.panel {
  padding: 24px;
}

.section {
  padding-top: 34px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--sans);
  font-size: 1.5rem;
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

.small {
  color: var(--dim);
  font-size: 0.76rem;
  line-height: 1.65;
}

.toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
}

.toggle-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  font-size: 0.72rem;
  position: relative;
  overflow: hidden;
}

.toggle-btn:hover,
.toggle-btn.active {
  color: var(--ink);
  border-color: var(--green);
  background: linear-gradient(135deg, var(--green), #7dffba);
  box-shadow: 0 0 24px rgba(51, 242, 139, 0.18);
}

body[data-channel="pre"] .toggle-btn.active {
  border-color: var(--cyan);
  background: linear-gradient(135deg, var(--cyan), #a7ecff);
  box-shadow: 0 0 24px rgba(87, 216, 255, 0.18);
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.release-card,
.distro-card,
.license-card {
  padding: 22px;
}

.release-card {
  display: grid;
  gap: 16px;
  animation: cardIn 0.46s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.release-card:nth-child(2) { animation-delay: 0.04s; }
.release-card:nth-child(3) { animation-delay: 0.08s; }
.release-card:nth-child(4) { animation-delay: 0.12s; }
.release-card:nth-child(5) { animation-delay: 0.16s; }
.release-card:nth-child(6) { animation-delay: 0.2s; }

#releases-grid {
  transition: opacity 0.28s ease, transform 0.28s ease, filter 0.28s ease;
}

#releases-grid.is-swapping {
  opacity: 0.12;
  transform: translateY(14px) scale(0.985);
  filter: blur(4px);
}

body[data-channel="pre"] .card-title,
body[data-channel="pre"] .kicker,
body[data-channel="pre"] .brand-version {
  color: var(--cyan);
}

body[data-channel="pre"] .page-title span {
  background-image: linear-gradient(90deg, var(--cyan), #c6b8ff, var(--amber), var(--cyan));
}

body[data-channel="pre"] .release-card {
  border-color: rgba(87, 216, 255, 0.16);
}

body[data-channel="pre"] .asset-link:hover {
  color: var(--cyan);
  border-color: rgba(87, 216, 255, 0.4);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  color: var(--green);
  font-family: var(--sans);
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  transition: color 0.24s ease, text-shadow 0.24s ease;
}

.badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(87, 216, 255, 0.34);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(87, 216, 255, 0.08);
  font-size: 0.63rem;
  text-transform: uppercase;
}

.badge.green {
  border-color: rgba(51, 242, 139, 0.34);
  color: var(--green);
  background: rgba(51, 242, 139, 0.08);
}

.badge.amber {
  border-color: rgba(255, 200, 87, 0.34);
  color: var(--amber);
  background: rgba(255, 200, 87, 0.08);
}

.asset-list {
  display: grid;
  gap: 8px;
}

.asset-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.asset-link:hover {
  color: var(--green);
  border-color: var(--line-strong);
  background: rgba(51, 242, 139, 0.055);
  transform: translateX(4px);
}

.distros-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.distro-card {
  position: relative;
  overflow: hidden;
  animation: cardIn 0.48s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.distro-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent, var(--green));
  box-shadow: 0 0 22px color-mix(in srgb, var(--accent, var(--green)) 38%, transparent);
  transition: height 0.22s ease;
}

.distro-card:hover::before {
  height: 5px;
}

.distro-name {
  font-family: var(--sans);
  font-size: 1.34rem;
  font-weight: 800;
}

.manager {
  display: inline-flex;
  margin-top: 14px;
  min-height: 34px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(87, 216, 255, 0.32);
  border-radius: 6px;
  color: var(--cyan);
  background: rgba(87, 216, 255, 0.07);
  font-size: 0.78rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.distro-card:hover .manager {
  transform: translateY(-1px);
  background: rgba(87, 216, 255, 0.12);
}

.status-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.license-text {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.license-text strong {
  color: var(--text);
}

.state {
  padding: 58px 20px;
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

.loader {
  width: 210px;
  height: 2px;
  margin: 0 auto 18px;
  overflow: hidden;
  background: var(--line);
}

.loader::after {
  content: "";
  display: block;
  width: 50%;
  height: 100%;
  background: var(--green);
  animation: shimmer 1.2s infinite ease-in-out;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 32px;
  color: var(--dim);
  background: rgba(0, 0, 0, 0.16);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.footer-inner img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: contain;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(220%); }
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes titleSweep {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes pageGlow {
  from { filter: saturate(1); }
  to { filter: saturate(1.08); }
}

@media (max-width: 980px) {
  .page-hero,
  .grid.cols-2,
  .grid.cols-3,
  .distros-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 3.1rem;
  }
}

@media (max-width: 760px) {
  .site-nav {
    padding: 12px 16px;
  }

  .nav-links {
    display: none;
  }

  .brand-version {
    display: none;
  }

  .nav-github {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-menu {
    position: fixed;
    top: 78px;
    left: 16px;
    right: 16px;
    z-index: 45;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(6, 9, 10, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .mobile-menu a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.78rem;
  }

  .mobile-menu a.active {
    color: var(--ink);
    border-color: var(--green);
    background: var(--green);
  }

  .page {
    width: calc(100% - 32px);
    padding: 104px 0 58px;
  }

  .page-title {
    font-size: 2.3rem;
  }

  .page-hero {
    gap: 22px;
    padding-bottom: 28px;
  }

  .section-head,
  .card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .ghost-link,
  .primary-link {
    width: 100%;
  }

  .footer-inner {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
