/* Mobile-first landing — teal / mint palette */
:root {
  --teal-dark: #006071;
  --teal-mid: #0a8a9e;
  --mint-bg: #c8ebe0;
  --mint-panel: linear-gradient(145deg, #7dd3c0 0%, #5ec4ae 45%, #4ab89a 100%);
  --badge-green: #00c08b;
  --badge-red: #ff0000;
  --text-white: #ffffff;
  --header-h: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  /* background: var(--mint-bg); */
  color: #333;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: url("image/bg.png") center / cover no-repeat;
  /* background: var(--mint-bg); */
}

/* —— Header —— */
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  min-height: var(--header-h);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #222;
  flex: 0 0 auto;
}

.brand img {
  height: 28px;
  width: auto;
  display: block;
}

.brand-text {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.header-center {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: #888;
  line-height: 1.3;
  padding: 0 4px;
}

.btn-download {
  flex-shrink: 0;
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  background: var(--teal-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-download:active {
  opacity: 0.9;
  transform: scale(0.98);
}

.page-content {
  background: url("image/bg.png") no-repeat center top;
  background-size: cover;
}

/* —— Hero banner —— */
.hero {
  overflow: hidden;
}

.hero-inner {
  padding: 20px 20px 4px 20px;
}


.hero-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


.hero-photo-wrap {
  /* flex: 1;
  max-width: 160px;
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: flex-end; */
  cursor: pointer;
}

.hero-photo-wrap:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.hero-photo-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: bottom;
  border-radius: 6px;
}

.hero-caption {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-caption svg {
  flex-shrink: 0;
  opacity: 0.95;
}

.hero-carousel-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 2;
}

.hero-carousel-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* —— Network panel —— */
.network-wrap {
  padding: 20px 20px 24px;
  flex: 1;
}

.network-panel {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 14px 12px 12px;

  background:
    linear-gradient(135deg, rgba(255, 215, 120, 0.08) 0%, transparent 28%),
    radial-gradient(circle at 15% 0%, rgba(255, 215, 120, 0.22), transparent 30%),
    radial-gradient(circle at 85% 100%, rgba(180, 120, 30, 0.18), transparent 35%),
    repeating-linear-gradient(45deg,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px,
      transparent 8px),
    linear-gradient(135deg, #030303 0%, #0d0d0d 45%, #1b1204 100%);

  color: #f8e6b0;
  border: 1px solid rgba(255, 215, 120, 0.28);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.network-panel::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -80%;
  width: 45%;
  height: 220%;
  background: linear-gradient(120deg,
      transparent 0%,
      rgba(255, 236, 170, 0.08) 35%,
      rgba(255, 215, 120, 0.35) 50%,
      rgba(255, 236, 170, 0.08) 65%,
      transparent 100%);
  transform: rotate(18deg);
  animation: networkPanelLight 3.2s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.network-panel>* {
  position: relative;
  z-index: 2;
}

@keyframes networkPanelLight {
  0% {
    left: -80%;
    opacity: 0;
  }

  18% {
    opacity: 1;
  }

  55% {
    opacity: 1;
  }

  100% {
    left: 135%;
    opacity: 0;
  }
}

.network-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.network-head-text {
  flex: 1;
  min-width: 0;
}

.network-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.network-sub {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.4;
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff1b8 0%, #d6a642 45%, #9b681b 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-refresh svg {
  flex-shrink: 0;
}

.btn-refresh.is-busy svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.network-tip {
  margin: 8px 0 12px;
  font-size: 11px;
  color: #ff3b30;
  line-height: 1.45;
}

.line-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.line-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;

  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    radial-gradient(circle at 18% 10%, rgba(255, 232, 170, 0.18), transparent 36%),
    radial-gradient(circle at 90% 100%, rgba(180, 120, 30, 0.16), transparent 42%);

  border: 1px solid rgba(255, 236, 180, 0.22);

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 8px 22px rgba(0, 0, 0, 0.18);

  color: #f6e7bd;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;

  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

.line-item:active {
  transform: scale(0.99);
}

.line-item.is-fastest {
  /* background: linear-gradient(135deg, #fff1b8 0%, #d6a642 45%, #9b681b 100%);
  color: #fff3c4;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(255, 0, 0, 0.35); */
  background:
    linear-gradient(135deg, rgba(255, 226, 150, 0.28), rgba(120, 78, 18, 0.22)),
    linear-gradient(135deg, #1a1205, #080808);

  border-color: rgba(255, 213, 120, 0.9);

  box-shadow:
    0 0 0 1px rgba(255, 231, 170, 0.35),
    0 10px 26px rgba(180, 120, 30, 0.28),
    inset 0 1px 0 rgba(255, 240, 190, 0.42);

  color: #ffe7ad;
}

.line-item.is-fastest .line-ms {
  color: #fff3c4;
}

.line-item.is-fastest .line-name {
  color: #fff3c4;
}

.line-latency {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 52px;
}

.line-item:not(.is-fastest) .line-latency svg {
  stroke: #f8edca;
}

.line-ms {
  font-size: 15px;
  font-weight: 700;
  color: #f8edca;
}

.line-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #f8edca;
  min-width: 0;
}

.line-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-smooth {
  background: linear-gradient(135deg, #fff1b8 0%, #d6a642 45%, #9b681b 100%);
  color: #fff;
}

.badge-smooth .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.line-item.is-fastest .badge-fastest {
  background: rgba(255, 255, 255, 0.95);
  color: var(--badge-red);
}

.badge-fastest svg {
  flex-shrink: 0;
}

/* —— Footer —— */
.site-footer {
  padding: 16px 12px 24px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}