:root {
  color-scheme: dark;
  --bg: #07090a;
  --text: #f3f7f5;
  --muted: #98a39e;
  --line: #20282b;
  --surface: #101518;
  --surface-2: #151b1f;
  --green: #5be28f;
  --blue: #80b4ff;
  --amber: #e8ba67;
  --shadow: 0 14px 46px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.45;
}

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

button {
  font: inherit;
}

.hero,
.section,
.split-section,
.footer {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1040px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 12px 18px;
  background: rgba(16, 21, 24, 0.88);
  border: 1px solid rgba(91, 226, 143, 0.16);
  border-radius: 999px;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.hero-actions,
.cta-row,
.panel-actions,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 9px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #06100b;
  background: var(--green);
  border-radius: 8px;
}

.nav {
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 28px;
  padding: 46px 0 34px;
}

.eyebrow,
.label,
.small-note {
  color: var(--muted);
  font-size: 13px;
}

.eyebrow {
  margin: 0 0 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.02;
}

h1 {
  max-width: 620px;
  font-size: clamp(40px, 6vw, 72px);
}

h2 {
  font-size: clamp(26px, 3.3vw, 38px);
}

.lead {
  max-width: 600px;
  margin: 16px 0 0;
  color: #bdc8c2;
  font-size: 18px;
}

.hero-actions,
.cta-row,
.panel-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
}

.button.primary {
  color: #06100b;
  background: var(--green);
}

.button.secondary {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
}

.small-note {
  margin: 12px 0 0;
}

.hero-panel,
.server-card,
.vless-panel,
details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.hero-panel {
  padding: 14px;
  box-shadow: var(--shadow);
}

.panel-head,
.route-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.panel-head {
  padding: 2px 2px 12px;
  color: var(--muted);
  font-size: 13px;
}

.panel-head strong {
  justify-self: end;
  color: var(--green);
}

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

.route-row {
  min-height: 52px;
  padding: 10px 12px;
  background: #0b1012;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.flag,
.inline-flag {
  display: inline-grid;
  place-items: center;
  filter: saturate(1.12);
}

.flag img,
.inline-flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flag {
  width: 34px;
  height: 23px;
  background: transparent;
  border: 1px solid #273236;
  border-radius: 4px;
  overflow: hidden;
}

.inline-flag {
  width: 22px;
  height: 16px;
  margin-right: 6px;
  overflow: hidden;
  border-radius: 3px;
  vertical-align: -2px;
}

.route-row strong {
  font-size: 16px;
}

.route-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.route-row.preferred {
  border-color: rgba(91, 226, 143, 0.48);
}

.route-row.reserve .flag {
  border-color: rgba(232, 186, 103, 0.36);
}

.route-row.vless-row .flag {
  border-color: rgba(128, 180, 255, 0.36);
}

.section,
.split-section {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  gap: 8px;
  max-width: 720px;
  margin-bottom: 14px;
}

.section-heading p,
.split-section p,
.server-card p,
details p {
  margin: 0;
  color: var(--muted);
}

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

.server-card {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.server-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.server-card h3 {
  margin: 0;
  font-size: 20px;
}

.badge {
  width: fit-content;
  padding: 5px 8px;
  color: var(--green);
  background: rgba(91, 226, 143, 0.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.badge.fallback {
  color: var(--amber);
  background: rgba(232, 186, 103, 0.12);
}

.server-meta {
  display: grid;
  gap: 5px;
}

.server-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 24px;
}

.split-section p {
  max-width: 680px;
  margin-top: 12px;
}

.vless-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.label {
  display: block;
  margin-bottom: 4px;
}

.vless-panel strong {
  font-size: 17px;
}

.faq-list {
  display: grid;
  gap: 8px;
  max-width: 840px;
}

details {
  padding: 14px 16px;
}

summary {
  cursor: pointer;
  font-weight: 850;
}

details p {
  margin-top: 10px;
}

.footer {
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer a:hover {
  color: var(--text);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 32px));
  padding: 10px 12px;
  color: white;
  background: #172126;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .hero,
  .section,
  .split-section,
  .footer,
  .site-header {
    width: min(100% - 24px, 620px);
  }

  .nav {
    gap: 8px;
    margin-left: auto;
    font-size: 0;
  }

  .nav a {
    display: grid;
    min-width: 44px;
    min-height: 36px;
    place-items: center;
    padding: 0 10px;
    color: var(--text);
    background: #0b1012;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13px;
  }

  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 20px;
    padding-top: 28px;
  }

  .hero-panel,
  .vless-panel {
    max-width: none;
  }

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

  .split-section {
    gap: 16px;
  }
}

@media (max-width: 520px) {
  .site-header {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
    padding: 12px;
    border-radius: 18px;
  }

  .brand {
    justify-content: center;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-left: 0;
  }

  .nav a {
    min-width: 0;
    padding: 0 8px;
  }

  .hero {
    padding: 24px 0 24px;
  }

  h1 {
    font-size: clamp(34px, 12vw, 48px);
  }

  h2 {
    font-size: 28px;
  }

  .lead {
    font-size: 16px;
  }

  .hero-actions,
  .cta-row,
  .panel-actions {
    gap: 8px;
    margin-top: 16px;
  }

  .button {
    min-height: 48px;
  }

  .hero-actions .button,
  .cta-row .button,
  .panel-actions .button,
  .server-actions .button {
    width: 100%;
  }

  .server-actions {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .server-card,
  .vless-panel,
  details {
    border-radius: 12px;
  }

  .server-card {
    gap: 12px;
    padding: 13px;
  }

  .server-top {
    grid-template-columns: auto 1fr;
  }

  .route-row {
    grid-template-columns: auto 1fr;
    min-height: 58px;
    padding: 11px;
  }

  .route-row em {
    grid-column: 2;
  }

  .section,
  .split-section {
    padding: 22px 0;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
