@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600&display=swap');

:root {
  --primary-orange: #d35400;
  --dark-gray: #333;
  --light-gray: #f4f4f4;
  --input-border: #d35400;
  --button-bg: #d35400;
  --button-text: #ffffff;
  --pill-success: #00c896;
  --pill-danger: #ff3860;
  --primary-blue: #0059FF;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  font-size: 18px;
  color: #333;
  font-weight: 400;
  transition: color 0.2s;
  min-width: 75px;
}

.nav-link .nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-link:hover {
  color: var(--primary-blue);
  /* or your brand color */
}



.hero-header {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 12px rgb(31 45 72 / 7%);
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 1200;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(16px) saturate(140%);
}

.nav-link.active {
  color: var(--primary-blue);
  font-weight: 400;
}

.page-hero {
  padding: 20px;
  text-align: center;
}

.page-hero h1 {
  font-size: 42px;
  font-weight: 600;
  margin: 0 0 8px;
}

.page-hero p {
  margin: 0 auto;
  max-width: 720px;
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

/* 透明桥接区：填补 toggle 与下拉菜单之间的空隙，避免鼠标移入时菜单消失 */
.nav-dropdown::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
  z-index: 199;
}

.nav-dropdown-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  user-select: none;
}

.nav-dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-top: 2px;
  transition: transform 0.2s;
}

.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown.open .nav-dropdown-toggle::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: auto;
  min-width: 170px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  z-index: 200;
  padding: 6px 0;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .nav-dropdown:hover .nav-dropdown-menu {
    display: block;
  }
}

.nav-dropdown-item {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: #333;
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.active {
  color: var(--primary-blue);
  background: #f0f7ff;
}

.nav-dropdown.active > .nav-dropdown-toggle {
  color: var(--primary-blue);
  font-weight: 400;
}

.header-wrapper {
  display: flex;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.site-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.detection-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  line-height: 1.35;
  color: #64748b;
  white-space: nowrap;
}

.detection-stats strong {
  color: #3794f8;
  font-weight: 600;
}

.detection-stats-today {
  font-size: 11px;
  color: #94a3b8;
}

.header-nav {
  display: flex;
  gap: 15px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-logo {
  height: 32px;
}

.search-bar {
  display: flex;
  align-items: center;
  max-width: 600px;
  margin: 2rem auto;
  background: #fff;
  border-radius: 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  padding: 0.25rem;
  /*border: 1px solid #c9d3ff;*/
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  color: #333;
  padding: 1rem 1.5rem;
  font-size: 16pt;
  border-radius: 40px 0 0 40px;
  min-width: 0;
}

.search-bar .primary-button {
  width: 88px;
  height: 55px;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  border-radius: 40px;
}

.search-bar .primary-button .icon {
  width: 18px;
  height: 18px;
  display: block;
}

/* 馃攣 General-purpose reusable button */
.primary-button {
  padding: 1rem 2rem;
  font-size: 14pt;
  background-color: var(--primary-blue);
  color: #fff;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.primary-button:hover {
  background-color: rgba(0, 47, 255, 0.82);
}

.button-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  /* space between spinner and text */
}



.search-bar button:hover {
  background-color: rgba(32, 73, 255, 0.882);
}

.search-bar input:-webkit-autofill {
  background-color: #fff !important;
  -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
  -webkit-text-fill-color: #000 !important;
  transition: background-color 5000s ease-in-out 0s;
}

.search-bar input:-webkit-autofill:focus {
  background-color: #fff !important;
}



html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  margin: 0;
  padding: 0;
  background: #f8f9fa;
  color: #333;
}

.result-box {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  padding: 0rem;
}

/* Make result table bigger and rounded */
.result-table {
  background: linear-gradient(180deg, #eef4ff 0%, #e8f0fe 100%);
  width: 100%;
  max-width: 1000px;
  min-width: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgb(0 0 0 / 8%);
}

/* Rounded corners on outer table */
.result-box table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  /*border: 1px solid #c9d3ff;*/
  border-radius: 0px;
  overflow: hidden;
  font-size: 1.1rem;
}


.result-box th {
  background-color: #f9f9f9;
  text-align: center;
  padding: 1rem;
  font-size: 1.1rem;
}

.result-box td {
  padding: 1rem;
  align-items: center;
  font-size: 1.05rem;
}

.ip-result-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  background: white;
  /* border: 1px solid #ddd; */
  border-radius: 18px;
  overflow: hidden;
  font-size: 14px;
}

/* Header */
.ip-result-table th {
  background-color: #f9f9f9;
  /* padding: 1rem; */
  text-align: center;
  font-size: 14px;
}


/* General cells — 统一 px，避免 rem + 手机自动放大导致各行大小不一 */
.ip-result-table td {
  font-size: 14px;
  padding: 1rem;
  line-height: 1.5;
}

.ip-result-table td a {
  font-size: inherit;
  color: var(--primary-blue);
}

.ip-result-table td:first-child {
  width: 25%;
  text-align: right;
  font-weight: 500;
  color: #333;
  
}

.ip-result-table td:last-child {
  width: 75%;
  text-align: left;
  align-items: center;
  color: #333;
}

.ip-result-table .country-loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.5;
}

.ip-result-table .country-flag {
  height: 1em;
  width: auto;
  flex-shrink: 0;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}

/* Alternating row colors */
.ip-result-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

.ip-result-table tbody tr:nth-child(even) {
  background-color: #f6f8ff;
  /* light blue (AliceBlue) */
}


.tooltip-container {
  position: relative;
  display: inline-block;
}

.info-icon {
  cursor: pointer;
  color: #2a74ff;
  font-size: 16px;
}



.tooltip-text {
  visibility: hidden;
  opacity: 0;
  background-color: #2978ffcf;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  position: absolute;
  bottom: 80%;
  left: 120%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 16px;
  width: 240px;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  transition: opacity 0.2s;
}

/* Show tooltip on hover/focus or tap */
.tooltip-container:hover .tooltip-text,
.tooltip-container:focus-within .tooltip-text,
.tooltip-container.active .tooltip-text {
  visibility: visible;
  opacity: 1;
}



footer {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin: 3rem 0 1rem;
}

.spinner {
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  width: 1em;
  height: 1em;
  margin-right: 0.5em;
  animation: spin 0.6s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}


@media (max-width: 600px) {
  .page-hero h1 {
    font-size: 32px;
  }

  .header-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }

  .nav-link {
    text-align: center;
    width: 100%;
  }

  .search-bar {
    border-radius: 100px;
    padding: 0.5rem;
  }

  .search-bar input {
    border-radius: 100px;
    font-size: 1rem;
    padding: 0.75rem;
  }

  .search-bar .primary-button {
    width: 88px;
    height: 55px;
  }



  .result-box {
    padding: 0rem;
  }

  .tooltip-text {
    visibility: hidden;
    opacity: 0;
    background-color: #2978ffcf;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    position: absolute;
    bottom: 0%;
    left: 0%;
    /* shift to the right of icon */
    transform: translateY(-50%);
    z-index: 10;
    font-size: 16px;
    width: 240px;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    transition: opacity 0.2s;
  }

  .ip-result-table td:first-child {
    width: 30%;
  }

  .ip-result-table td:last-child {
    width: 70%;
  }

  .result-box th,
  .result-box td,
  .ip-result-table th,
  .ip-result-table td,
  .ip-result-table td a {
    font-size: 14px;
  }

}
