:root {
  --bg: #050308;
  --bg-soft: rgba(18, 11, 31, 0.76);
  --purple: #9d4edd;
  --purple-soft: rgba(157, 78, 221, 0.18);
  --text: #f8f3ff;
  --muted: #b9aec8;
  --border: rgba(230, 205, 255, 0.16);
  --accent: #9d4edd;
  --accent-soft: rgba(157, 78, 221, 0.18);
  --accent-glow: rgba(157, 78, 221, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.background,
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.background {
  z-index: -3;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, var(--accent-soft), transparent 30%),
    radial-gradient(circle at 84% 20%, rgba(255, 255, 255, 0.07), transparent 24%),
    linear-gradient(135deg, #040207 0%, #10081c 52%, #040207 100%);
}

.background::before {
  content: "";
  position: absolute;
  inset: -28%;
  background:
    linear-gradient(120deg, transparent 24%, var(--accent-soft), transparent 48%),
    linear-gradient(300deg, transparent 35%, rgba(255, 255, 255, 0.06), transparent 58%);
  filter: blur(2px);
  animation: aurora 16s ease-in-out infinite alternate;
}

.glow {
  position: absolute;
  width: 34vw;
  height: 34vw;
  min-width: 260px;
  min-height: 260px;
  border-radius: 999px;
  background: var(--accent-glow);
  filter: blur(90px);
  opacity: 0.38;
  animation: floatGlow 15s ease-in-out infinite alternate;
}

.glow-one {
  top: 8%;
  left: -10%;
}

.glow-two {
  right: -12%;
  bottom: 12%;
  animation-delay: -5s;
}

.glow-three {
  left: 38%;
  bottom: -18%;
  opacity: 0.2;
  animation-delay: -9s;
}

.grid-glow {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 75%);
}

.particles {
  z-index: -2;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: var(--size);
  height: var(--size);
  left: var(--left);
  top: var(--top);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 22px var(--accent-glow);
  opacity: var(--opacity);
  animation: particleDrift var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(230, 205, 255, 0.1);
  background: rgba(5, 3, 8, 0.76);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1160px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  gap: 16px;
}

.logo,
.nav-links,
.nav-right,
.hero-actions,
.badges,
.link-cloud,
.hero-stats,
.theme-picker {
  display: flex;
  align-items: center;
}

.logo {
  flex: 0 0 auto;
  gap: 10px;
  font-weight: 850;
  letter-spacing: 0;
}

.logo-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-glow), rgba(255, 255, 255, 0.08));
  box-shadow: 0 0 24px var(--accent-glow);
}

.nav-links {
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(230, 205, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.nav-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.nav-right {
  flex: 0 0 auto;
  gap: 12px;
}

.theme-picker {
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(230, 205, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.theme-dot {
  width: 17px;
  height: 17px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: var(--dot-color);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.theme-dot:hover,
.theme-dot.is-active {
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 18px var(--dot-color);
  transform: scale(1.14);
}

.theme-dot[data-theme="purple"] {
  --dot-color: #9d4edd;
}

.theme-dot[data-theme="blue"] {
  --dot-color: #38bdf8;
}

.theme-dot[data-theme="red"] {
  --dot-color: #fb4d67;
}

.theme-dot[data-theme="green"] {
  --dot-color: #22c55e;
}

.theme-dot[data-theme="orange"] {
  --dot-color: #f97316;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 10px;
  background: var(--text);
}

.section {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 104px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.62fr);
  align-items: center;
  min-height: calc(100vh - 74px);
  gap: 44px;
  padding-top: 54px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3.45rem, 8.8vw, 6.6rem);
  line-height: 0.96;
  letter-spacing: 0;
  text-shadow: 0 0 44px var(--accent-glow);
  white-space: nowrap;
}

h2 {
  margin: 0 0 22px;
  font-size: clamp(2.15rem, 5vw, 3.7rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 12px;
  font-size: 1.26rem;
}

.hero-stats {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.stat-pill {
  min-width: 150px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.stat-pill strong,
.stat-pill span {
  display: block;
}

.stat-pill strong {
  color: var(--text);
  line-height: 1.1;
}

.stat-pill span {
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-subtitle,
.lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.8vw, 1.28rem);
}

.badges {
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 0;
}

.badges span,
.tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #f2e6ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.badges span {
  padding: 8px 13px;
  font-size: 0.9rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-weight: 820;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary,
.nav-cta {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 74%, white));
  color: #09050f;
  box-shadow: 0 14px 42px var(--accent-glow);
}

.button.primary:hover,
.nav-cta:hover {
  box-shadow: 0 18px 56px var(--accent-glow);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.button.secondary:hover {
  border-color: color-mix(in srgb, var(--accent) 52%, white);
  box-shadow: 0 14px 38px var(--accent-soft);
}

.button.disabled,
.button:disabled {
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(248, 243, 255, 0.42);
  transform: none;
}

.channel-card,
.glass-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    var(--bg-soft);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.channel-card {
  position: relative;
  padding: 26px;
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.channel-card::before {
  content: "";
  position: absolute;
  inset: -35% -20% auto auto;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: var(--accent-glow);
  filter: blur(48px);
  opacity: 0.72;
}

.channel-card:hover {
  border-color: color-mix(in srgb, var(--accent) 48%, white);
  box-shadow: 0 30px 110px var(--accent-soft), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-6px);
}

.channel-card-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.telegram-avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, white);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 0 34px var(--accent-glow);
  overflow: hidden;
}

.channel-avatar {
  width: 72px;
  height: 72px;
}

.avatar-image,
.avatar-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.avatar-image {
  z-index: 2;
  object-fit: cover;
  background: #0b0710;
}

.avatar-image.is-hidden {
  display: none;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.62), transparent 17%),
    linear-gradient(135deg, var(--accent), #10101a);
  color: white;
  font-size: 1.8rem;
  font-weight: 900;
}

.channel-title-block {
  position: relative;
  min-width: 0;
}

.status-badge {
  position: relative;
  display: inline-flex;
  width: fit-content;
  margin: 0 0 22px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
}

.channel-card h2 {
  position: relative;
  margin: 0 0 6px;
  font-size: 2.15rem;
}

.channel-card p {
  position: relative;
  margin: 0 0 22px;
  color: var(--muted);
}

.channel-card-gif {
  position: relative;
  display: block;
  width: 100%;
  max-height: 176px;
  margin: 0 0 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 18px 54px var(--accent-soft);
}

.channel-card-gif.is-hidden,
.js-hide-on-error.is-hidden {
  display: none;
}

.handle {
  color: var(--accent) !important;
  font-weight: 800;
}

.narrow {
  max-width: 900px;
}

.about-card {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  overflow: hidden;
  padding: clamp(24px, 5vw, 46px);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  box-shadow: 0 26px 100px var(--accent-soft), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.about-card::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -90px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: var(--accent-glow);
  filter: blur(70px);
  opacity: 0.36;
}

.about-card h2,
.about-card .eyebrow,
.about-copy {
  position: relative;
}

.about-copy {
  display: grid;
  gap: 18px;
  max-width: 860px;
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.03rem, 1.8vw, 1.18rem);
  line-height: 1.85;
}

.section-heading {
  margin-bottom: 30px;
}

.card-grid,
.rule-grid {
  display: grid;
  gap: 18px;
}

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

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

.glass-card {
  min-height: 100%;
  padding: 24px;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.glass-card:hover {
  border-color: color-mix(in srgb, var(--accent) 46%, white);
  box-shadow: 0 30px 110px var(--accent-soft), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-5px);
}

.glass-card p {
  margin: 14px 0 0;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  padding: 7px 12px;
  font-weight: 850;
}

.rule-card {
  padding: 20px;
}

.rule-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 0 24px var(--accent-soft);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.admin-avatar-wrap,
.bot-avatar {
  width: 112px;
  height: 112px;
}

.admin-info a:not(.button) {
  color: var(--accent);
  font-weight: 800;
}

.bot-avatar .avatar-fallback {
  font-size: 1.25rem;
}

.channel-card:hover .telegram-avatar,
.admin-card:hover .telegram-avatar {
  box-shadow: 0 0 46px var(--accent-glow);
}

.article-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: flex-start;
}

.article-card p {
  flex: 1;
  margin-bottom: 22px;
}

.link-cloud {
  flex-wrap: wrap;
  gap: 12px;
}

.link-cloud a {
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-weight: 780;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.link-cloud a:hover {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: 0 12px 34px var(--accent-soft);
  transform: translateY(-2px);
}

.support-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 26px;
  text-align: center;
}

.support-card {
  max-width: 820px;
}

.support-card p:not(.eyebrow) {
  max-width: 680px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 1.05rem;
}

.support-gif {
  display: block;
  width: min(100%, 520px);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 24px 80px var(--accent-soft);
}

.support-gif.is-hidden {
  display: none;
}

.footer {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.footer p {
  margin: 0 0 8px;
}

.footer span {
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes aurora {
  from {
    transform: translate3d(-2%, -2%, 0) rotate(0deg);
  }
  to {
    transform: translate3d(2%, 3%, 0) rotate(8deg);
  }
}

@keyframes floatGlow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(30px, -28px, 0) scale(1.08);
  }
}

@keyframes particleDrift {
  from {
    transform: translate3d(0, 18px, 0);
  }
  to {
    transform: translate3d(var(--drift), -112vh, 0);
  }
}

@media (max-width: 1080px) {
  .nav-links {
    gap: 2px;
  }

  .nav-links a {
    padding-inline: 9px;
    font-size: 0.86rem;
  }

  .nav-cta {
    display: none;
  }

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

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

@media (max-width: 920px) {
  .nav {
    min-height: 68px;
  }

  .nav-toggle {
    display: block;
    order: 3;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border-radius: 8px;
    background: rgba(10, 6, 16, 0.97);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  .nav-right {
    margin-left: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
    min-height: auto;
    padding-top: 78px;
  }

  .channel-card {
    max-width: 520px;
  }

  .card-grid.three,
  .card-grid.four,
  .card-grid.two {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 76px 0;
  }
}

@media (max-width: 620px) {
  .nav,
  .section,
  .footer {
    width: min(100% - 24px, 1160px);
  }

  .logo span:last-child {
    display: none;
  }

  .theme-picker {
    gap: 6px;
    padding: 7px;
  }

  .theme-dot {
    width: 15px;
    height: 15px;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-stats,
  .badges {
    align-items: stretch;
  }

  .stat-pill {
    flex: 1 1 145px;
  }

  .channel-card,
  .glass-card {
    padding: 20px;
  }

  .rule-grid {
    grid-template-columns: 1fr;
  }

  .admin-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }
}

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