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

:root {
  --primary-color: #2563eb;
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;
  --accent-color: #f59e0b;
  --secondary-color: #f7f8fa;
  --surface-color: #ffffff;
  --surface-muted: #f2f4f7;
  --text-dark: #111827;
  --text-color: #4b5563;
  --text-light: #6b7280;
  --border-color: #e5e7eb;
  --success-color: #166534;
  --warning-color: #92400e;
  --error-color: #d14343;
  --radius: 8px;
  --shadow: 0 12px 34px rgba(17, 24, 39, 0.07);
  --transition: 220ms ease;
}

html {
  min-height: 100%;
  background: var(--secondary-color);
  color: var(--text-color);
  font-size: 16px;
  line-height: 1.65;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--secondary-color) 240px),
    var(--secondary-color);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

.site-shell {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 32px;
}

.route-badge,
.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 12px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.top-card {
  margin-bottom: 28px;
  padding: 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.top-card h2 {
  width: 100%;
  max-width: none;
  color: var(--text-dark);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 850;
  line-height: 1.18;
}

.top-card p {
  width: 100%;
  max-width: none;
  margin-top: 18px;
  color: var(--text-color);
  font-size: 18px;
}

.top-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.top-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text-dark);
  font-size: 13px;
  font-weight: 800;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  background: var(--primary-color);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.contact-pill::after {
  content: "›";
  margin-left: 8px;
  font-size: 18px;
  line-height: 1;
}

.contact-pill:hover {
  background: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
}

.related-heading {
  margin-top: 28px;
}

.section-heading h2,
.notice-copy h2 {
  color: var(--text-dark);
  font-size: 26px;
  line-height: 1.2;
}

.section-heading p {
  max-width: 420px;
  color: var(--text-light);
  font-size: 15px;
  text-align: right;
}

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

.domain-status {
  display: flex;
  min-height: 224px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: none;
}

.domain-status:hover {
  border-color: rgba(37, 99, 235, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.domain-status.is-featured {
  border-color: rgba(217, 119, 6, 0.38);
  background: #fffaf3;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.status {
  padding: 0 10px;
  background: var(--surface-muted);
  color: var(--text-dark);
}

.success .status {
  background: #f3f4f6;
  color: #374151;
}

.status.is-recommended {
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.status.is-recommended::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: #ffffff;
}

.status.is-overseas {
  border: 1px solid rgba(217, 119, 6, 0.2);
  background: #fff7ed;
  color: #9a3412;
}

.status.is-overseas::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: #f97316;
}

.route-badge {
  padding: 0 10px;
  background: rgba(244, 201, 93, 0.24);
  color: #8a5c12;
}

.name {
  margin-bottom: 10px;
  color: var(--text-dark);
  font-size: 20px;
  font-weight: 820;
  line-height: 1.28;
}

.domain-status p {
  margin-bottom: 18px;
  color: var(--text-color);
  font-size: 15px;
}

.card-actions {
  display: block;
  margin-top: auto;
}

.link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--primary-color);
  border-radius: var(--radius);
  background: var(--primary-color);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
}

.link:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(23, 107, 135, 0.18);
}

.latency-result {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-top: 10px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--text-light);
  font-size: 13px;
  font-weight: 700;
}

.latency-result.is-loading {
  background: #eff6ff;
  color: var(--primary-dark);
}

.latency-result.is-muted {
  background: var(--surface-muted);
  color: var(--text-light);
}

.latency-result.is-fast {
  background: #ecfdf3;
  color: #166534;
}

.latency-result.is-normal {
  border: 1px solid rgba(217, 119, 6, 0.24);
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.16);
}

.latency-result.is-slow,
.latency-result.is-error {
  background: #fef2f2;
  color: #b91c1c;
}

.notice-section {
  margin-top: 20px;
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: none;
}

.notice-copy {
  width: 100%;
  max-width: none;
}

.notice-copy p {
  margin-top: 10px;
  color: var(--text-color);
}

.notice-lines {
  margin-top: 12px;
}

.notice-lines p {
  margin-top: 0;
  margin-bottom: 16px;
  line-height: 1.85;
}

.notice-lines p:last-child {
  margin-bottom: 0;
}

.copyright {
  padding: 24px 0 10px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

.container {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  text-align: center;
}

.title {
  margin: 18px 0 10px;
  color: var(--text-dark);
  font-size: 22px;
  font-weight: 820;
}

.subtitle {
  margin-bottom: 20px;
  color: var(--text-color);
  font-size: 15px;
}

.steps {
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface-muted);
  text-align: left;
}

.steps img {
  width: 100%;
  height: auto;
  margin-bottom: 8px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-color);
  font-size: 14px;
}

.step:last-child {
  margin-bottom: 0;
}

.step-number {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-color);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.step-text {
  flex: 1;
}

.highlight {
  color: var(--primary-dark);
  font-weight: 800;
}

.url-box {
  margin: 18px 0 12px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text-dark);
  font-size: 14px;
  word-break: break-all;
}

.copy-btn,
.a-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 10px 0;
  padding: 0 16px;
  border: 1px solid var(--primary-color);
  border-radius: var(--radius);
  background: var(--primary-color);
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.copy-btn:active,
.a-btn:active {
  transform: translateY(1px);
}

.tip {
  color: var(--error-color);
  font-size: 14px;
}

.embedded-browser-page {
  min-height: 100vh;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef5f7;
}

.embedded-browser-page .highlight {
  color: var(--error-color);
}

.transition-container {
  width: min(620px, calc(100% - 32px));
  margin: 48px auto;
  padding: 28px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
}

.transition-container h3 {
  margin-bottom: 18px;
  color: var(--text-dark);
  font-size: 24px;
}

.transition-info {
  margin: 10px 0 18px;
  padding: 18px;
  border: 1px solid rgba(23, 107, 135, 0.14);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.transition-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text-dark);
  cursor: pointer;
  font-weight: 800;
  transition: border-color var(--transition), transform var(--transition);
}

.transition-title:hover {
  border-color: rgba(23, 107, 135, 0.38);
}

.transition-title:active {
  transform: scale(0.98);
}

.copy-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  opacity: 0.72;
}

.transition-info p {
  color: var(--text-light) !important;
  font-size: 14px;
}

.transition-timer {
  margin: 14px 0;
  color: var(--primary-dark);
  font-size: 28px;
  font-weight: 850;
}

.transition-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 5px;
  padding: 0 26px;
  border-radius: var(--radius);
  background: var(--primary-color);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
}

.transition-btn:hover {
  background: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

.transition-warning {
  margin: 18px 0 0;
  padding: 16px;
  border: 1px solid rgba(183, 121, 31, 0.24);
  border-left: 4px solid var(--accent-color);
  border-radius: var(--radius);
  background: #fffaf0;
  color: #705a23;
  text-align: left;
}

.transition-warning p {
  margin: 0 0 24px;
  line-height: 1.9;
}

.transition-warning p:last-child {
  margin-bottom: 0;
}

.transition-cancel {
  display: inline-flex;
  margin-top: 18px;
  color: var(--text-light);
  font-size: 14px;
}

.transition-cancel:hover {
  color: var(--primary-dark);
}

#copy-hint,
#access-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(300px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transition: opacity var(--transition);
  z-index: 1000;
}

#copy-hint {
  padding: 15px 18px;
  background: #14784f;
  color: #ffffff;
  box-shadow: var(--shadow);
  font-size: 14px;
}

#copy-hint.show {
  opacity: 1;
}

#access-hint {
  padding: 20px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-dark);
  box-shadow: var(--shadow);
  font-size: 14px;
}

#access-hint.show {
  opacity: 1;
  pointer-events: auto;
}

#access-hint .hint-content {
  margin-bottom: 15px;
  line-height: 1.5;
}

#access-hint .hint-btn {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary-color);
  color: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .domain {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .notice-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading p {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 24px, 1060px);
    padding-top: 16px;
  }

  .top-card {
    padding: 24px;
  }

  .top-card h2 {
    font-size: 30px;
  }

  .top-card p {
    font-size: 16px;
  }

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

  .domain-status {
    min-height: 0;
  }

  .notice-section {
    padding: 20px;
  }

  .link {
    width: 100%;
  }

  .transition-container {
    margin: 24px auto;
    padding: 22px;
  }
}

@media (max-width: 380px) {
  .top-card h2 {
    font-size: 28px;
  }
}
