:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text: #172033;
  --muted: #64748b;
  --border: #e2e8f0;
  --background: #f8fafc;
  --card: #ffffff;
  --success: #16a34a;
  --shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin: auto;
}

/* Header */

header {
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Hero */

.hero {
  padding: 65px 0 45px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0 auto 16px;
  max-width: 800px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -2px;
}

.hero-description {
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 18px;
}

/* IP Card */

.ip-card {
  max-width: 800px;
  margin: 35px auto 0;
  padding: 35px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.ip-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.ip-address {
  min-height: 65px;
  display: flex;
  justify-content: center;
  align-items: center;
  word-break: break-all;
  font-size: clamp(32px, 6vw, 52px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--primary);
}

.ip-version {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
}

button {
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

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

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

.btn-secondary {
  background: #eff6ff;
  color: var(--primary);
}

.btn-secondary:hover {
  background: #dbeafe;
}

/* Info Grid */

.section {
  padding: 45px 0;
}

.section-title {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: -0.8px;
}

.section-description {
  margin: 0 0 25px;
  color: var(--muted);
}

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

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.info-card-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
}

.info-card-value {
  font-size: 16px;
  font-weight: 700;
  word-break: break-word;
}

/* Status */

.status {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

/* Content */

.content {
  max-width: 850px;
}

.content h2 {
  margin-top: 35px;
  margin-bottom: 10px;
  font-size: 28px;
}

.content p {
  color: #475569;
}

/* FAQ */

.faq {
  max-width: 850px;
}

details {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 12px;
}

summary {
  cursor: pointer;
  font-weight: 700;
}

details p {
  margin: 14px 0 0;
  color: var(--muted);
}

/* Footer */

footer {
  margin-top: 40px;
  padding: 35px 0;
  background: #0f172a;
  color: #94a3b8;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

footer strong {
  color: white;
}

footer a {
  color: #cbd5e1;
}

/* Loading */

.loading {
  color: var(--muted);
  font-size: 40px;
}

/* Responsive */

@media (max-width: 800px) {
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .container {
    width: min(100% - 22px, 1100px);
  }

  .nav {
    min-height: 60px;
  }

  .hero {
    padding: 45px 0 30px;
  }

  .hero-description {
    font-size: 16px;
  }

  .ip-card {
    padding: 25px 18px;
  }

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

  .section {
    padding: 30px 0;
  }

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e2e8f0;
  backdrop-filter: blur(10px);
}

.site-header .container {
  width: min(1100px, calc(100% - 32px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */

.logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #172033;
  text-decoration: none;
  font-size: 19px;
  font-weight: 800;
  white-space: nowrap;
}

.logo:hover {
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

/* Search */

.header-search {
  flex: 1;
  max-width: 330px;
  margin-left: auto;
}

.header-search form {
  position: relative;
  width: 100%;
}

.header-search input {
  width: 100%;
  height: 42px;
  padding: 0 48px 0 15px;

  border: 1px solid #dbe3ee;
  border-radius: 10px;
  outline: none;

  background: #f8fafc;
  color: #172033;

  font-family: inherit;
  font-size: 14px;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.header-search input::placeholder {
  color: #94a3b8;
}

.header-search input:hover {
  background: #fff;
}

.header-search input:focus {
  background: #fff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 5px;

  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  transform: translateY(-50%);

  border: 0;
  border-radius: 7px;

  background: #2563eb;
  color: #fff;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.header-search button:hover {
  background: #1d4ed8;
}

.header-search button:active {
  transform: translateY(-50%) scale(0.96);
}

/* Navigation */

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-links a {
  color: #64748b;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #2563eb;
}

/* Accessibility */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Tablet */

@media (max-width: 900px) {
  .site-header .container {
    gap: 16px;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-links a:nth-child(3),
  .nav-links a:nth-child(4) {
    display: none;
  }

  .header-search {
    max-width: 280px;
  }
}

/* Mobile */

@media (max-width: 650px) {
  .site-header .container {
    min-height: 64px;
    width: min(100% - 22px, 1100px);
    gap: 12px;
  }

  .logo span:last-child {
    display: none;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
  }

  .header-search {
    flex: 1;
    max-width: none;
    margin-left: 0;
  }

  .header-search input {
    height: 40px;
  }

  .nav-links {
    display: none;
  }
}

/* Small phones */

@media (max-width: 380px) {
  .site-header .container {
    gap: 8px;
  }

  .header-search input {
    font-size: 13px;
    padding-left: 12px;
  }

  .header-search input::placeholder {
    font-size: 12px;
  }

  .header-search button {
    width: 32px;
    height: 32px;
  }
}

button.submit > svg {
  position: absolute;
}

.error {
  color: red;
  font-size: 2rem;
}
