:root {
  --bg: #000000;
  --bg-2: #0a0a14;
  --surface: rgba(27, 30, 36, 0.72);
  --surface-2: rgba(22, 26, 34, 0.88);
  --line: rgba(209, 214, 224, 0.2);
  --line-soft: rgba(209, 214, 224, 0.12);
  --text: rgba(255, 255, 255, 0.75);
  --text-soft: rgba(255, 255, 255, 0.5);
  --accent: #8b5cf6;
  --accent-2: #a78bfa;
  --accent-gradient: linear-gradient(135deg, #8b5cf6, #ec4899);
  --accent-gradient-hover: linear-gradient(135deg, #7c3aed, #db2777);
  --ok: #4ade80;
  --danger: #f87171;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.52);
  /* Glass tokens */
  --glass: rgba(10, 10, 20, 0.8);
  --glass-soft: rgba(10, 10, 20, 0.6);
  --panel-radius: 22px;
  --card-radius: 18px;
  --topbar-h: 68px;
}

/* ── News breadcrumbs ─────────────────────────────────────────────────── */

.news-breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  max-width: 800px;
  margin: 0 auto;
  font-size: 14px;
}

.news-breadcrumbs-left {
  display: flex;
  align-items: center;
}

.news-breadcrumbs-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-breadcrumbs a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-breadcrumbs a:hover {
  color: var(--accent);
}

.news-breadcrumbs .badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-breadcrumbs-date {
  color: var(--text-soft);
  font-size: 13px;
}

/* ── Featured card (news article) ─────────────────────────────────────── */

.featured-card {
  max-width: 800px;
  margin: 20px auto 60px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
}

.featured-card h3 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #fff;
}

.featured-card .news-excerpt {
  font-size: 16px;
  color: var(--text-soft);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ── News content images positioning ──────────────────────────────────── */

.featured-card .doc-render img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

.featured-card .doc-render img.align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.featured-card .doc-render img.align-left {
  float: left;
  margin-right: 20px;
  margin-bottom: 16px;
  max-width: 50%;
}

.featured-card .doc-render img.align-right {
  float: right;
  margin-left: 20px;
  margin-bottom: 16px;
  max-width: 50%;
}

/* ── Site layout elements ─────────────────────────────────────────────── */

.site-nav {
  padding: 12px 20px;
  background: var(--glass);
  border-bottom: 1px solid var(--line-soft);
}

.site-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}

.site-logo img {
  width: 32px;
  height: 32px;
}

.site-nav-links {
  display: flex;
  gap: 16px;
}

.site-nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.18s ease;
}

.site-nav-links a:hover {
  color: var(--accent-2);
}

.site-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.site-nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.hero-section {
  padding: 40px 20px;
  text-align: center;
  background: linear-gradient(135deg, rgba(89, 192, 255, 0.08), rgba(153, 109, 255, 0.06));
  border-radius: var(--panel-radius);
  margin-bottom: 20px;
}

.hero-section h1 {
  font-size: clamp(28px, 5vw, 48px);
  margin: 0 0 12px;
  color: #fff;
}

.hero-section p {
  font-size: 16px;
  color: var(--text-soft);
  margin: 0;
}

.site-footer {
  padding: 24px 20px;
  background: var(--glass);
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.site-footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.site-footer-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.18s ease;
}

.site-footer-links a:hover {
  color: var(--accent-2);
}

.top-banners-wrap {
  margin: 10px 16px 0;
}

.top-banners-wrap .wrap {
  padding: 0 20px;
}

.site-banners-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.site-banners-top .site-banner-card {
  min-height: clamp(150px, 26vw, 220px);
}

/* Mobile optimization for banners */
@media (max-width: 480px) {
  .top-banners-wrap {
    margin: 8px 8px 0;
  }
  
  .top-banners-wrap .wrap {
    padding: 0 8px;
  }
  
  .site-banners-top {
    gap: 8px;
  }
  
  .site-banners-top .site-banner-card {
    min-height: clamp(120px, 40vw, 180px);
  }
  
  .site-banner-content {
    inset: auto 10px 10px 10px;
  }
  
  .site-banner-content h3 {
    font-size: 16px;
  }
  
  .site-banner-content p {
    font-size: 12px;
  }
  
  .site-banner-content .button-link {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  /* Reduce section padding on mobile */
  .section-panel {
    padding: 12px 10px;
    margin-bottom: 12px;
  }
  
  /* Reduce main content margins */
  .site-main {
    padding: 0 4px;
  }
  
  /* Reduce hero section padding */
  .hero-section {
    padding: 20px 10px;
  }
  
  /* Adjust site nav for mobile */
  .site-nav {
    padding: 8px 10px;
  }
  
  /* Reduce footer padding */
  .site-footer {
    padding: 16px 10px;
  }
}

/* Tablet optimization for banners */
@media (min-width: 481px) and (max-width: 768px) {
  .top-banners-wrap {
    margin: 10px 12px 0;
  }
  
  .top-banners-wrap .wrap {
    padding: 0 12px;
  }
  
  .site-banners-top .site-banner-card {
    min-height: clamp(140px, 30vw, 200px);
  }
  
  .site-banner-content h3 {
    font-size: 18px;
  }
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  padding-top: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}


.theme-vidoox {
  position: relative;
}

/* ViDooX blink animation for 👀 emoji */
@keyframes vidoox-blink {
  0%, 46%, 50%, 100% { transform: scaleY(1); }
  48% { transform: scaleY(0.1); }
}

.vidoox-eyes {
  display: inline-block;
  animation: vidoox-blink 4s infinite;
  transform-origin: center;
}

.bg-layer {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(28px);
  pointer-events: none;
}

.bg-layer-a {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
  top: 10%;
  left: -5%;
  filter: blur(120px);
  border-radius: 999px;
  animation: orbFloat1 20s ease-in-out infinite;
}

.bg-layer-b {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.14) 0%, transparent 70%);
  top: 60%;
  right: -8%;
  filter: blur(120px);
  border-radius: 999px;
  animation: orbFloat2 25s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -20px); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 30px); }
}

.wrap {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  width: min(100%, 1040px);
  margin: 0 auto;
  border-radius: var(--panel-radius);
  /* Прозрачный фон с blur — наследует фон от баннера */
  background: rgba(10, 10, 20, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: box-shadow 0.3s ease, background 0.3s ease;
  animation: fadeIn 400ms ease;
}

.topbar::after {
  display: none;
}

.topbar .wrap {
  min-height: var(--topbar-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.brand {
  color: #eff5ff;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  text-decoration: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 16px;
  min-width: 80px;
  min-height: 40px;
  background-image: url("/img/preloader-play.webp");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: transparent;
  z-index: 1;
}

.brand .vidoox-eyes {
  position: relative;
  z-index: 2;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-right nav {
  display: flex;
  gap: 10px;
}

.topbar nav a {
  color: #adb2bc;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 14px;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.topbar nav a:hover {
  color: #f3f7ff;
  border-color: var(--line);
  background: rgba(139, 92, 246, 0.08);
}

.topbar nav a.is-current {
  color: #ffffff;
  border-color: rgba(139, 92, 246, 0.58);
  background: linear-gradient(130deg, rgba(139, 92, 246, 0.16), rgba(236, 72, 153, 0.12));
}

.hero {
  padding: 56px 0 26px;
  position: relative;
  animation: rise 500ms ease;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 10.5px;
  margin: 0;
}

h1 {
  font-size: clamp(30px, 4.2vw, 54px);
  font-weight: 800;
  margin: 14px 0 12px;
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 18ch;
  text-wrap: balance;
  color: #f3f7ff;
}

h2 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: #f3f7ff;
}

h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #eef3ff;
}

a {
  color: var(--accent-2);
}

.hero-lead {
  max-width: 62ch;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}

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

.hero-media-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-media {
  border-radius: var(--card-radius);
  min-height: 110px;
  border: 1px solid var(--line-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  background-size: cover;
  background-position: center;
  transform: translateY(0);
  transition: transform 0.25s ease, border-color 0.25s ease, filter 0.25s ease;
}

.hero-media:hover {
  transform: translateY(-4px);
  border-color: rgba(89, 192, 255, 0.55);
  filter: brightness(1.08);
}

.media-1 {
  background-image: linear-gradient(rgba(6, 11, 24, 0.5), rgba(6, 11, 24, 0.5)), url("/assets/update-thumbnail-1.jpg");
}

.media-2 {
  background-image: linear-gradient(rgba(6, 11, 24, 0.5), rgba(6, 11, 24, 0.5)), url("/assets/update-thumbnail-2.jpg");
}

.media-3 {
  background-image: linear-gradient(rgba(6, 11, 24, 0.5), rgba(6, 11, 24, 0.5)), url("/assets/update-thumbnail-3.jpg");
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  background: var(--accent-gradient);
  color: #ffffff;
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
}

.button-link:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.button-link-ghost {
  border-color: var(--line);
  background: rgba(153, 109, 255, 0.08);
  color: var(--text);
}

.button-link-ghost:hover {
  background: rgba(153, 109, 255, 0.16);
  border-color: var(--line);
  box-shadow: none;
}

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

.section-head a {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.8;
  transition: opacity 0.18s ease;
}

.section-head a:hover {
  opacity: 1;
}

/* ── Banners carousel (home page) ─────────────────── */

.carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  border-radius: var(--panel-radius);
  overflow: hidden;
  border: 1px solid rgba(89, 192, 255, 0.26);
  background: linear-gradient(135deg, rgba(89, 192, 255, 0.12), rgba(153, 109, 255, 0.12));
  min-height: 180px;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 180px;
}

.carousel-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

@media (min-width: 768px) {
  .carousel-slide {
    flex: 0 0 calc(50% - 7px);
  }
}

@media (min-width: 1024px) {
  .carousel-slide {
    flex: 0 0 calc(33.333% - 10px);
  }
}

.section-panel {
  padding: 24px 26px;
  margin-bottom: 20px;
}

/* Mobile responsive for section panels */
@media (max-width: 768px) {
  .section-panel {
    padding: 16px 16px;
    margin-bottom: 16px;
  }
  
  .section-head {
    margin-bottom: 12px;
  }
  
  .section-head h2 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .section-panel {
    padding: 12px 12px;
    margin-bottom: 12px;
  }
  
  .wrap {
    padding: 0 12px;
  }
}

.featured-news {
  display: grid;
}

.site-banners {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.site-banner-card {
  position: relative;
  min-height: 220px;
  border-radius: var(--panel-radius);
  border: 1px solid rgba(89, 192, 255, 0.26);
  background: linear-gradient(135deg, rgba(89, 192, 255, 0.18), rgba(153, 109, 255, 0.18));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.site-banner-content {
  position: absolute;
  inset: auto 16px 16px 16px;
  display: grid;
  gap: 8px;
}

.site-banner-content h3 {
  margin: 0;
  font-size: 22px;
  color: #f5f8ff;
}

.site-banner-content p {
  margin: 0;
  color: #dbe6ff;
}

.site-banner-content .button-link {
  color: #eef4ff;
}

.featured-card {
  border: 1px solid rgba(89, 192, 255, 0.26);
  border-radius: var(--panel-radius);
  padding: 24px;
  background:
    linear-gradient(140deg, rgba(89, 192, 255, 0.14), rgba(153, 109, 255, 0.07)),
    var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  max-width: 800px;
  margin: 0 auto;
}

/* News article meta: All news left, badge+date right */
.featured-card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.featured-card .meta a {
  text-decoration: none;
  color: var(--accent-2);
  font-weight: 600;
  font-size: 13px;
}

.featured-card .meta a:hover {
  color: #f3f7ff;
}

.featured-card h3 {
  margin: 10px 0;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.022em;
}

.featured-card p {
  color: #c8ccd6;
}

.featured-card .button-link {
  margin-top: 8px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 0;
}

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

.timeline-item {
  border-left: 2px solid rgba(89, 192, 255, 0.35);
  padding: 8px 0 8px 14px;
}

.timeline-item h3 {
  margin: 6px 0;
  color: #eaecf2;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.timeline-item p {
  margin: 0;
  color: #9ea6b8;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Glass utilities ──────────────────────────────── */

.glass {
  background: var(--glass);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255,255,255,0.05);
}

.glass-soft {
  background: var(--glass-soft);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.is-reveal {
  animation: reveal-up 0.45s ease both;
  animation-delay: var(--reveal-delay, 0ms);
}

.card {
  background: var(--glass);
  border: 1px solid var(--line-soft);
  border-radius: var(--card-radius);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  animation: rise 280ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(89, 192, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 42px rgba(0, 0, 0, 0.55);
  filter: brightness(1.06);
}

.card .meta {
  color: var(--text-soft);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-platform {
  color: #e9fcff;
  background: rgba(89, 192, 255, 0.2);
  border: 1px solid rgba(89, 192, 255, 0.35);
}

.badge-product {
  color: #eef3ff;
  background: rgba(153, 109, 255, 0.2);
  border: 1px solid rgba(153, 109, 255, 0.34);
}

.badge-docs {
  color: #e8ffe9;
  background: rgba(86, 242, 166, 0.18);
  border: 1px solid rgba(86, 242, 166, 0.34);
}

.card h3 {
  margin: 8px 0;
  color: #eeeff5;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.card p {
  margin: 0;
  color: #b8bcc8;
  font-size: 14px;
  line-height: 1.55;
}

.news-card-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  margin-bottom: 10px;
}

.footer {
  padding: 24px 20px 50px;
  color: var(--text-soft);
}

.news-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(89, 192, 255, 0.16);
  border: 1px solid rgba(89, 192, 255, 0.3);
  color: var(--accent-2);
  vertical-align: middle;
  margin-left: 6px;
}

.copy-link-btn {
  border: 1px solid var(--line);
  background: rgba(153, 109, 255, 0.08);
  color: var(--text-soft);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 15px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  line-height: 1;
  flex-shrink: 0;
}

.copy-link-btn:hover {
  color: var(--accent-2);
  border-color: rgba(89, 192, 255, 0.45);
  background: rgba(89, 192, 255, 0.1);
}

.docs {
  padding: 40px 20px 60px;
}

.card-surface {
  background: var(--glass);
  border: 1px solid var(--line-soft);
  border-radius: var(--panel-radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hint {
  color: var(--text-soft);
  font-size: 13px;
  margin: 4px 0 8px;
}

/* ── GitBook page layout ────────────────────────────────────────────────── */

.docs-page {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: calc(100vh - var(--topbar-h) - 32px);
  align-items: start;
  margin-top: 16px;
}

/* ── GitBook sidebar ────────────────────────────────────────────────────── */

.gitbook-sidebar {
  position: sticky;
  top: calc(var(--topbar-h) + 24px);
  height: calc(100vh - var(--topbar-h) - 40px);
  overflow: hidden;
  padding: 16px 16px 16px 0;
  margin-right: 0;
  width: 300px;
  border-right: none;
  background: transparent;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
}

.gitbook-sidebar-header {
  display: none;
}

.gitbook-brand {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--text);
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-soft);
  border-radius: 8px;
  padding: 4px 7px;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.icon-btn:hover,
.icon-btn.is-active {
  color: var(--accent-2);
  border-color: rgba(89, 192, 255, 0.4);
  background: rgba(89, 192, 255, 0.08);
}

.docs-search-topbar {
  display: block;
  width: 200px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid rgba(209, 214, 224, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 13px;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.docs-search-topbar:focus {
  outline: none;
  border-color: rgba(89, 192, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 2px rgba(89, 192, 255, 0.15);
}

.docs-search-topbar::placeholder { color: rgba(255, 255, 255, 0.4); }

@media (max-width: 768px) {
  .docs-search-topbar {
    display: none;
  }
}

.gitbook-nav {
  padding: 8px;
  margin: 0;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.gitbook-nav::-webkit-scrollbar { width: 5px; }
.gitbook-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(89, 192, 255, 0.18);
}

/* ── Group ── */

.gb-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}

.gb-group + .gb-group {
  border-top: none;
  padding-top: 4px;
}

.gb-group-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
  text-align: left;
}

.gb-group-toggle:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
}

.gitbook-nav .gb-group-toggle:hover,
.gitbook-nav .gb-page-link:hover,
.gitbook-nav .gb-page-link:focus-visible {
  color: #fff;
}

.gb-group-icon {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.gb-group-icon .gb-icon-emoji {
  font-size: 16px;
  line-height: 1;
}

.gb-group-icon .gb-icon-svg {
  width: 16px;
  height: 16px;
  color: currentColor;
}

.gb-group-title {
  flex: 1;
}

.gb-group-arrow {
  font-size: 11px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.gb-group.is-expanded .gb-group-arrow {
  transform: rotate(0deg);
}

.gb-group:not(.is-expanded) .gb-group-arrow {
  transform: rotate(-90deg);
}

.gb-group-items {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 0;
  transition: max-height 0.25s ease;
}

.gb-group.is-expanded .gb-group-items {
  max-height: 1200px;
}

/* ─ Page link ── */

.gb-page-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  transition: color 0.16s, background 0.16s;
  position: relative;
}

.gb-page-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.gb-page-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

/* Icon in page link */
.gb-page-link .gb-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gb-page-link .gb-icon .gb-icon-emoji {
  font-size: 16px;
  line-height: 1;
}

.gb-page-link .gb-icon .gb-icon-svg {
  width: 16px;
  height: 16px;
  color: currentColor;
}

.gb-page-link.is-active .gb-icon {
  opacity: 1;
}

.gb-subsection {
  display: flex;
  flex-direction: column;
  padding: 4px 0 2px;
  margin-top: 2px;
}

.gb-subsection:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 4px;
}

.gb-subsection-title {
  margin: 0 0 4px 10px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.4;
}

.gb-subsection-icon {
  font-size: 14px;
  line-height: 1;
  opacity: 0.6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}

.gb-subsection-items {
  display: flex;
  flex-direction: column;
}

.gb-page-link-sub {
  padding-left: 10px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}

.gb-page-link-sub:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.gb-page-link-sub.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.gb-page-link-sub::before {
  display: none;
}

.gb-draft-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  background: rgba(153, 109, 255, 0.12);
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.docs-header-menu-btn {
  display: none;
  margin-left: auto;
  margin-right: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.01em;
}

.gb-ungrouped {
  padding: 8px 0;
  border-top: 1px solid var(--line-soft);
  margin-top: 4px;
}

.gb-empty {
  padding: 10px 16px;
  color: var(--text-soft);
  font-size: 13px;
}

/* ── GitBook main ────────────────────────────────────────────────────────── */

.gitbook-main {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0;
  min-height: calc(100vh - var(--topbar-h) - 32px);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px 0 0;
}

.gitbook-content {
  min-width: 0;
  padding: 40px 48px 80px 0;
  border-right: 1px solid var(--line-soft);
}

.gitbook-content-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.gitbook-content-header h1 {
  margin: 10px 0 0;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.1;
}

.docs-content-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 8px;
}

#doc-link {
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--accent-2);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.18s ease;
}

#doc-link:hover { border-color: rgba(89, 192, 255, 0.55); }

/* ── Doc render ──────────────────────────────────────────────────────────── */

.doc-render {
  line-height: 1.72;
}

/* Reduce paragraph spacing in news content */
.doc-render p {
  margin: 0.4em 0;
}

.doc-render p + p {
  margin-top: 0.4em;
  color: #d4d8e4;
  font-size: 15px;
}

.doc-render h1 {
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 36px;
  margin-bottom: 12px;
  line-height: 1.1;
  color: #edeff5;
  scroll-margin-top: calc(var(--topbar-h) + 32px);
}

.doc-render h2 {
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 700;
  letter-spacing: -0.012em;
  margin-top: 32px;
  margin-bottom: 10px;
  line-height: 1.2;
  color: #e2e4ee;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  scroll-margin-top: calc(var(--topbar-h) + 32px);
}

.doc-render h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.006em;
  margin-top: 24px;
  margin-bottom: 8px;
  line-height: 1.3;
  color: #dadbea;
  scroll-margin-top: calc(var(--topbar-h) + 32px);
}

.doc-render pre {
  background: #0a0d12;
  color: #f4f6fb;
  padding: 16px;
  border-radius: 12px;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 16px 0;
}

.doc-render code {
  background: rgba(89, 192, 255, 0.1);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.88em;
}

.doc-render pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

.doc-render p,
.doc-render li { color: #babecC; }

.doc-render ul {
  padding-left: 20px;
  margin: 8px 0;
}

.doc-render li { margin: 4px 0; }

.doc-render blockquote {
  border-left: 3px solid rgba(89, 192, 255, 0.45);
  margin: 16px 0;
  padding: 10px 16px;
  background: rgba(89, 192, 255, 0.06);
  border-radius: 0 8px 8px 0;
}

.doc-render a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-render a:hover,
.doc-render a:focus-visible {
  color: #f3f7ff;
}

.gitbook-content ::selection,
.gitbook-sidebar ::selection {
  background: rgba(89, 192, 255, 0.34);
  color: #f3f7ff;
}

.doc-render hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 18px 0;
}

.doc-render ol {
  margin: 8px 0;
  padding-left: 20px;
}

.doc-render ul.contains-task-list {
  list-style: none;
  padding-left: 0;
}

.doc-render .task-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.doc-render .task-item input[type="checkbox"] {
  margin-top: 3px;
}

.doc-render table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
}

.doc-render th,
.doc-render td {
  border: 1px solid var(--line-soft);
  padding: 8px 10px;
  text-align: left;
}

.doc-render th {
  color: #eaf4ff;
  background: rgba(153, 109, 255, 0.12);
}

.doc-render img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
}

.doc-render .doc-video {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  margin: 14px 0;
  background: #04070d;
}

.doc-render .doc-details {
  margin: 14px 0;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(15, 24, 42, 0.38);
  overflow: hidden;
}

.doc-render .doc-details summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: #eaf3ff;
  padding: 11px 14px;
  background: rgba(89, 192, 255, 0.1);
}

.doc-render .doc-details summary::-webkit-details-marker {
  display: none;
}

.doc-render .doc-details-body {
  padding: 10px 14px 12px;
}

.doc-render .doc-details[open] summary {
  border-bottom: 1px solid var(--line-soft);
}

/* ── TOC ────────────────────────────────────────────────────────────────── */

.doc-toc {
  display: block;
  position: sticky;
  top: calc(var(--topbar-h) + 24px);
  max-height: calc(100vh - var(--topbar-h) - 40px);
  overflow-y: auto;
  width: 220px;
  flex-shrink: 0;
  padding: 40px 16px 80px;
  border-left: 1px solid var(--line-soft);
}

.doc-toc:not(.has-items) {
  padding-top: 0;
  padding-bottom: 0;
}

.doc-toc-title {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  margin: 0 0 12px;
  padding: 0;
}

.doc-toc a {
  display: block;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.5;
  padding: 3px 0 3px 8px;
  border-left: 2px solid transparent;
  transition: color 0.16s, border-color 0.16s;
}

.doc-toc a:hover {
  color: var(--accent-2);
  border-left-color: rgba(89, 192, 255, 0.5);
}

.doc-toc a.toc-h2 { padding-left: 18px; font-size: 12px; opacity: 0.85; }
.doc-toc a.toc-h3 { padding-left: 28px; font-size: 11.5px; opacity: 0.7; }

/* ─ Admin panel ────────────────────────────────────────────────────────── */

.admin-panel {
  width: 360px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--topbar-h) + 24px);
  max-height: calc(100vh - var(--topbar-h) - 40px);
  overflow-y: auto;
  margin-top: 40px;
  padding: 16px;
  border-radius: var(--card-radius);
}

.admin-panel::-webkit-scrollbar { width: 5px; }
.admin-panel::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(89,192,255,0.18); }

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
}

.admin-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-soft);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.admin-tab:hover {
  color: var(--text);
  background: rgba(153, 109, 255, 0.08);
}

.admin-tab.is-active {
  color: var(--accent-2);
  border-color: rgba(89, 192, 255, 0.4);
  background: rgba(89, 192, 255, 0.08);
}

.admin-tab-body {
  display: grid;
  gap: 8px;
}

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

.admin-section-head span {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}

.admin-panel label {
  font-weight: 600;
  font-size: 12.5px;
  color: #9ea6b2;
}

.admin-panel input,
.admin-panel textarea,
.admin-select {
  border: 1px solid var(--line);
  background: rgba(4, 10, 23, 0.58);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 11px;
  font: inherit;
  font-size: 13px;
  width: 100%;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.admin-panel input:focus,
.admin-panel textarea:focus,
.admin-select:focus {
  outline: none;
  border-color: rgba(89, 192, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(89, 192, 255, 0.12);
}

.admin-panel input::placeholder,
.admin-panel textarea::placeholder { color: #8a9099; }

.admin-select option { background: #111318; }

.admin-panel textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.55;
}

.editor-preview-wrap {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(3, 10, 22, 0.52);
  overflow: hidden;
}

.preview-label {
  margin: 0;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line-soft);
  color: #9ea6b2;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.editor-preview {
  max-height: 200px;
  overflow: auto;
  padding: 10px 12px;
  font-size: 13px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
}

.actions {
  display: flex;
  gap: 8px;
}

.status {
  margin: 2px 0 0;
  color: var(--text-soft);
  font-size: 12.5px;
  min-height: 18px;
}

/* ── Nav groups editor ─────────────────────────────────────────────────── */

.nav-groups-list {
  display: grid;
  gap: 6px;
}

.nav-group-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(22, 25, 32, 0.6);
}

.nav-group-drag {
  color: var(--text-soft);
  font-size: 16px;
  cursor: grab;
  flex-shrink: 0;
}

.nav-group-icon-input {
  width: 40px !important;
  text-align: center;
  padding: 5px 4px !important;
  flex-shrink: 0;
}

.nav-group-title-input {
  flex: 1;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--line-soft);
  color: var(--text-soft);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.16s, background 0.16s;
  line-height: 1;
}

.btn-icon:hover { color: var(--text); background: rgba(153,109,255,0.08); }
.btn-danger:hover { color: var(--danger); border-color: rgba(255, 126, 154, 0.4); }

/* ── Shared buttons ─────────────────────────────────────────────────────── */

button {
  border: 1px solid rgba(189, 196, 210, 0.36);
  background: linear-gradient(130deg, rgba(58, 64, 80, 0.52), rgba(42, 46, 58, 0.4));
  color: #ffffff;
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

button:hover {
  background: linear-gradient(130deg, rgba(76, 84, 104, 0.62), rgba(58, 64, 80, 0.52));
  border-color: rgba(209, 214, 224, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.btn-ghost {
  background: rgba(153, 109, 255, 0.08);
  border-color: var(--line);
  color: var(--text-soft);
}

.btn-ghost:hover {
  background: rgba(153, 109, 255, 0.14);
  color: var(--text);
}

button:focus-visible,
.button-link:focus-visible,
nav a:focus-visible {
  outline: 2px solid rgba(89, 192, 255, 0.9);
  outline-offset: 2px;
}

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

@media (max-width: 1200px) {
  .doc-toc { display: none !important; }
  .gitbook-main { grid-template-columns: 1fr; }
  .gitbook-content { border-right: none; padding: 40px 48px 80px; }
  .admin-panel { width: 320px; }
}

@media (max-width: 960px) {
  .docs-page {
    grid-template-columns: 1fr;
  }
  .gitbook-content { padding: 18px 16px 48px; }

  .top-banners-wrap {
    margin: 8px 8px 0;
  }

  .top-banners-wrap .wrap {
    padding: 0 12px;
  }

  .site-banners-top .site-banner-card {
    min-height: 132px;
    border-radius: 14px;
  }

  .docs-header-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .topbar-right nav {
    display: none;
  }

  .gitbook-sidebar {
    position: fixed;
    left: 0;
    top: calc(var(--topbar-h) + 20px);
    bottom: 0;
    height: auto;
    width: min(320px, 86vw);
    z-index: 45;
    transform: translateX(-110%);
    transition: transform 0.25s ease;
    border-right: none;
    background: rgba(15, 18, 24, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
  }

  body.docs-nav-open .gitbook-sidebar {
    transform: translateX(0);
  }

  body.docs-nav-open::after {
    content: "";
    position: fixed;
    inset: calc(var(--topbar-h) + 20px) 0 0 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 40;
    backdrop-filter: blur(2px);
  }

  .admin-panel { display: none; }
}

@media (max-width: 680px) {
  :root { --topbar-h: 54px; }
  .topbar { margin: 0 8px; border-radius: 18px; width: calc(100% - 16px); }
  .topbar .wrap { min-height: 54px; padding: 0 8px; }
  .brand { font-size: 17px; }
  .topbar nav { gap: 4px; }
  .topbar nav a { padding: 6px 10px; font-size: 13px; }
  .hero { padding-top: 40px; }
  h1 { font-size: clamp(26px, 8vw, 40px); }
  .hero-media-grid { grid-template-columns: 1fr; gap: 8px; }
  .section-panel { padding: 16px; margin-bottom: 14px; }
  .featured-card { padding: 16px; }
  .cards { grid-template-columns: 1fr; }
  .footer { padding: 20px 20px 40px; font-size: 13px; }

  .docs-content-top-actions {
    gap: 6px;
    padding-top: 4px;
  }

  #doc-link {
    padding: 5px 10px;
    font-size: 11.5px;
  }

  .copy-link-btn {
    padding: 5px 8px;
    font-size: 13px;
  }
}

/* ── News Carousel ───────────────────────────────────────────────────────── */

.news-carousel-section {
  overflow: hidden;
}

.news-carousel-container {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.carousel-nav:hover {
  border-color: rgba(89, 192, 255, 0.5);
  background: rgba(89, 192, 255, 0.12);
  color: var(--accent-2);
}

.carousel-nav:active {
  transform: scale(0.92);
}

.carousel-nav svg {
  width: 18px;
  height: 18px;
}

.news-carousel-track {
  flex: 1;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0;
  scrollbar-width: none;
}

.news-carousel-track::-webkit-scrollbar {
  display: none;
}

.news-carousel-track .carousel-card {
  flex: 0 0 calc(100% - 0px);
  scroll-snap-align: start;
  min-width: 300px;
}

@media (min-width: 768px) {
  .news-carousel-track .carousel-card {
    flex: 0 0 calc(50% - 8px);
  }
}

@media (min-width: 1024px) {
  .news-carousel-track .carousel-card {
    flex: 0 0 calc(33.333% - 11px);
  }
}

.carousel-card {
  background: var(--glass);
  border: 1px solid var(--line-soft);
  border-radius: var(--card-radius);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.carousel-card:hover {
  transform: translateY(-3px);
  border-color: rgba(89, 192, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 42px rgba(0, 0, 0, 0.55);
}

.carousel-card .card-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  margin-bottom: 12px;
}

.carousel-card .card-meta {
  color: var(--text-soft);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.carousel-card h3 {
  margin: 0 0 8px;
  color: #eeeff5;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.carousel-card p {
  margin: 0;
  color: #b8bcc8;
  font-size: 13px;
  line-height: 1.5;
}

.carousel-card .read-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(89, 192, 255, 0.18), rgba(153, 109, 255, 0.14));
  border: 1px solid rgba(89, 192, 255, 0.35);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: all 0.25s ease;
  box-shadow: 0 2px 12px rgba(89, 192, 255, 0.1);
}

.carousel-card .read-more-btn:hover {
  background: linear-gradient(135deg, rgba(89, 192, 255, 0.28), rgba(153, 109, 255, 0.22));
  border-color: rgba(89, 192, 255, 0.55);
  box-shadow: 0 4px 20px rgba(89, 192, 255, 0.2);
  transform: translateY(-1px);
}

.carousel-card .read-more-btn:active {
  transform: translateY(0) scale(0.97);
}

.carousel-card .read-more-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.carousel-card:hover .read-more-btn svg {
  transform: translateX(4px);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--line);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.carousel-dot.is-active {
  background: var(--accent-2);
  transform: scale(1.3);
}

.carousel-dot:hover {
  background: rgba(89, 192, 255, 0.5);
}

/* ── Roadmap Snake ───────────────────────────────────────────────────────── */

.roadmap-section {
  background: linear-gradient(135deg, rgba(89, 192, 255, 0.06), rgba(153, 109, 255, 0.04)), var(--glass);
}

.roadmap-snake {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
  padding: 20px 0;
}

.roadmap-snake-row {
  display: contents;
}

.roadmap-snake-item {
  animation: reveal-up 0.45s ease both;
  position: relative;
  padding: 0 12px;
}

.roadmap-snake-connector {
  position: absolute;
  top: 50%;
  right: -14px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roadmap-snake-connector svg {
  width: 20px;
  height: 20px;
}

.roadmap-snake-connector-line {
  stroke: var(--accent-2);
  stroke-width: 2;
  fill: none;
}

.roadmap-snake-item.completed .roadmap-snake-connector svg .roadmap-snake-connector-line {
  stroke: #4ade80;
}

.roadmap-snake-item.in-progress .roadmap-snake-connector svg .roadmap-snake-connector-line {
  stroke: #fbbf24;
  animation: pulse-line 2s ease-in-out infinite;
}

.roadmap-snake-item.planned .roadmap-snake-connector svg .roadmap-snake-connector-line {
  stroke: rgba(153, 109, 255, 0.5);
}

@keyframes pulse-line {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.roadmap-snake-item:last-child .roadmap-snake-connector {
  display: none;
}

.roadmap-snake-card {
  background: var(--glass);
  border: 1px solid var(--line-soft);
  border-radius: var(--card-radius);
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 160px;
}

.roadmap-snake-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}

.roadmap-snake-item.completed .roadmap-snake-card::before {
  background: linear-gradient(90deg, #4ade80, rgba(74, 222, 128, 0.6));
}

.roadmap-snake-item.in-progress .roadmap-snake-card::before {
  background: linear-gradient(90deg, #fbbf24, rgba(251, 191, 36, 0.6));
}

.roadmap-snake-item.planned .roadmap-snake-card::before {
  background: linear-gradient(90deg, #a78bfa, rgba(167, 139, 250, 0.6));
}

.roadmap-snake-item:hover .roadmap-snake-card {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(89, 192, 255, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.roadmap-snake-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.roadmap-snake-date {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(89, 192, 255, 0.12);
  border: 1px solid rgba(89, 192, 255, 0.25);
}

.roadmap-snake-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.roadmap-snake-status.completed {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.roadmap-snake-status.in-progress {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.roadmap-snake-status.planned {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.roadmap-snake-card h3 {
  margin: 0 0 6px;
  color: #eef3ff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.roadmap-snake-card p {
  margin: 0;
  color: #9ea6b8;
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.roadmap-error {
  text-align: center;
  color: var(--text-soft);
  padding: 24px;
}

@media (max-width: 1024px) {
  .roadmap-snake {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 12px;
  }
  
  .roadmap-snake-item {
    padding: 0;
  }
  
  .roadmap-snake-connector {
    display: none;
  }
  
  .roadmap-snake-card {
    padding: 16px;
    min-height: 140px;
  }
  
  .roadmap-snake-card h3 {
    font-size: 13px;
  }
}

@media (max-width: 680px) {
  .news-carousel-container {
    gap: 8px;
  }
  
  .carousel-nav {
    width: 32px;
    height: 32px;
  }
  
  .carousel-nav svg {
    width: 14px;
    height: 14px;
  }
  
  .roadmap-snake {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .roadmap-snake-card {
    padding: 14px;
    min-height: auto;
  }
  
  .roadmap-snake-card h3 {
    font-size: 14px;
  }
  
  .roadmap-snake-header {
    flex-wrap: wrap;
  }
  
  .roadmap-snake-connector {
    display: none;
  }
}

/* ── News feed (all news page) ────────────────────────────────────────────── */

.news-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.news-feed-card {
  display: flex;
  flex-direction: column;
  background: var(--glass);
  border: 1px solid var(--line-soft);
  border-radius: var(--card-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  animation: rise 280ms ease both;
  animation-delay: var(--reveal-delay, 0ms);
}

.news-feed-card:hover {
  transform: translateY(-4px);
  border-color: rgba(89, 192, 255, 0.45);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  filter: brightness(1.06);
}

.news-feed-card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 1px solid var(--line-soft);
}

.news-feed-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.news-feed-card-body .meta {
  color: var(--text-soft);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-feed-card-body h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #eef3ff;
}

.news-feed-card-body p {
  margin: 0;
  color: #b8bcc8;
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
}

.news-feed-card .read-more {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ── Ecosystem Section ─────────────────────────────────────────────────────── */

/* ── Ecosystem Section (Horizontal Scroll Carousel) ────────────────────── */

.ecosystem-section {
  margin-bottom: 20px;
  padding: 40px 0;
  background: transparent;
}

.ecosystem-carousel {
  position: relative;
  overflow: hidden;
}

.ecosystem-carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.ecosystem-carousel-track:active {
  cursor: grabbing;
}


.ecosystem-carousel-track::-webkit-scrollbar {
  display: none;
}

.ecosystem-card {
  position: relative;
  border-radius: var(--card-radius);
  overflow: hidden;
  min-width: 300px;
  max-width: 340px;
  flex-shrink: 0;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ecosystem-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.2);
}

/* Card backgrounds */
.ecosystem-card--play {
  background: linear-gradient(180deg, rgba(6, 11, 24, 0.2) 0%, rgba(6, 11, 24, 0.85) 100%),
              url('/assets/4096-rpg-card.png') center/cover no-repeat;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.ecosystem-card--warp {
  background: linear-gradient(180deg, rgba(6, 11, 24, 0.2) 0%, rgba(6, 11, 24, 0.85) 100%),
              url('/assets/lucky-digger-card.jpg') center/cover no-repeat;
  border: 1px solid rgba(89, 192, 255, 0.3);
}

.ecosystem-card--tower {
  background: linear-gradient(180deg, rgba(6, 11, 24, 0.2) 0%, rgba(6, 11, 24, 0.85) 100%),
              url('/assets/tower-card.jpeg') center/cover no-repeat;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.ecosystem-card__content {
  position: relative;
  z-index: 2;
  padding: 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 10, 20, 0.6) 100%);
}

.ecosystem-card__title {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.ecosystem-card__divider {
  width: 40px;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.ecosystem-card__desc {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.ecosystem-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--accent-gradient);
  color: #ffffff;
  text-decoration: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  align-self: flex-start;
  margin-top: 4px;
}

.ecosystem-card__btn:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.4);
}

.ecosystem-card__btn svg {
  transition: transform 0.2s ease;
}

.ecosystem-card__btn:hover svg {
  transform: translateX(4px);
}

/* Carousel navigation buttons */
.ecosystem-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.ecosystem-carousel-btn:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.5);
}

.ecosystem-carousel-btn svg {
  width: 18px;
  height: 18px;
}

.ecosystem-carousel-prev {
  left: 8px;
}

.ecosystem-carousel-next {
  right: 8px;
}

/* Ecosystem responsive */
@media (max-width: 1024px) {
  .ecosystem-section {
    padding: 30px 0;
  }

  .ecosystem-card {
    min-width: 280px;
    max-width: 320px;
    min-height: 340px;
  }

  .ecosystem-card__content {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .ecosystem-section {
    padding: 24px 0;
  }

  .ecosystem-card {
    min-width: 260px;
    max-width: 300px;
    min-height: 300px;
  }

  .ecosystem-card__content {
    padding: 18px;
    gap: 10px;
  }

  .ecosystem-card__title {
    font-size: 20px;
  }

  .ecosystem-card__desc {
    font-size: 13px;
  }

  .ecosystem-card__btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .ecosystem-carousel-btn {
    width: 32px;
    height: 32px;
  }

  .ecosystem-carousel-btn svg {
    width: 14px;
    height: 14px;
  }
}

.news-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.news-pagination button {
  border: 1px solid var(--line);
  background: rgba(153, 109, 255, 0.08);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.news-pagination button:hover:not(:disabled) {
  color: var(--accent-2);
  border-color: rgba(89, 192, 255, 0.45);
  background: rgba(89, 192, 255, 0.1);
}

.news-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ── Brief news cards (home page) ─────────────────────────────────────────── */

.brief-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.brief-card {
  display: flex;
  flex-direction: column;
  background: var(--glass);
  border: 1px solid var(--line-soft);
  border-radius: var(--card-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  animation: rise 280ms ease both;
  animation-delay: var(--reveal-delay, 0ms);
}

.brief-card:hover {
  transform: translateY(-3px);
  border-color: rgba(89, 192, 255, 0.45);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  filter: brightness(1.06);
}

.brief-card-image {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-bottom: 1px solid var(--line-soft);
}

.brief-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.brief-card-body .meta {
  color: var(--text-soft);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brief-card-body h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #eef3ff;
}

.brief-card-body p {
  margin: 0;
  color: #b8bcc8;
  font-size: 12px;
  line-height: 1.45;
  flex: 1;
}

.brief-card .read-more {
  margin-top: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.all-news-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-2);
  text-decoration: none;
  transition: opacity 0.18s ease;
}

.all-news-link:hover {
  opacity: 0.8;
}

/* ── News feed cards (news.html page) ─────────────────────────────────────── */

.news-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.news-feed-card {
  display: flex;
  flex-direction: column;
  background: var(--glass);
  border: 1px solid var(--line-soft);
  border-radius: var(--card-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  animation: rise 280ms ease both;
  animation-delay: var(--reveal-delay, 0ms);
}

.news-feed-card:hover {
  transform: translateY(-3px);
  border-color: rgba(89, 192, 255, 0.45);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  filter: brightness(1.06);
}

.news-feed-card-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-bottom: 1px solid var(--line-soft);
}

.news-feed-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.news-feed-card-body .meta {
  color: var(--text-soft);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.news-feed-card-body h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #eef3ff;
}

.news-feed-card-body p {
  margin: 0;
  color: #b8bcc8;
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
}

.news-feed-card .read-more {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
