/* ==========================================================================
   86导航 — base
   ========================================================================== */

:root {
  --blue-primary: #6ea1f4;
  --blue-dark: #4971cf;
  --blue-soft: #6ea1f4;
  --blue-light: #eaf1ff;
  --blue-pale: #f4f8ff;
  --border-color: #dfe7f5;
  --text-dark: #1f2a3d;
  --text-gray: #6b7688;
  --red: #e6473c;
  --red-dark: #c8362c;
  --green: #17a566;
  --green-dark: #128a56;
  --cyan-dark: #6094b2;
  --cyan-light: #6db7cc;
  --cyan-pale: #e3f9fb;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--blue-pale);
  color: var(--text-dark);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.page {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: #ffffff;
  border-bottom: 2px solid var(--blue-primary);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand__logo-img {
  height: 40px;
  width: auto;
}

.brand__tagline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-gray);
  font-size: 14px;
  white-space: nowrap;
}

.brand__divider {
  color: var(--border-color);
  font-weight: 300;
}

.topnav {
  display: flex;
  gap: 10px;
}

.topnav__item {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.topnav__item:hover {
  background: var(--blue-primary);
  color: #fff;
}

/* ==========================================================================
   App download buttons
   ========================================================================== */

.app-download {
  display: none;
}

.app-download__item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  background: #fff;
  box-shadow: 5px 5px 5px rgba(31, 63, 130, 0.06);
  color: var(--blue-dark);
  font-size: 15px;
  font-weight: 700;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.app-download__item:hover {
  box-shadow: 0 4px 14px rgba(31, 63, 130, 0.12);
  transform: translateY(-1px);
}

.app-download__item img {
  height: 22px;
  width: auto;
}

/* ==========================================================================
   Sections
   ========================================================================== */

main.page {
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(31, 63, 130, 0.06);
}

.section--bordered {
  border: 2px solid var(--blue-primary);
}

.section--bordered .section__body {
  border: none;
}

.section__header {
  background: linear-gradient(90deg, var(--blue-dark), var(--blue-soft));
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.section--bordered .section__header {
  background: linear-gradient(90deg, var(--blue-dark), var(--blue-primary));
}

.section__bar {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: #fff;
  display: inline-block;
}

.section__note {
  font-size: 12px;
  font-weight: 400;
  color: #dce8ff;
}

.section__body {
  background: #fff;
  border: 1px solid var(--border-color);
  border-top: none;
  padding: 20px;
}

.section__body--flush {
  padding: 0;
}

/* ==========================================================================
   Line list — desktop table
   ========================================================================== */

.line-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: center;
}

.line-table th,
.line-table td {
  width: 14.2857%;
  padding: 14px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-table thead th {
  background: linear-gradient(to top, var(--blue-dark), var(--blue-primary), var(--blue-primary));
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.line-table tbody th {
  background: var(--blue-light);
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 14px;
}

.line-table thead th.is-recommended {
  background: linear-gradient(to top, var(--cyan-dark), var(--cyan-light));
  color: #fff;
}

.line-table td.is-recommended {
  background: var(--cyan-pale);
}

.line-cell {
  display: block;
}

.line-speed {
  font-weight: 700;
  color: var(--red);
  font-size: 14px;
}

.line-speed.is-fastest {
  color: var(--green);
}

.line-cards {
  display: none;
}

/* ==========================================================================
   Line assist cards
   ========================================================================== */

.assist-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.assist-card {
  appearance: none;
  -webkit-appearance: none;
  background: #fff;
  border: none;
  padding: 2px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
  width: 100%;
  box-shadow: 5px 5px 5px rgba(31, 63, 130, 0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.assist-card:hover {
  box-shadow: 0 4px 14px rgba(31, 63, 130, 0.12);
  transform: translateY(-1px);
}

.assist-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Logo grids — VPN / wallets / browsers
   ========================================================================== */

.logo-grid {
  display: grid;
  gap: 16px;
}

.logo-grid--vpn {
  grid-template-columns: repeat(4, 1fr);
}

.logo-grid--wallet {
  grid-template-columns: repeat(6, 1fr);
}

.logo-grid--browser {
  grid-template-columns: repeat(4, 1fr);
}

.logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  background: #fff;
  box-shadow: 5px 5px 5px rgba(31, 63, 130, 0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.logo-card:hover {
  box-shadow: 0 4px 14px rgba(31, 63, 130, 0.12);
  transform: translateY(-1px);
}

.logo-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  text-align: center;
  color: var(--text-gray);
  font-size: 13px;
  padding: 24px 16px 32px;
}

/* ==========================================================================
   Modals (content copy retained, restyled to match new palette)
   ========================================================================== */

.modal__container {
  max-width: 720px;
  border-radius: var(--radius-lg);
}

.modal__header {
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-dark));
  margin: -30px -30px 0;
  padding: 18px 30px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal__title {
  color: #fff;
}

.modal__close:before {
  color: #fff;
}

.help-title {
  font-size: 14px;
  color: var(--text-dark);
  line-height: 1.6;
}

.helper-wrapper {
  margin-top: 12px;
}

.helper-title {
  font-weight: 700;
  color: var(--blue-dark);
  margin: 14px 0 8px;
  font-size: 14px;
}

.helper-title span {
  background: var(--blue-primary);
  color: #fff;
  border-radius: 4px;
  padding: 2px 8px;
  margin-right: 6px;
  font-size: 12px;
}

.helper-img {
  margin: 6px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.helper-img.small {
  max-width: 260px;
}

.helper-img.big {
  width: 100%;
}

.help-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 13px;
}

.help-content table td {
  border: 1px solid var(--border-color);
  padding: 8px;
  text-align: center;
}

.help-content ol {
  padding-left: 20px;
  font-size: 13px;
}

.help-content ol li {
  margin-bottom: 10px;
}

/* ==========================================================================
   Responsive — tablet / mobile
   ========================================================================== */

@media (max-width: 900px) {
  .logo-grid--wallet {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .page {
    padding: 0 16px;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 20px;
    padding-bottom: 22px;
  }

  .brand {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .brand__divider {
    display: none;
  }

  .topnav {
    width: 100%;
    gap: 10px;
    margin-top: 4px;
  }

  .topnav__item {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    font-size: 13px;
  }

  main.page {
    padding-top: 16px;
    gap: 16px;
  }

  .section__header {
    font-size: 15px;
    padding: 12px 16px;
    align-items: center;
    gap: 6px 10px;
  }

  .section__note {
    font-size: 11px;
  }

  .section__body {
    padding: 14px;
  }

  .section__body--flush {
    padding: 12px;
  }

  .app-download {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .line-table {
    display: none;
  }

  .line-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .line-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    background: var(--blue-pale);
  }

  .line-card.is-recommended {
    border-color: var(--green);
    background: #eefdf5;
  }

  .line-card.is-recommended .line-card__name,
  .line-card.is-recommended .line-speed {
    color: var(--green-dark);
  }

  .line-card__name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
  }

  .line-card__enter {
    font-size: 12px;
    color: var(--text-gray);
  }

  .assist-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .logo-grid--vpn,
  .logo-grid--browser {
    grid-template-columns: repeat(2, 1fr);
  }

  .logo-grid--wallet {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .logo-card {
    padding: 10px 12px;
  }
}