/* Reset & Base — ظریف و تمیز */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background: #0a0a1a;
  color: #e0e0ff;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Particles Background */
#particles-js {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at center, #1a1a3a 0%, #000 70%);
}

/* Typography — کهکشانی و زیبا */
h1, h2, h3 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
}

.glitch {
  font-size: 4.5rem;
  background: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: glitch 4s infinite;
}

@keyframes glitch {
  0%,100% { text-shadow: 0.05em 0 0 #f0f, -0.05em 0 0 #0ff; }
  15% { text-shadow: -0.05em -0.025em 0 #f0f, 0.025em 0.05em #0ff; }
  50% { text-shadow: 0.05em 0.035em 0 #f0f, -0.05em -0.05em #0ff; }
}

/* Layout — ریسپانسیو و ظریف */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header — نئونی و ثابت */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10,10,30,0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,255,255,0.2);
  z-index: 1000;
  padding: 20px 0;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(90deg, #00ffff, #ff00ff);
  -webkit-background-clip: text;
  color: transparent;
}

nav a {
  color: #e0e0ff;
  text-decoration: none;
  margin: 0 15px;
  font-weight: 500;
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  background: #00ffff;
  transition: width 0.4s;
  transform: translateX(-50%);
}

nav a:hover::after {
  width: 100%;
}

/* Buttons — نئونی و ظریف */
.btn-neon, .btn-primary, .btn-ghost {
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.4s;
  margin: 10px;
}

.btn-neon {
  background: linear-gradient(45deg, #ff00ff, #00ffff);
  color: white;
  box-shadow: 0 0 30px rgba(0,255,255,0.6);
}

.btn-ghost {
  border: 2px solid #00ffff;
  color: #00ffff;
  background: transparent;
}

.btn-ghost:hover {
  background: #00ffff;
  color: #000;
}

/* Hero — کهکشانی */
.hero {
  text-align: center;
  padding: 180px 20px 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subtitle {
  font-size: 1.5rem;
  margin: 20px 0 40px;
  opacity: 0.9;
}

/* Features & Grid — ریسپانسیو */
.features {
  padding: 100px 20px;
  text-align: center;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 60px;
  background: linear-gradient(90deg, #00ffff, #ff00ff);
  -webkit-background-clip: text;
  color: transparent;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background: rgba(20,20,50,0.6);
  padding: 40px 20px;
  border-radius: 20px;
  border: 1px solid rgba(0,255,255,0.3);
  transition: all 0.4s;
}

.glow-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 0 50px rgba(0,255,255,0.4);
}

/* Profile Page — کهکشانی و ظریف */
.profile-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.profile-card {
  background: rgba(20,20,60,.7);
  padding: 2.5rem 1.8rem;
  border-radius: 30px;
  border: 1px solid rgba(0,255,255,.3);
  backdrop-filter: blur(20px);
  text-align: center;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.8);
}

.avatar-glow {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #00ffff;
  box-shadow: 0 0 40px rgba(0,255,255,0.6);
}

.avatar-ring {
  position: absolute;
  inset: -12px;
  border: 2px solid #00ffff;
  border-radius: 50%;
  animation: spin 12s linear infinite;
  opacity: 0.4;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.username {
  font-size: 2.4rem;
  margin: 1rem 0;
  background: linear-gradient(45deg, #00ffff, #ff00ff);
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(0,255,255,0.8);
}

.bio {
  font-size: 1.3rem;
  margin: 1.2rem 0;
  line-height: 1.6;
  opacity: 0.95;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.link-btn {
  padding: 1rem 1.5rem;
  border-radius: 50px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(0,255,255,0.6);
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s;
}

.link-btn:hover {
  background: rgba(0,255,255,0.25);
  transform: translateY(-5px);
  box-shadow: 0 0 40px #00ffff;
}

.stats {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  opacity: 0.8;
}

.powered-by {
  margin-top: 2rem;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Dashboard — ظریف و موبایل‌پسند */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 6rem 1rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.editor-panel, .preview-panel {
  position: sticky;
  top: 6rem;
}

.mobile-frame {
  max-width: 380px;
  margin: 1.5rem auto;
  border: 10px solid #000;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

#previewFrame {
  width: 100%;
  height: 600px;
  border: none;
}

/* تم‌ها — کوچیک و ظریف */
.themes-grid-mobile {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 1rem;
}

.theme-card {
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.3s;
}

.theme-card.active {
  border-color: #00ffff;
  box-shadow: 0 0 30px rgba(0,255,255,0.7);
}

.theme-thumb video {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 14px;
}

.theme-overlay {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #00ffff;
}

/* گالری آواتار — ظریف */
.avatar-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 1rem;
  padding: 0.8rem;
  background: rgba(0,255,255,0.05);
  border-radius: 14px;
}

.avatar-gallery img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.avatar-gallery img:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px #00ffff;
}

/* ریسپانسیو موبایل — ظریف و کم اسکرول */
@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 6rem 1rem 3rem;
  }

  .card {
    padding: 1.2rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .form-group input, .form-group textarea {
    font-size: 1rem;
    padding: 0.9rem;
  }

  .themes-grid-mobile {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .theme-thumb video {
    height: 80px;
  }

  .mobile-frame {
    max-width: 340px;
    border-width: 10px;
    border-radius: 38px;
  }

  #previewFrame {
    height: 650px;
  }
}

@media (max-width: 480px) {
  .themes-grid-mobile {
    gap: 8px;
  }

  .theme-thumb video {
    height: 70px;
  }

  .avatar-preview {
    width: 90px;
    height: 90px;
  }

  .mobile-frame {
    max-width: 320px;
    border-width: 8px;
  }
}
