:root {
  --bg: #0a0e17;
  --surface: #111827;
  --surface-2: #1a2235;
  --border: #1e293b;
  --border-light: #2a3a52;
  --text: #e2e8f0;
  --text-muted: #7a8ba8;
  --text-dim: #4a5a72;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.15);
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.12);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.12);
  --yellow: #fbbf24;
  --yellow-dim: rgba(251, 191, 36, 0.12);
  --ad-bg: #0d1220;
  --ad-border: #1a2540;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 22px;
  color: var(--accent);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* ── LAYOUT ── */
.main-layout {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 32px;
  padding-top: 32px;
}

/* ── AD SPACES ── */
.ad-tower {
  position: sticky;
  top: 24px;
  align-self: start;
}

.ad-slot {
  background: var(--ad-bg);
  border: 1px dashed var(--ad-border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ad-tower-slot {
  width: 160px;
  height: 600px;
}

.ad-slot-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.ad-slot-size {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--border-light);
}

.ad-banner-wrapper { margin: 32px 0; }

.ad-banner-inner {
  background: var(--ad-bg);
  border: 1px dashed var(--ad-border);
  border-radius: 8px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ── CENTER CONTENT ── */
.center-content { min-width: 0; }

/* ── HERO IP DISPLAY ── */
.ip-hero {
  text-align: center;
  padding: 48px 0 40px;
}

.ip-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.ip-address {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #38bdf8, #7dd3fc, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: brightness(1.15);
}

.ip-loading {
  font-size: 32px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--text-dim), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: loadPulse 1.5s ease-in-out infinite;
}

@keyframes loadPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.ip-address .separator { color: var(--accent); }

.ip-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 24px;
}

.ip-copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.ip-copy-btn.copied {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
}

.ipv6-row {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 8px;
}

.ipv6-row span { color: var(--text-muted); }

/* ── STATUS BADGES ── */
.status-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.status-badge.clean {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.status-badge.warning {
  background: var(--yellow-dim);
  color: var(--yellow);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-badge.alert {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* ── REVERSE DNS ── */
.rdns-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
  text-align: center;
}

.rdns-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.rdns-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: var(--accent);
  word-break: break-all;
}

/* ── INFO CARDS GRID ── */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 0.2s;
}

.info-card:hover { border-color: var(--border-light); }

.info-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.info-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.info-card-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child { border-bottom: none; }

.info-row-label {
  font-size: 13px;
  color: var(--text-dim);
}

.info-row-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-all;
}

.info-row-value.highlight { color: var(--accent); }
.info-row-value.good { color: var(--green); }
.info-row-value.warn { color: var(--yellow); }
.info-row-value.bad { color: var(--red); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  font-size: 13px;
  color: var(--text-dim);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
}

footer a:hover { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .ad-tower { display: none; }
  .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 12px; }
  .ip-hero { padding: 32px 0 28px; }
  footer { flex-direction: column; gap: 12px; text-align: center; }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.ip-hero { animation: fadeUp 0.5s ease-out; }
.rdns-block { animation: fadeUp 0.5s ease-out 0.1s both; }
.info-grid { animation: fadeUp 0.5s ease-out 0.15s both; }
