/* styles.css */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0d001a;
  color: #e0e0ff;
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
}

/* پس‌زمینه متحرک اصلی */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e);
  background-size: 400% 400%;
  animation: gradient 18s ease infinite;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.particles, .detail-particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(0, 255, 255, 0.6);
  border-radius: 50%;
  box-shadow: 0 0 12px cyan;
  animation: float linear infinite;
}

@keyframes float {
  0%   { transform: translateY(100vh) scale(0.2); opacity: 0.1; }
  100% { transform: translateY(-30vh) scale(0.7); opacity: 0.8; }
}

header {
  text-align: center;
  padding: 60px 20px 40px;
}

h1 {
  font-size: 3.5rem;
  background: linear-gradient(90deg, #00ffff, #ff00ff, #00ff9d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px rgba(0,255,255,0.5);
  margin-bottom: 10px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.dns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.dns-card {
  background: rgba(20, 20, 60, 0.5);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: all 0.35s ease;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.dns-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 35px rgba(0,255,255,0.35);
}

.dns-card h2 {
  font-size: 1.65rem;
  margin-bottom: 10px;
  color: #a5d8ff;
}

/* ────────────────────────────────────────────── */
/* تم‌های صفحات جزئیات (همه اینجا تعریف شدن)   */
/* ────────────────────────────────────────────── */

.detail-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-size: 400% 400%;
  animation: gradient 16s ease infinite;
}

.detail-content {
  max-width: 900px;
  margin: 80px auto 60px;
  background: rgba(15, 10, 50, 0.72);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 0 50px rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  border: 2px solid;
  text-align: center;
}

.ip-box {
  background: rgba(0,0,0,0.45);
  border-radius: 12px;
  padding: 18px;
  margin: 18px 0;
  font-family: monospace;
  font-size: 1.25rem;
  border: 1.5px solid;
}

.ping-result {
  font-size: 2.6rem;
  font-weight: bold;
  margin: 12px 0 30px;
  text-shadow: 0 0 12px currentColor;
}

.green  { color: #00ff41; }
.yellow { color: #ffc107; }
.red    { color: #ff2d55; }

.btn-apply, .btn-back {
  display: inline-block;
  font-weight: bold;
  padding: 14px 38px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1.2rem;
  margin: 25px 12px;
  transition: all 0.3s;
}

.btn-apply {
  background: linear-gradient(45deg, #00ff9d, #00d4ff);
  color: #000;
  box-shadow: 0 0 20px rgba(0,255,157,0.5);
}

.btn-apply:hover {
  transform: scale(1.06);
  box-shadow: 0 0 35px rgba(0,255,157,0.8);
}

.btn-back {
  background: linear-gradient(45deg, #ff4d4d, #ff00aa);
  color: white;
  box-shadow: 0 0 20px rgba(255,77,77,0.5);
}

.btn-back:hover {
  transform: scale(1.06);
  box-shadow: 0 0 35px rgba(255,77,77,0.8);
}

/* تم‌های اختصاصی */

.theme-electro   .detail-bg     { background: linear-gradient(-45deg, #001133, #004466, #002b55); }
.theme-electro   .detail-content { border-color: #00aaff; }
.theme-electro   .ip-box         { border-color: #00aaff; }

.theme-shekan    .detail-bg     { background: linear-gradient(-45deg, #2a0033, #4d0066, #33004d); }
.theme-shekan    .detail-content { border-color: #cc00ff; }
.theme-shekan    .ip-box         { border-color: #cc00ff; }

.theme-radargame .detail-bg     { background: linear-gradient(-45deg, #002211, #004433, #003322); }
.theme-radargame .detail-content { border-color: #00ff88; }
.theme-radargame .ip-box         { border-color: #00ff88; }

.theme-shelter   .detail-bg     { background: linear-gradient(-45deg, #331100, #662200, #4d1a00); }
.theme-shelter   .detail-content { border-color: #ff8800; }
.theme-shelter   .ip-box         { border-color: #ff8800; }

.theme-begzar    .detail-bg     { background: linear-gradient(-45deg, #332200, #664400, #4d3300); }
.theme-begzar    .detail-content { border-color: #ffdd00; }
.theme-begzar    .ip-box         { border-color: #ffdd00; }

.theme-lagzero   .detail-bg     { background: linear-gradient(-45deg, #000033, #000066, #00004d); }
.theme-lagzero   .detail-content { border-color: #3366ff; }
.theme-lagzero   .ip-box         { border-color: #3366ff; }

.theme-lagslayer .detail-bg     { background: linear-gradient(-45deg, #330000, #660000, #4d0000); }
.theme-lagslayer .detail-content { border-color: #ff4444; }
.theme-lagslayer .ip-box         { border-color: #ff4444; }

.theme-dns403    .detail-bg     { background: linear-gradient(-45deg, #001a00, #003300, #002200); }
.theme-dns403    .detail-content { border-color: #44aa44; }
.theme-dns403    .ip-box         { border-color: #44aa44; }

.theme-hostiran  .detail-bg     { background: linear-gradient(-45deg, #1a0033, #330066, #22004d); }
.theme-hostiran  .detail-content { border-color: #aa44ff; }
.theme-hostiran  .ip-box         { border-color: #aa44ff; }

.theme-vanilla   .detail-bg     { background: linear-gradient(-45deg, #330022, #660044, #4d0033); }
.theme-vanilla   .detail-content { border-color: #ff99cc; }
.theme-vanilla   .ip-box         { border-color: #ff99cc; }