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

:root {
  --bg-primary: #030712;
  --bg-secondary: #0d1117;
  --bg-card: #0f1923;
  --bg-card-hover: #131f2e;
  --border: rgba(0, 212, 255, 0.12);
  --border-bright: rgba(0, 212, 255, 0.35);
  --cyan: #00d4ff;
  --cyan-dim: rgba(0, 212, 255, 0.15);
  --purple: #7c3aed;
  --purple-bright: #a855f7;
  --green: #00ff9d;
  --red: #ff4757;
  --text-primary: #e2e8f0;
  --text-secondary: #8892a4;
  --text-muted: #4a5568;
  --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.4);
  --glow-purple: 0 0 20px rgba(168, 85, 247, 0.4);
}

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

html { scroll-behavior: smooth; }

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

/* ─── ANIMATED BACKGROUND ─── */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 0;
  pointer-events: none;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.bg-orb-1 {
  width: 600px; height: 600px;
  background: rgba(0, 212, 255, 0.06);
  top: -200px; left: -200px;
  animation: orbFloat1 15s ease-in-out infinite;
}
.bg-orb-2 {
  width: 500px; height: 500px;
  background: rgba(124, 58, 237, 0.07);
  bottom: -150px; right: -150px;
  animation: orbFloat2 18s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(60px, 40px); }
}
@keyframes orbFloat2 {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(-50px, -30px); }
}

/* ─── HEADER / NAV ─── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--cyan), var(--purple-bright));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-cyan);
}

.logo-icon svg { width: 20px; height: 20px; color: white; }

.logo-text {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--purple-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

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

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan);
  background: var(--cyan-dim);
  border-color: var(--border-bright);
}

.nav-links a svg { width: 16px; height: 16px; }

/* ─── PAGE WRAPPER ─── */
.page {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ─── HERO ─── */
.hero {
  text-align: center;
  margin-bottom: 56px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--cyan-dim);
  border: 1px solid var(--border-bright);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 16px;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple-bright) 60%, #ff6b9d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── IP CARDS ─── */
.ip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

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

.ip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}

.ip-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple-bright));
  opacity: 0;
  transition: opacity 0.3s;
}

.ip-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,212,255,0.08);
}

.ip-card:hover::before { opacity: 1; }

.ip-card-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ip-card-label .badge {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
}

.badge-v4 { background: rgba(0,212,255,0.15); color: var(--cyan); }
.badge-v6 { background: rgba(168,85,247,0.15); color: var(--purple-bright); }

.ip-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
  margin-bottom: 10px;
}

.ip-value.loading { color: var(--text-muted); }

.ip-actions {
  display: flex;
  gap: 6px;
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-copy:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}

.btn-copy svg { width: 12px; height: 12px; }

/* ─── INFO GRID ─── */
.info-section {
  margin-bottom: 32px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s;
}

.info-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
}

.info-card-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.info-card-icon svg { width: 18px; height: 18px; }

.icon-cyan { background: rgba(0,212,255,0.12); color: var(--cyan); }
.icon-purple { background: rgba(168,85,247,0.12); color: var(--purple-bright); }
.icon-green { background: rgba(0,255,157,0.12); color: var(--green); }
.icon-orange { background: rgba(251,146,60,0.12); color: #fb923c; }
.icon-red { background: rgba(255,71,87,0.12); color: var(--red); }

.info-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.info-card-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

.info-card-value.loading {
  background: linear-gradient(90deg, #1a2332, #243040, #1a2332);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  color: transparent;
  user-select: none;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── MAP ─── */
.map-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 32px;
}

.map-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.map-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-header-left svg { width: 18px; height: 18px; color: var(--cyan); }

.map-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.map-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.map-accuracy {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.map-accuracy .dot-green {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
}

#map {
  height: 380px;
  width: 100%;
}

/* Leaflet dark override */
.leaflet-container { background: #0d1117; }
.leaflet-tile { filter: brightness(0.7) saturate(0.5) hue-rotate(180deg) invert(1); }

/* ─── VPN PROMO ─── */
.promo-banner {
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(0,212,255,0.08));
  border: 1px solid rgba(124,58,237,0.3);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.promo-text h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.promo-text p { font-size: 14px; color: var(--text-secondary); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--cyan), var(--purple-bright));
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,212,255,0.3);
}

/* ─── ARTICLES PAGE ─── */
.article-hero {
  text-align: center;
  margin-bottom: 64px;
  padding-top: 20px;
}

.article-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.article-hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 56px;
}

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

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.article-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.article-thumb {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.article-thumb-security {
  background: linear-gradient(135deg, #0a1628, #0d2040);
}

.article-thumb-vpn {
  background: linear-gradient(135deg, #12062a, #1a0a3d);
}

.article-thumb svg {
  width: 80px; height: 80px;
  opacity: 0.6;
}

.article-thumb-security svg { color: var(--cyan); }
.article-thumb-vpn svg { color: var(--purple-bright); }

.article-tag {
  position: absolute;
  top: 16px; left: 16px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-security { background: rgba(0,212,255,0.2); color: var(--cyan); }
.tag-vpn { background: rgba(168,85,247,0.2); color: var(--purple-bright); }

.article-body { padding: 24px; }

.article-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
  color: var(--text-primary);
}

.article-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 600;
}

/* ─── FULL ARTICLE ─── */
.article-full {
  max-width: 800px;
  margin: 0 auto;
}

.article-full-header {
  margin-bottom: 48px;
}

.article-full-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.article-full h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.article-full-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.article-content h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--cyan);
}

.article-content p {
  font-size: 16px;
  line-height: 1.85;
  color: #94a3b8;
  margin-bottom: 20px;
}

.article-content ul, .article-content ol {
  margin: 0 0 20px 24px;
}

.article-content li {
  font-size: 16px;
  line-height: 1.8;
  color: #94a3b8;
  margin-bottom: 8px;
}

.article-content strong { color: var(--text-primary); font-weight: 600; }

.article-highlight {
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(124,58,237,0.08));
  border: 1px solid var(--border-bright);
  border-left: 3px solid var(--cyan);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 28px 0;
}

.article-highlight p { margin: 0; color: var(--text-secondary); }

/* ─── VPN PAGE ─── */
.vpn-hero {
  text-align: center;
  margin-bottom: 56px;
  padding-top: 20px;
}

.vpn-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.vpn-hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

.vpn-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.vpn-stat { text-align: center; }
.vpn-stat-number {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--purple-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.vpn-stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.vpn-cards {
  display: grid;
  gap: 20px;
  margin-bottom: 48px;
}

.vpn-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.vpn-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  opacity: 0;
  transition: opacity 0.3s;
}

.vpn-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.vpn-card:hover::before { opacity: 1; }

.vpn-card.rank-1::before { background: linear-gradient(180deg, #ffd700, #ffaa00); }
.vpn-card.rank-2::before { background: linear-gradient(180deg, #c0c0c0, #a0a0a0); }
.vpn-card.rank-3::before { background: linear-gradient(180deg, #cd7f32, #a05020); }
.vpn-card.rank-4::before, .vpn-card.rank-5::before { background: linear-gradient(180deg, var(--cyan), var(--purple-bright)); }

.vpn-rank {
  font-size: 28px;
  font-weight: 900;
  min-width: 48px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

.rank-gold { color: #ffd700; }
.rank-silver { color: #c0c0c0; }
.rank-bronze { color: #cd7f32; }
.rank-other { color: var(--text-muted); }

.vpn-logo {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.vpn-info { flex: 1; }

.vpn-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.vpn-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.vpn-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vpn-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
}

.vpn-score {
  text-align: right;
  flex-shrink: 0;
}

.score-number {
  font-size: 28px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}

.score-label { font-size: 11px; color: var(--text-muted); }

.score-nord { color: #4299e1; }
.score-express { color: #f6993f; }
.score-surf { color: #00c4b4; }
.score-proton { color: #6d4aff; }
.score-cyber { color: #ffd700; }

@media (max-width: 640px) {
  .vpn-card { flex-wrap: wrap; }
  .vpn-score { display: none; }
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  position: relative;
  z-index: 1;
}

footer a { color: var(--cyan); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--cyan);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--glow-cyan);
}

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