@font-face {
  font-family: "Vazirmatn";
  src: url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn[wght].woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #0b0711;
  --bg-2: #130a22;
  --surface: #12061e;
  --text: #e7e7ea;
  --muted: #9aa0a6;
  --primary: #7c2ae8; /* بنفش */
  --primary-2: #4e007c; /* بنفش تیره شبیه نسخهٔ قبلی */
  --accent: #00d1ff; /* آبی روشن */
  --outline: rgba(255,255,255,0.1);
  --success: #19c37d;
  --danger: #ff5d5d;
  --radius: 16px;
  --shadow-1: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-2: 0 6px 16px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body {
  padding: 0;
  margin: 0;
  /* گرادینت متحرک آرام با لایه‌های بنفش/آبی تیره */
  background: radial-gradient(1200px 800px at 10% 0%, #1b0a2e 0%, var(--bg) 60%),
              radial-gradient(800px 600px at 90% 0%, #001b2b 0%, transparent 60%),
              radial-gradient(900px 700px at 50% 100%, #12092a 0%, transparent 60%),
              linear-gradient(180deg, #0b0711, #0b0711);
  color: var(--text);
  font-family: Vazirmatn, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  background-size: 140% 140%;
  animation: bgMove 24s ease-in-out infinite alternate;
}

@keyframes bgMove {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 20%; }
  100% { background-position: 40% 100%; }
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* Simple layout */
.simple { padding: 24px 0 32px; min-height: 100vh; display: grid; place-items: center; }
.simple-inner { display: grid; gap: 18px; justify-items: center; text-align: center; width: min(880px, 94%); }
.title { font-size: clamp(22px, 3.5vw, 38px); margin: 0; }
.subtitle { max-width: 780px; color: #cdd0d5; margin: 0; line-height: 1.9; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Buttons */
.btn {
  --h: 52px;
  position: relative;
  height: var(--h);
  padding: 0 20px 0 22px;
  border-radius: calc(var(--h) / 2 + 10px);
  border: 0;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
  will-change: transform;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:hover { filter: brightness(1.05); }
.btn:active { animation: jelly 420ms cubic-bezier(.2, .6, 0, 1); }

.bubble {
  background: radial-gradient(120% 120% at 10% 10%, rgba(0,209,255,.28) 0%, rgba(0,209,255,0) 40%),
              radial-gradient(120% 120% at 90% 10%, rgba(124,42,232,.28) 0%, rgba(124,42,232,0) 35%),
              linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 24px rgba(124,42,232,.35), inset 0 -2px 8px rgba(0,0,0,.35);
}
.bubble.primary {
  background: radial-gradient(120% 120% at 10% 10%, rgba(0,209,255,.35) 0%, rgba(0,209,255,0) 40%),
              radial-gradient(120% 120% at 90% 10%, rgba(124,42,232,.35) 0%, rgba(124,42,232,0) 35%),
              linear-gradient(135deg, #00b6ff, #006cbe);
  box-shadow: 0 12px 24px rgba(0,182,255,.35), inset 0 -2px 8px rgba(0,0,0,.35);
}

/* حذف انیمیشن قبلی و افزودن ژله هنگام کلیک */
@keyframes jelly {
  0% { transform: scale(1); }
  25% { transform: scale(0.96, 1.06); }
  50% { transform: scale(1.06, 0.96); }
  75% { transform: scale(0.98, 1.02); }
  100% { transform: scale(1); }
}

.file-name {
  min-height: 26px;
  color: #9bd6ff;
}

/* Cards */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.0));
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow-1);
  animation: cardSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card.slim { max-width: 680px; }

/* Offline block */
/* (حذف بلاک آفلاین) */
.progress-wrap {
  background: rgba(255,255,255,0.06);
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0 8px;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #7cf3ff);
  width: 0%;
  transition: width .2s ease;
}
.status-text {
  color: #e9e9ee;
  font-size: 14px;
}
.actions-row { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Footer note */
.footer-note { margin-top: 16px; color: #bdbfc6; font-size: 13px; }

/* Preview image (non-clickable) */
.preview-wrap { margin: 8px 0 6px; }
.preview-img {
  max-width: 520px;
  width: min(100%, 520px);
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Responsive */
@media (max-width: 880px) { .card.slim { width: 100%; } }

/* Tutorial Section */
.tutorial-section {
  width: 100%;
  max-width: 920px;
  margin: 32px auto 24px;
  padding: 28px 24px;
  background: linear-gradient(145deg, rgba(124, 42, 232, 0.08), rgba(0, 209, 255, 0.05));
  border: 1px solid rgba(124, 42, 232, 0.25);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.tutorial-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 30%, rgba(124, 42, 232, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(0, 209, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
  animation: tutorialGlow 8s ease-in-out infinite alternate;
}

@keyframes tutorialGlow {
  0% { opacity: 0.5; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

.tutorial-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
  position: relative;
}

.tutorial-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(124, 42, 232, 0.4);
  position: relative;
}

.tutorial-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0.3;
  animation: pulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.15); opacity: 0; }
}

.tutorial-icon svg {
  width: 26px;
  height: 26px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.tutorial-title {
  font-size: clamp(20px, 3vw, 28px);
  margin: 0;
  font-weight: 700;
  background: linear-gradient(135deg, #00d1ff, #7c2ae8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(124, 42, 232, 0.5);
}

.tutorial-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
  position: relative;
}

.tutorial-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.tutorial-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 42, 232, 0.1), rgba(0, 209, 255, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tutorial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 20px rgba(124, 42, 232, 0.3);
  border-color: rgba(124, 42, 232, 0.5);
}

.tutorial-card:hover::before {
  opacity: 1;
}

.tutorial-card-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

.video-card .tutorial-card-icon {
  background: linear-gradient(135deg, #ff0844, #ff4667);
  box-shadow: 0 8px 16px rgba(255, 8, 68, 0.3);
}

.download-card .tutorial-card-icon {
  background: linear-gradient(135deg, #00b6ff, #006cbe);
  box-shadow: 0 8px 16px rgba(0, 182, 255, 0.3);
}

.tutorial-card-icon svg {
  width: 28px;
  height: 28px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.tutorial-card-content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.tutorial-card-content h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.tutorial-card-content p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: #b5b9c3;
}

.tutorial-card-badge {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 209, 255, 0.15);
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.tutorial-card-badge svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.tutorial-steps {
  display: grid;
  gap: 14px;
  position: relative;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
}

.step-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px 0 0 12px;
}

.step-item:hover {
  background: rgba(124, 42, 232, 0.08);
  border-color: rgba(124, 42, 232, 0.3);
}

.step-item:hover::before {
  opacity: 1;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-radius: 50%;
  font-weight: 700;
  font-size: 18px;
  color: white;
  box-shadow: 0 6px 16px rgba(124, 42, 232, 0.4);
}

.step-content {
  flex: 1;
  padding-top: 2px;
}

.step-content h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.step-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #b5b9c3;
}

@media (max-width: 768px) {
  .tutorial-section {
    padding: 20px 16px;
    margin: 24px auto 20px;
  }

  .tutorial-header {
    margin-bottom: 20px;
  }

  .tutorial-icon {
    width: 42px;
    height: 42px;
  }

  .tutorial-icon svg {
    width: 22px;
    height: 22px;
  }

  .tutorial-title {
    font-size: 20px;
  }

  .tutorial-cards {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }

  .tutorial-card {
    padding: 16px;
    gap: 12px;
  }

  .tutorial-card-icon {
    width: 48px;
    height: 48px;
  }

  .tutorial-card-icon svg {
    width: 24px;
    height: 24px;
  }

  .tutorial-card-content h3 {
    font-size: 15px;
  }

  .tutorial-card-content p {
    font-size: 12px;
  }

  .step-item {
    padding: 14px 16px;
    gap: 12px;
  }

  .step-number {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .step-content h4 {
    font-size: 15px;
  }

  .step-content p {
    font-size: 13px;
  }
}
