/* ==========================================================================
   IPCheck.io - Modern Light & Colorful Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Colorful Brand Palette */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #eef2ff;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
  --warm-gradient: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --hero-glow: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, rgba(217, 70, 239, 0.08) 40%, rgba(255, 255, 255, 0) 70%);

  /* Status Colors */
  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --info: #0ea5e9;
  --info-light: #f0f9ff;
  --purple: #a855f7;
  --purple-light: #faf5ff;

  /* Surfaces & Backgrounds */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.85);
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --border-light: #e2e8f0;
  --border-focus: #818cf8;

  /* Typography */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(99, 102, 241, 0.12), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 35px -5px rgba(99, 102, 241, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 20px -2px rgba(99, 102, 241, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  color: var(--primary-hover);
}

/* ================= Navbar ================= */
.navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem 1.5rem;
  transition: var(--transition);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-main);
  text-decoration: none;
}

.brand-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.brand-logo span.dot-badge {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* ================= Buttons ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-outline {
  background: white;
  border: 1px solid var(--border-light);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.btn-success:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.9rem 1.8rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* ================= Container & Layout ================= */
.main-wrapper {
  flex: 1;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ================= Hero Section ================= */
.hero-section {
  position: relative;
  text-align: center;
  padding: 3.5rem 1rem 3rem;
  background: var(--hero-glow);
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--primary);
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.pill-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.hero-title .gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.25rem;
  line-height: 1.6;
}

/* ================= Live Search Bar ================= */
.search-container {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid #e0e7ff;
  border-radius: var(--radius-lg);
  padding: 0.5rem 0.65rem 0.5rem 1.25rem;
  box-shadow: var(--shadow-xl);
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), var(--shadow-xl);
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  font-weight: 500;
}

.search-box input::placeholder {
  color: var(--text-light);
}

.search-presets {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.search-preset-btn {
  background: white;
  border: 1px solid var(--border-light);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  transition: var(--transition);
}

.search-preset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ================= Cards & Grids ================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* ================= Stat Cards ================= */
.stat-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.indigo { background: #eef2ff; color: #6366f1; }
.stat-icon.emerald { background: #ecfdf5; color: #10b981; }
.stat-icon.rose { background: #fef2f2; color: #ef4444; }
.stat-icon.amber { background: #fffbeb; color: #f59e0b; }
.stat-icon.purple { background: #faf5ff; color: #a855f7; }

.stat-info {
  flex: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ================= Risk Badges & Threat Indicators ================= */
.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.risk-badge.risk-low {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.risk-badge.risk-medium {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.risk-badge.risk-high {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.risk-badge.risk-critical {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
  animation: pulseRisk 2s infinite;
}

@keyframes pulseRisk {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-blue { background: #eff6ff; color: #1d4ed8; }
.tag-green { background: #ecfdf5; color: #047857; }
.tag-red { background: #fef2f2; color: #b91c1c; }
.tag-amber { background: #fffbeb; color: #b45309; }
.tag-purple { background: #faf5ff; color: #7e22ce; }

/* ================= Risk Meter Gauge ================= */
.risk-meter-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  text-align: center;
}

.risk-score-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
  box-shadow: var(--shadow-md);
  margin-bottom: 0.75rem;
  position: relative;
}

.risk-score-num {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
}

.risk-score-max {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 600;
}

/* ================= Intelligence Data List ================= */
.intel-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.intel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.intel-label {
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.intel-value {
  font-weight: 600;
  color: var(--text-main);
  text-align: right;
  font-family: var(--font-sans);
}

.intel-value.mono {
  font-family: var(--font-mono);
}

/* ================= Pricing Packages ================= */
.pricing-card {
  background: white;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-xl);
  transform: scale(1.03);
}

.pricing-card .popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-gradient);
  color: white;
  padding: 0.3rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--text-main);
  margin: 1rem 0;
  line-height: 1;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: 1.75rem 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pricing-features li {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pricing-features li .check-icon {
  color: var(--success);
  font-weight: bold;
}

/* ================= Code Snippet Box ================= */
.code-box {
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.code-header {
  background: #1e293b;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
}

.code-tabs {
  display: flex;
  gap: 0.5rem;
}

.code-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.code-tab-btn.active, .code-tab-btn:hover {
  background: #334155;
  color: #f8fafc;
}

.code-pre {
  padding: 1.25rem;
  margin: 0;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-x: auto;
  max-height: 380px;
}

.copy-btn {
  background: #334155;
  color: #f8fafc;
  border: none;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.copy-btn:hover {
  background: var(--primary);
}

/* ================= Tables ================= */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
}

.table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
}

.table tr:hover td {
  background: #f8fafc;
}

/* ================= Forms ================= */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-main);
  background: white;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ================= Alerts & Toasts ================= */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-danger { background: #fef2f2; border: 1px solid #fecdd3; color: #991b1b; }
.alert-info { background: #f0f9ff; border: 1px solid #bae6fd; color: #075985; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

.toast-box {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 9999;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.toast-box.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================= Footer ================= */
.footer {
  background: white;
  border-top: 1px solid var(--border-light);
  padding: 3rem 1.5rem 2rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 340px;
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-col h5 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ================= Responsive ================= */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.3rem; }
  .pricing-card.featured { transform: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.9rem; }
  .hero-subtitle { font-size: 1rem; }
  .search-box { flex-direction: column; gap: 0.75rem; padding: 0.75rem; }
  .search-box input { width: 100%; text-align: center; }
  .footer-links { flex-direction: column; gap: 1.5rem; }
}
