@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --primary: #1a56db;
  --primary-dark: #1345b5;
  --primary-light: #ebf0ff;
  --accent: #0ea5e9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --success: #10b981;
  --warning: #f59e0b;
  --error-color: #ef4444;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--surface-2);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ─────────────────────────────── */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.container--wide {
  max-width: 1100px;
}

/* ── Top Nav ─────────────────────────────── */
.top-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.top-nav__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.top-nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
  letter-spacing: -0.3px;
}

.top-nav__brand-icon {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.top-nav__links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-nav__links a {
  display: block;
  padding: 6px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s;
}

.top-nav__links a:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

.top-nav__links a.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* ── Breadcrumb ─────────────────────────────── */
.breadcrumb {
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

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

.breadcrumb__sep {
  color: var(--border);
  font-size: 12px;
}

.breadcrumb__current {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Hero Header ─────────────────────────────── */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
  margin-bottom: 28px;
}

.page-hero--home {
  background: linear-gradient(135deg, #1a56db 0%, #0ea5e9 100%);
  color: white;
  border-bottom: none;
}

.page-hero__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.page-hero__title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  line-height: 1.25;
}

.page-hero--home .page-hero__title {
  font-size: 2.6rem;
}

.page-hero__subtitle {
  font-size: 1rem;
  opacity: 0.85;
  max-width: 520px;
  margin: 0 auto;
}

.page-hero--content .page-hero__title {
  color: var(--text-primary);
}

.page-hero--content .page-hero__subtitle {
  color: var(--text-secondary);
  opacity: 1;
}

/* ── Cards / Panels ─────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card__body {
  padding: 24px;
}

.card + .card {
  margin-top: 20px;
}

/* ── Search Section ─────────────────────────────── */
.search-card {
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

#ipInput {
  flex: 1;
  padding: 11px 14px;
  font-size: 15px;
  font-family: 'JetBrains Mono', monospace;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: all 0.2s;
  background: var(--surface-2);
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

#ipInput:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

#ipInput::placeholder {
  color: var(--text-muted);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

.btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Noto Sans SC', sans-serif;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--primary);
  color: white;
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,86,219,0.3);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--secondary {
  background: var(--surface-3);
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.btn--secondary:hover {
  background: var(--border);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn--outline:hover {
  background: var(--primary-light);
}

.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Loading ─────────────────────────────── */
.loading-card {
  display: none;
  margin-bottom: 20px;
}

.loading-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  color: var(--text-secondary);
  font-size: 14px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* ── Error ─────────────────────────────── */
.error-card {
  display: none;
  background: #fef2f2;
  border-color: #fecaca;
  margin-bottom: 20px;
}

.error-inner {
  padding: 14px 18px;
  color: #dc2626;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── IP Result Card ─────────────────────────────── */
.result-card {
  display: none;
  margin-bottom: 20px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.result-ip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge--public {
  background: #dcfce7;
  color: #15803d;
}

.badge--private {
  background: #fef9c3;
  color: #a16207;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
}

.info-item {
  background: var(--surface);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.15s;
}

.info-item:hover {
  background: var(--surface-2);
}

.info-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

.info-value--mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

.map-section {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.map-section__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.map-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.map-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.map-link-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ── Instructions Card ─────────────────────────────── */
.instruction-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.instruction-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.instruction-list__num {
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-box {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 13px;
  color: #78350f;
}

/* ── Section Headings ─────────────────────────────── */
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Content Pages ─────────────────────────────── */
.content-body {
  max-width: 780px;
}

.content-section {
  margin-bottom: 36px;
}

.content-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 14px 0 10px;
}

.content-section p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.8;
}

.content-section ul,
.content-section ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.content-section li {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.75;
}

.content-section a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.content-section a:hover {
  text-decoration: underline;
}

.content-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Feature Grid ─────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 16px 0;
}

.feature-item {
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.2s;
}

.feature-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.feature-item h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.feature-item p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Use Cases ─────────────────────────────── */
.use-cases {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.use-cases li {
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--primary);
  font-size: 14px;
  color: var(--text-secondary);
}

.use-cases strong {
  color: var(--primary);
}

/* ── Changelog ─────────────────────────────── */
.changelog-item {
  padding: 16px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
  margin-bottom: 14px;
}

.changelog-item h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

/* ── Disclaimer / Policy Notice ─────────────────────────────── */
.alert-box {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.7;
  margin: 16px 0;
}

.alert-box--warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #78350f;
}

.alert-box--info {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.alert-box ul {
  padding-left: 18px;
  margin: 0;
}

.alert-box li {
  color: inherit;
  margin-bottom: 4px;
}

/* ── Last Updated ─────────────────────────────── */
.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--surface-3);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ── Back Link ─────────────────────────────── */
.back-link {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Help Center ─────────────────────────────── */
.help-search {
  position: relative;
  margin-bottom: 28px;
}

.help-search input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  background: var(--surface);
}

.help-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.help-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.15s;
  gap: 12px;
}

.article-item:hover {
  background: var(--surface-3);
}

.article-item__title {
  font-size: 14px;
  font-weight: 500;
}

.article-item__meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.article-item__arrow {
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}

.category-card {
  margin-bottom: 20px;
}

.category-card__header {
  padding: 16px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-card__icon {
  font-size: 1.2rem;
}

.category-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.category-card__count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-3);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ── Contact Page ─────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-option {
  padding: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.contact-option:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.contact-option__icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.contact-option__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.contact-option__desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  background: var(--surface);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* ── Footer ─────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.footer__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 24px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 28px;
}

.footer__brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer__brand-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer__col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

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

.footer__bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer__copyright {
  font-size: 13px;
  color: var(--text-muted);
}

.footer__source {
  font-size: 13px;
  color: var(--text-muted);
}

.footer__source a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* ── Utility ─────────────────────────────── */
.main-content {
  flex: 1;
  padding: 24px 0 40px;
}

.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mb-28 { margin-bottom: 28px; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
  .page-hero--home .page-hero__title { font-size: 1.8rem; }
  .page-hero__title { font-size: 1.5rem; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .search-box { flex-direction: column; }
  .btn { width: 100%; }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .top-nav__links a { padding: 5px 10px; font-size: 13px; }
}
