/* =============================================
   WhatIsMyIP — Premium Stylesheet v2
   ============================================= */

/* === CUSTOM PROPERTIES === */
:root {
  --primary:       #2563EB;
  --primary-dark:  #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-glow:  rgba(37,99,235,.18);
  --accent:        #10B981;
  --accent-dark:   #059669;
  --danger:        #EF4444;
  --warn:          #F59E0B;

  --bg:            #F8FAFC;
  --bg-card:       #FFFFFF;
  --bg-subtle:     #F1F5F9;
  --bg-code:       #F1F5F9;
  --border:        #E2E8F0;
  --border-focus:  #93C5FD;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 1px 4px rgba(0,0,0,.07), 0 2px 8px rgba(0,0,0,.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.13);
  --shadow-blue: 0 4px 20px rgba(37,99,235,.22);

  --text:       #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;

  --radius:    12px;
  --radius-sm: 7px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --nav-h:     64px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', monospace;

  --ease:      cubic-bezier(.4,0,.2,1);
  --transition: .2s var(--ease);
  --transition-slow: .35s var(--ease);
}

[data-theme="dark"] {
  --bg:            #0B1120;
  --bg-card:       #111827;
  --bg-subtle:     #1A2235;
  --bg-code:       #0B1120;
  --border:        #1E2D45;
  --border-focus:  #3B82F6;
  --primary-light: #1E3465;
  --primary-glow:  rgba(59,130,246,.25);

  --shadow:    0 1px 4px rgba(0,0,0,.5), 0 2px 8px rgba(0,0,0,.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.55);
  --shadow-blue: 0 4px 20px rgba(59,130,246,.25);

  --text:       #F0F6FF;
  --text-muted: #8BA0C0;
  --text-light: #4B6280;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background .3s var(--ease), color .3s var(--ease);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
input, textarea, select { font-family: var(--font); }

/* === LAYOUT === */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 72px 0; }
.section-sm { padding: 48px 0; }

/* === NAVIGATION === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background .3s;
}
[data-theme="dark"] .navbar {
  background: rgba(11,17,32,.88);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.2px;
}
.navbar-brand svg { color: var(--primary); flex-shrink: 0; }
.navbar-brand span { color: var(--text); }
.navbar-brand strong { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover { color: var(--primary); background: var(--primary-light); text-decoration: none; }
.nav-links a.active { color: var(--primary); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.theme-toggle:hover { background: var(--primary-light); color: var(--primary); border-color: var(--border-focus); }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }

.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  align-items: center; justify-content: center;
}
.hamburger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

.mobile-menu {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px 20px;
  box-shadow: var(--shadow-md);
  z-index: 199;
  flex-direction: column; gap: 2px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--text-muted); font-size: .95rem; font-weight: 500;
  padding: 10px 14px; border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.mobile-menu a:hover { color: var(--primary); background: var(--primary-light); text-decoration: none; }

/* === HERO === */
.hero {
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 45%, #7C3AED 100%);
  color: #fff;
  padding: 64px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(124,58,237,.35) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,255,255,.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -.6px;
  margin-bottom: 10px;
  line-height: 1.2;
}
.hero > .container > p {
  font-size: 1.05rem;
  opacity: .85;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-ip-display {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius-xl);
  padding: 24px 48px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.2);
  position: relative;
}
.hero-ip-label {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .7;
  margin-bottom: 6px;
  font-weight: 600;
}
.hero-ip-value {
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.5px;
  font-family: var(--mono);
  line-height: 1;
}
.hero-ip-value.skeleton {
  width: 240px; height: 52px;
  background: rgba(255,255,255,.18);
  border-radius: 10px;
  animation: shimmer-hero 1.8s ease-in-out infinite;
}
@keyframes shimmer-hero {
  0%,100% { opacity: .8; }
  50%      { opacity: .3; }
}

/* Copy IP button in hero */
.hero-copy-btn {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50px;
  padding: 7px 18px;
  color: rgba(255,255,255,.9);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  font-family: var(--font);
}
.hero-copy-btn:hover { background: rgba(255,255,255,.25); transform: translateY(-1px); }
.hero-copy-btn.copied { background: rgba(16,185,129,.3); border-color: rgba(16,185,129,.5); }

/* === SKELETON / SHIMMER === */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton {
  background: linear-gradient(90deg,
    var(--border) 25%,
    var(--bg-subtle) 50%,
    var(--border) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 6px;
  color: transparent !important;
  pointer-events: none;
  user-select: none;
}

/* === STATUS DOT === */
.status-dot {
  width: 9px; height: 9px; border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-online {
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(16,185,129,.5);
  animation: ping 2s ease-in-out infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0   rgba(16,185,129,.5); }
  70%  { box-shadow: 0 0 0 6px rgba(16,185,129,0);  }
  100% { box-shadow: 0 0 0 0   rgba(16,185,129,0);  }
}

/* === DASHBOARD GRID === */
.dashboard { padding: 56px 0; }
.section-header { margin-bottom: 36px; }
.section-header h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -.35px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-header p { color: var(--text-muted); margin-top: 6px; font-size: .97rem; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.ip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition-slow), transform var(--transition-slow), border-color var(--transition);
  position: relative;
  overflow: hidden;
}
.ip-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #7C3AED);
  opacity: 0;
  transition: opacity var(--transition);
}
.ip-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--border-focus);
}
.ip-card:hover::before { opacity: 1; }

.ip-card-label {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--text-light); margin-bottom: 10px;
}
.ip-card-label svg { color: var(--primary); opacity: .8; }
.ip-card-value {
  font-size: 1rem; font-weight: 700; color: var(--text);
  font-family: var(--mono); word-break: break-all;
  min-height: 1.5em; line-height: 1.4;
}
.ip-card-value.skeleton { width: 75%; height: 1.3em; margin-top: 2px; }

.copy-btn {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-light);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}
.copy-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--border-focus); transform: scale(1.1); }
.copy-btn.copied { background: #D1FAE5; color: var(--accent-dark); border-color: var(--accent); }

/* === MAP === */
.map-section { padding: 0 0 56px; }
.map-section h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -.3px; }
.map-section .map-meta { color: var(--text-muted); font-size: .9rem; margin-bottom: 16px; }
#ip-map {
  width: 100%; height: 380px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.map-fallback-box {
  width: 100%; min-height: 140px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; color: var(--text-muted); padding: 32px 20px;
}
.map-fallback-box p { margin: 0; font-size: .92rem; }

/* === LOOKUP SECTION === */
.lookup-section { padding: 0 0 56px; }
.lookup-section h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 6px; letter-spacing: -.3px; }
.lookup-section > p { color: var(--text-muted); margin-bottom: 20px; font-size: .95rem; }
.lookup-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.lookup-input {
  flex: 1; min-width: 220px;
  padding: 13px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text);
  font-size: .97rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.lookup-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.lookup-input::placeholder { color: var(--text-light); }

.lookup-result {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: none;
  animation: fadeIn .25s ease;
}
.lookup-result.visible { display: block; }
.lookup-result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 14px; }
.lookup-field { display: flex; flex-direction: column; gap: 3px; }
.lookup-field-label { font-size: .7rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .08em; }
.lookup-field-value { font-family: var(--mono); font-size: .93rem; color: var(--text); font-weight: 600; }

/* === RECENT LOOKUPS === */
.recent-section { padding: 0 0 56px; }
.recent-section h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 14px; letter-spacing: -.3px; }
.recent-list { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-tag {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: .85rem; font-weight: 600;
  color: var(--text-muted);
  font-family: var(--mono);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.recent-tag:hover { background: var(--primary-light); color: var(--primary); border-color: var(--border-focus); transform: translateY(-1px); }
.recent-empty { color: var(--text-muted); font-size: .9rem; }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  border: none; border-radius: var(--radius);
  font-size: .93rem; font-weight: 600; letter-spacing: -.1px;
  transition: background var(--transition), box-shadow var(--transition),
              transform var(--transition), color var(--transition);
  cursor: pointer; position: relative; overflow: hidden;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #1D4ED8 100%);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
  box-shadow: var(--shadow-blue);
  text-decoration: none; color: #fff;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: .84rem; border-radius: var(--radius-sm); }

/* === ADSENSE WRAPPERS === */
.ad-wrap {
  background: var(--bg-subtle);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  overflow: hidden; text-align: center;
}
.ad-banner { width: 100%; min-height: 90px; margin: 28px 0; }
.ad-leaderboard { width: 100%; max-width: 728px; min-height: 90px; margin: 28px auto; }

/* === INFO STRIP === */
.info-strip {
  background: linear-gradient(135deg, var(--primary-light), var(--bg-subtle));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.info-strip-item {
  display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 200px;
}
.info-strip-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.info-strip-text strong { display: block; font-size: .88rem; font-weight: 700; margin-bottom: 2px; }
.info-strip-text span { font-size: .82rem; color: var(--text-muted); line-height: 1.4; }

/* === CARDS (Blog) === */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition-slow), transform var(--transition-slow), border-color var(--transition);
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--border-focus); }
.card-tag {
  display: inline-block;
  background: var(--primary-light); color: var(--primary);
  font-size: .72rem; font-weight: 700;
  padding: 3px 10px; border-radius: 50px;
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: .09em;
}
.card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.45; letter-spacing: -.1px; }
.card p { color: var(--text-muted); font-size: .88rem; line-height: 1.65; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 6px; color: var(--text-light); font-size: .78rem; margin-top: 14px; }
.card-link { margin-top: 14px; font-weight: 700; font-size: .87rem; display: flex; align-items: center; gap: 4px; }
.card-link:hover { text-decoration: none; gap: 8px; }

/* === FAQ === */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item.open { border-color: var(--border-focus); }
.faq-q {
  width: 100%; text-align: left; padding: 18px 22px;
  background: none; border: none; color: var(--text);
  font-size: .97rem; font-weight: 600; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  transition: color var(--transition);
}
.faq-q:hover { color: var(--primary); }
.faq-icon {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700; flex-shrink: 0;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  line-height: 1;
}
.faq-item.open .faq-icon { background: var(--primary); color: #fff; transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden;
  padding: 0 22px;
  color: var(--text-muted); line-height: 1.75; font-size: .94rem;
  transition: max-height .3s var(--ease), padding .3s var(--ease);
}
.faq-item.open .faq-a { max-height: 500px; padding: 0 22px 20px; }

/* === BREADCRUMB === */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  color: var(--text-muted); font-size: .84rem; padding: 12px 0;
}
.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--primary); text-decoration: none; }
.breadcrumb-sep { color: var(--text-light); }

/* === PROSE === */
.prose { max-width: 740px; }
.prose h2 { font-size: 1.4rem; font-weight: 800; margin: 36px 0 14px; letter-spacing: -.35px; }
.prose h3 { font-size: 1.15rem; font-weight: 700; margin: 26px 0 10px; }
.prose p { margin-bottom: 16px; line-height: 1.8; color: var(--text); }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 16px; }
.prose li { margin-bottom: 6px; line-height: 1.75; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose strong { font-weight: 700; }
.prose a { color: var(--primary); font-weight: 500; }
.prose code { background: var(--bg-code); padding: 2px 7px; border-radius: 5px; font-family: var(--mono); font-size: .88em; }
.prose blockquote {
  border-left: 3px solid var(--primary); padding: 14px 20px;
  background: var(--primary-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0; font-style: italic;
}
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: .94rem; }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--bg-subtle); font-weight: 700; font-size: .87rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.prose tr:nth-child(even) td { background: var(--bg-subtle); }

/* === AUTHOR BOX === */
.author-box {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin: 32px 0;
}
.author-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #7C3AED);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.author-info h4 { font-size: .95rem; font-weight: 700; }
.author-info p { font-size: .84rem; color: var(--text-muted); margin-top: 3px; }

/* === CONTACT FORM === */
.contact-form { display: flex; flex-direction: column; gap: 16px; max-width: 600px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .85rem; font-weight: 600; color: var(--text); }
.form-input, .form-textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card); color: var(--text);
  font-size: .95rem; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-textarea { min-height: 140px; resize: vertical; }
.form-success {
  background: #D1FAE5; border: 1px solid var(--accent);
  color: #065F46; border-radius: var(--radius); padding: 16px 20px;
  font-weight: 600; display: none;
}
.form-success.visible { display: block; }

/* === PAGE HERO === */
.page-hero {
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 45%, #7C3AED 100%);
  color: #fff; padding: 48px 0 40px;
}
.page-hero h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -.45px; }
.page-hero p { opacity: .85; margin-top: 8px; font-size: .97rem; max-width: 640px; }

/* === BADGES === */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 50px;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em;
}
.badge-green  { background: #D1FAE5; color: #065F46; }
.badge-blue   { background: var(--primary-light); color: var(--primary); }
.badge-yellow { background: #FEF3C7; color: #92400E; }
.badge-red    { background: #FEE2E2; color: #991B1B; }
.card-tag.badge-red { background: #FEE2E2; color: #991B1B; }

/* === COOKIE CONSENT === */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 16px 24px;
  display: none;
  animation: slideUp .3s var(--ease);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
#cookie-banner.visible { display: flex; }
.cookie-inner {
  width: 100%; max-width: 1120px; margin: 0 auto;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.cookie-text { flex: 1; min-width: 240px; font-size: .85rem; color: var(--text-muted); }
.cookie-text a { color: var(--primary); font-weight: 500; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

/* === FOOTER === */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 52px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 44px;
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand p { font-size: .875rem; color: var(--text-muted); line-height: 1.65; max-width: 280px; }
.footer-col h4 {
  font-size: .75rem; font-weight: 700; margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: .1em; color: var(--text-light);
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col ul a {
  color: var(--text-muted); font-size: .9rem;
  transition: color var(--transition), padding-left var(--transition);
  display: inline-block;
}
.footer-col ul a:hover { color: var(--primary); text-decoration: none; padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; font-size: .83rem; color: var(--text-muted);
}
.footer-bottom a { color: var(--text-muted); transition: color var(--transition); }
.footer-bottom a:hover { color: var(--primary); text-decoration: none; }

/* === UTILITY === */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 16px; }
.font-mono { font-family: var(--mono); }
.text-muted { color: var(--text-muted); }
.text-small { font-size: .875rem; }
.divider { height: 1px; background: var(--border); margin: 36px 0; }
.alert { padding: 14px 18px; border-radius: var(--radius); border: 1px solid; font-size: .9rem; margin-bottom: 20px; }
.alert-info { background: var(--primary-light); border-color: var(--border-focus); color: var(--primary-dark); }
.highlight-box { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 20px 0; }

/* === PAGE LAYOUT === */
.page-content { padding: 48px 0; }
.page-layout { display: grid; grid-template-columns: 1fr 300px; gap: 52px; align-items: start; }
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.sidebar-widget h3 { font-size: .97rem; font-weight: 700; margin-bottom: 12px; }
.ipv6-section { padding: 0 0 48px; }
.ip-version-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.ip-tab {
  padding: 8px 20px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-card); color: var(--text-muted);
  font-weight: 600; font-size: .9rem; transition: all var(--transition);
}
.ip-tab.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.ip-tab:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* === ANIMATIONS === */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .4s var(--ease) both; }

/* === PRINT === */
@media print {
  .navbar, .footer, .ad-wrap, .ad-unit, #cookie-banner,
  .copy-btn, .lookup-section, .theme-toggle, .hamburger,
  .recent-section, .hero-copy-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .ip-card { border: 1px solid #ddd; box-shadow: none; page-break-inside: avoid; }
  .hero { background: #2563EB !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href]::after { content: " (" attr(href) ")"; font-size: .8em; }
  .container { max-width: 100%; }
}

/* === RESPONSIVE === */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-ip-display { padding: 20px 28px; }
  .hero { padding: 48px 0 44px; }
  .section { padding: 52px 0; }
  .lookup-form { flex-direction: column; }
  .cards-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .info-strip { flex-direction: column; gap: 16px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .cookie-inner { flex-direction: column; }
  .container { padding: 0 16px; }
  .hero-ip-value { font-size: 1.9rem; }
}
