/* ============================================
   SHOW-IP — Cyberpunk / Neon Digital Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700;900&display=swap');

:root {
  --bg-deep:      #070b14;
  --bg-panel:     #0d1526;
  --bg-card:      #0f1928;
  --bg-card-hover:#132040;
  --neon-cyan:    #00e5ff;
  --neon-blue:    #2979ff;
  --neon-purple:  #a855f7;
  --neon-green:   #00ff88;
  --neon-red:     #ff4444;
  --text-primary: #e8f0ff;
  --text-secondary:#8a9dc4;
  --text-muted:   #4a5e84;
  --border-dim:   rgba(0, 229, 255, 0.1);
  --border-glow:  rgba(0, 229, 255, 0.35);
  --card-radius:  16px;
  --glow-sm: 0 0 12px rgba(0, 229, 255, 0.25);
  --glow-md: 0 0 24px rgba(0, 229, 255, 0.35), 0 0 48px rgba(0, 229, 255, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 100, 255, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(168, 85, 247, 0.07) 0%, transparent 60%);
  font-family: 'Vazirmatn', sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

.container { max-width: 1000px; position: relative; z-index: 1; }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(7, 11, 20, 0.9);
  border-bottom: 1px solid var(--border-dim);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 0;
}
.site-header::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--neon-cyan) 50%, transparent 100%);
  opacity: 0.4;
}
.brand { text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 0 8px var(--neon-cyan)) brightness(1.2); }
.brand-title { font-weight: 900; font-size: 1.05rem; color: #fff; }
.brand-subtitle { font-size: 0.73rem; color: var(--text-secondary); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.btn-neon {
  font-size: 0.8rem; padding: 5px 14px; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--neon-cyan); border: 1px solid var(--border-glow);
  transition: all 0.2s; text-decoration: none; font-family: 'Vazirmatn', sans-serif;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-neon:hover { background: rgba(0,229,255,0.1); box-shadow: var(--glow-sm); color: #fff; }
.btn-neon-alt {
  font-size: 0.8rem; padding: 5px 14px; border-radius: 8px; cursor: pointer;
  background: rgba(41, 121, 255, 0.12); color: var(--neon-blue); border: 1px solid rgba(41, 121, 255, 0.3);
  transition: all 0.2s; text-decoration: none; font-family: 'Vazirmatn', sans-serif;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-neon-alt:hover { background: rgba(41,121,255,0.22); box-shadow: 0 0 16px rgba(41,121,255,0.3); color: #fff; }

/* HERO */
.hero { text-align: center; padding: 44px 24px 32px; position: relative; }
.hero-title {
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw + 0.8rem, 2.5rem);
  color: #fff; line-height: 1.2; margin-bottom: 12px;
  text-shadow: 0 0 40px rgba(0, 229, 255, 0.25);
}
.hero-title .ti { color: var(--neon-cyan); animation: pulse-icon 3s ease-in-out infinite; display: inline-block; margin-left: 10px; }
@keyframes pulse-icon {
  0%,100% { filter: drop-shadow(0 0 6px var(--neon-cyan)); }
  50% { filter: drop-shadow(0 0 18px var(--neon-cyan)) drop-shadow(0 0 36px var(--neon-blue)); }
}
.hero-subtitle { color: var(--text-secondary); font-size: 0.93rem; max-width: 540px; margin: 0 auto; line-height: 1.75; }

/* IP BADGE */
.ip-section { display: flex; justify-content: center; margin: 28px 0; }
.ip-badge-wrapper {
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, rgba(0,229,255,0.05), rgba(41,121,255,0.05));
  border: 1px solid var(--border-glow); border-radius: 60px;
  padding: 14px 28px;
  box-shadow: var(--glow-md), inset 0 1px 0 rgba(255,255,255,0.04);
  animation: badge-in 0.6s ease-out both;
}
@keyframes badge-in {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ip-badge-icon {
  width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  background: rgba(0,229,255,0.1); border: 1px solid var(--border-glow); border-radius: 50%;
  color: var(--neon-cyan); font-size: 1rem; flex-shrink: 0;
}
.ip-badge-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 3px; }
.ip-badge-value {
  font-size: 1.4rem; font-weight: 900; color: #fff; letter-spacing: 1.5px;
  direction: ltr; text-shadow: 0 0 20px rgba(0,229,255,0.5);
}
.ip-copy-btn {
  background: rgba(0,229,255,0.06); border: 1px solid var(--border-dim);
  color: var(--text-secondary); width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-size: 0.85rem; transition: all 0.2s; flex-shrink: 0;
}
.ip-copy-btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); box-shadow: var(--glow-sm); }

/* CARDS */
.card {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: var(--card-radius); overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  animation: card-in 0.5s ease-out both;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-glow); box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--glow-sm); }
@keyframes card-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.col-lg-6:nth-child(2) .card { animation-delay: 0.1s; }

.card-header {
  background: linear-gradient(135deg, rgba(0,229,255,0.07), rgba(41,121,255,0.05));
  border-bottom: 1px solid var(--border-dim);
  padding: 13px 20px; display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 0.9rem; color: var(--text-primary); position: relative;
}
.card-header::before {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-blue));
}
[dir="rtl"] .card-header::before { right: auto; left: 0; }
.card-header i { color: var(--neon-cyan); font-size: 0.88rem; }
.card-body { padding: 20px; }

/* INFO LIST */
.info-list { list-style: none; padding: 0; }
.info-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.04); gap: 12px;
}
.info-list li:last-child { border-bottom: none; }
.info-label { color: var(--text-secondary); font-size: 0.83rem; font-weight: 500; flex-shrink: 0; }
.info-value { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); text-align: left; direction: ltr; }

/* THREAT GRID */
.section-sep { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; }
.section-sep-line { flex: 1; height: 1px; background: var(--border-dim); }
.section-sep-label { font-size: 0.8rem; font-weight: 700; color: var(--text-secondary); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.section-sep-label i { color: var(--neon-purple); }

.threat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.threat-item {
  background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 11px 13px; display: flex; align-items: center; gap: 10px;
  transition: all 0.2s;
}
.threat-item:hover { border-color: var(--border-dim); background: rgba(255,255,255,0.04); }
.threat-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; position: relative; }
.threat-dot.safe { background: var(--neon-green); box-shadow: 0 0 8px var(--neon-green); }
.threat-dot.safe::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: var(--neon-green); opacity: 0.2; animation: pulse-dot 2s ease-in-out infinite;
}
.threat-dot.danger { background: var(--neon-red); box-shadow: 0 0 8px var(--neon-red); }
.threat-dot.danger::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: var(--neon-red); opacity: 0.25; animation: pulse-dot 1.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { transform: scale(1); opacity: 0.25; }
  50% { transform: scale(1.7); opacity: 0.08; }
}
.threat-info { flex: 1; }
.threat-text { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.3; }
.threat-status { font-size: 0.73rem; font-weight: 700; margin-top: 2px; }
.threat-status.safe { color: var(--neon-green); }
.threat-status.danger { color: var(--neon-red); }

/* MAP */
.map-shell {
  margin-top: 20px; border-radius: 13px; overflow: hidden;
  border: 1px solid var(--border-dim); position: relative;
}
.map-shell::after {
  content: ''; position: absolute; inset: 0; border-radius: 13px;
  border: 1px solid rgba(0,229,255,0.2); pointer-events: none; z-index: 400;
}
.map-container { height: 270px; }

/* RAW JSON */
.raw-details { margin-top: 18px; }
.raw-toggle {
  cursor: pointer; font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
  background: rgba(255,255,255,0.03); border: 1px solid var(--border-dim);
  border-radius: 10px; padding: 8px 14px; list-style: none;
  display: flex; align-items: center; gap: 8px; transition: all 0.2s; width: 100%;
}
.raw-toggle:hover { color: var(--neon-cyan); border-color: var(--border-glow); }
.raw-toggle i { color: var(--neon-cyan); }
.raw-json {
  background: #050a14; color: #5de0f7; border-radius: 12px; padding: 14px;
  margin-top: 8px; overflow: auto; max-height: 320px;
  font-size: 0.8rem; font-family: 'Courier New', monospace; direction: ltr;
  border: 1px solid var(--border-dim); line-height: 1.6;
}

/* CALCULATOR */
.calc-card { animation-delay: 0.2s; }
.calc-card .card-body { padding: 24px; }
.form-group { margin-bottom: 0; }
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; display: block; }
.form-control {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; color: var(--text-primary); padding: 10px 14px;
  font-family: 'Vazirmatn', sans-serif; font-size: 0.9rem; transition: all 0.2s; width: 100%;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
  outline: none; background: rgba(0,229,255,0.04); border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0,229,255,0.1), var(--glow-sm); color: var(--text-primary);
}
.btn-calc {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: #000; font-weight: 800; font-size: 0.88rem; padding: 10px 26px;
  border: none; border-radius: 10px; cursor: pointer; transition: all 0.25s;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Vazirmatn', sans-serif; box-shadow: 0 4px 16px rgba(0,229,255,0.25);
}
.btn-calc:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,229,255,0.45); }
.btn-calc:active { transform: translateY(0); }

.calc-table { width: 100%; border-collapse: collapse; }
.calc-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); transition: background 0.15s; }
.calc-table tbody tr:last-child { border-bottom: none; }
.calc-table tbody tr:hover { background: rgba(0,229,255,0.04); }
.calc-table th { color: var(--text-secondary); font-weight: 600; font-size: 0.82rem; padding: 10px 14px; width: 45%; text-align: right; }
.calc-table td { color: var(--text-primary); font-weight: 800; font-size: 0.87rem; padding: 10px 14px; direction: ltr; text-align: left; }

/* ALERTS */
.alert { border-radius: 12px; padding: 13px 18px; border: 1px solid; font-size: 0.88rem; margin-bottom: 14px; }
.alert-danger { background: rgba(255,68,68,0.07); border-color: rgba(255,68,68,0.28); color: #ff8888; }
.alert-warning { background: rgba(255,180,0,0.07); border-color: rgba(255,180,0,0.28); color: #ffcc55; }

/* SPINNER */
.spinner-border { color: var(--neon-cyan); width: 28px; height: 28px; border-width: 3px; display: inline-block; margin: 8px; }

/* FOOTER */
.footer {
  text-align: center; padding: 28px 0 20px; color: var(--text-muted);
  font-size: 0.8rem; border-top: 1px solid var(--border-dim); margin-top: 48px; position: relative;
}
.footer::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100px; height: 1px; background: var(--neon-cyan); opacity: 0.35;
}
.footer a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--neon-cyan); }

/* COPY TOAST */
.copy-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0,229,255,0.12); border: 1px solid var(--border-glow);
  color: var(--neon-cyan); padding: 10px 24px; border-radius: 50px;
  font-size: 0.83rem; font-weight: 700; backdrop-filter: blur(12px);
  box-shadow: var(--glow-md); opacity: 0; transition: all 0.3s;
  z-index: 9999; pointer-events: none;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: rgba(0,229,255,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,229,255,0.4); }

/* LEAFLET DARK */
.leaflet-container { background: var(--bg-deep) !important; font-family: 'Vazirmatn', sans-serif; }
.leaflet-popup-content-wrapper {
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border-glow); border-radius: 10px; box-shadow: var(--glow-sm);
}
.leaflet-popup-tip { background: var(--bg-card); }

/* RESPONSIVE */
@media (max-width: 576px) {
  .map-container { height: 220px; }
  .ip-badge-value { font-size: 1.1rem; }
  .threat-grid { grid-template-columns: 1fr; }
  .hero { padding: 30px 16px 22px; }
  .card-body { padding: 16px; }
  .calc-card .card-body { padding: 16px; }
  .header-actions { display: none; }
}
