@font-face {
  font-family: Cairo;
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/fonts/cairo-latin-variable.woff2') format('woff2');
}

@font-face {
  font-family: Cairo;
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url('/fonts/cairo-arabic-variable.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFC;
}

:root {
  color-scheme: light;
  font-family: Cairo, Tahoma, Arial, sans-serif;
  color: #132c29;
  background: #eef5f3;
  line-height: 1.5;
}

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

body {
  min-block-size: 100vh;
  min-block-size: 100dvh;
  margin: 0;
  padding: clamp(14px, 4vw, 40px);
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 72% 10%, #dcefeb, transparent 67%), #eef5f3;
}

.panel {
  inline-size: min(100%, 540px);
  padding: clamp(20px, 5vw, 38px);
  border: 1px solid #d8e7e3;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 20px 68px #163e3610, 0 3px 12px #163e3607;
}

h1 {
  margin: 0;
  font-size: clamp(1.875rem, 5vw, 2.625rem);
  font-weight: 850;
  line-height: 1.27;
}

.details { margin: clamp(20px, 4.5vw, 30px) 0 0; }
dt { color: #45615c; font-size: 0.9375rem; font-weight: 700; }
dd { margin: 0; }

.ip-box {
  padding: 14px clamp(12px, 4vw, 20px) 15px;
  border: 1px solid #d8eae5;
  border-radius: 16px;
  background: #f1f8f6;
}

.ip-box dd { text-align: center; margin-block-start: 5px; }

.ip {
  display: inline-block;
  max-inline-size: 100%;
  font-size: clamp(1.625rem, 5.6vw, 2.375rem);
  font-weight: 820;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}

.ip-long { font-size: clamp(1.0625rem, 3.8vw, 1.5rem); }
.unavailable { font-weight: 760; }

.country-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 14px;
  border-block-end: 1px solid #e3ebe8;
}

.country-row dt { flex-shrink: 0; }

.country-row dd {
  display: flex;
  align-items: center;
  gap: 10px;
  min-inline-size: 0;
  text-align: end;
  font-size: 1.125rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.country-flag {
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 0 1px #132c2926;
}

button {
  inline-size: 100%;
  min-block-size: 50px;
  margin-block-start: 18px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #086457;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button[hidden] { display: none; }
button:hover { background: #084f46; }
button:focus-visible { outline: 3px solid #14796b; outline-offset: 3px; }

.copy-icon {
  position: relative;
  flex: 0 0 17px;
  block-size: 17px;
}

.copy-icon::before, .copy-icon::after {
  content: '';
  position: absolute;
  inline-size: 11px;
  block-size: 12px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.copy-icon::before { inset: 0 auto auto 0; }
.copy-icon::after { inset: auto 0 0 auto; background: #086457; }
button:hover .copy-icon::after { background: #084f46; }

.copied .copy-icon::before {
  inset: 2px auto auto 4px;
  inline-size: 7px;
  block-size: 12px;
  border-width: 0 2px 2px 0;
  border-radius: 0;
  transform: rotate(45deg);
}

.copied .copy-icon::after { content: none; }

#copy-status { margin: 8px 0 0; color: #484f4d; font-size: 0.875rem; }
#copy-status:empty, .copied + #copy-status {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
