/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d0f14;
  --surface:     #161b22;
  --surface-2:   #1e2530;
  --border:      #30363d;
  --accent:      #58a6ff;
  --accent-glow: rgba(88, 166, 255, 0.15);
  --green:       #3fb950;
  --text:        #e6edf3;
  --text-muted:  #8b949e;
  --mono:        'JetBrains Mono', 'Fira Code', monospace;
  --sans:        'Inter', system-ui, sans-serif;
  --radius:      12px;
  --radius-lg:   18px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 0 0 60px;
  background-image:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(88,166,255,0.08) 0%, transparent 70%);
}

/* ─── Header ────────────────────────────────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin-bottom: 48px;
  background: rgba(22, 27, 34, 0.7);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ─── Main layout ───────────────────────────────────────────────────────── */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Hero IP card ──────────────────────────────────────────────────────── */
.hero-card {
  background: linear-gradient(135deg, #1a2332 0%, #0f1923 100%);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  margin-bottom: 32px;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(88,166,255,0.1),
    0 8px 40px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(88,166,255,0.1);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -40px; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 80px;
  background: radial-gradient(ellipse, rgba(88,166,255,0.2), transparent 70%);
  pointer-events: none;
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-value {
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ─── Info grid ─────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* ─── Info card ─────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(88,166,255,0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(88,166,255,0.08);
}

.card-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
  line-height: 1;
}

.card-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.card-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ─── User agent card ───────────────────────────────────────────────────── */
.ua-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
}

.ua-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.ua-value {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--green);
  word-break: break-all;
  line-height: 1.7;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 40px 24px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .header-inner { flex-direction: column; text-align: center; gap: 4px; }
  .hero-card    { padding: 28px 24px; }
  .grid         { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
  .grid { grid-template-columns: 1fr; }
}

/* ─── Loading shimmer for detected values ───────────────────────────────── */
@keyframes shimmer {
  0%   { opacity: 0.4; }
  50%  { opacity: 1;   }
  100% { opacity: 0.4; }
}

#timezone, #screen-res, #conn-type, #cookies-status, #geo-line {
  /* Values populated by JS — subtle pulse until ready */
}
