/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Vazirmatn', sans-serif;
}

:root {
  --galaxy-purple: #a449f8;
  --galaxy-lavender: #E6E6FA;
  --galaxy-pink: #f879b8;
  --cosmic-gold: #FFD700;
  --accent-red: #FF355E;
  --sidebar-width: 340px;
  --card-radius: 16px;
  --text-dark: #2c2c2c;
  --text-light: #f8f8f8;
}

body {
  background: linear-gradient(135deg, var(--galaxy-lavender) 0%, var(--galaxy-purple) 40%, var(--galaxy-pink) 100%);
  background-attachment: fixed;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ensure responsive scaling */
html {
  font-size: 100%;
}

@media (max-width: 768px) {
  html {
    font-size: 90%;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 85%;
  }
}

/* Header */
.main-header {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  border-bottom: 3px solid var(--cosmic-gold);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
}

.logo {
  display: inline-block;
  max-width: 110px;
  height: auto;
  margin-right: 10px;
}

.logo img {
  width: 100%;
  height: auto;
}

.logo:hover {
  transform: scale(1.05);
}

/* Navigation */

.nav-links, .auth-buttons {
  display: flex;
  gap: 0.5rem;
  align-items:center;
  list-style: none;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.menu-toggle i {
  font-size: 1.5rem;
  color: #333; /* طوسی ملایم */
}



@media (max-width: 768px) {
  .main-nav {
    flex-wrap: wrap;
    position: relative;
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 10px 20px;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }

  .nav-links li {
    margin: 10px 0;
  }

  .nav-links.show {
    display: flex;
  }

  .auth-buttons {
    flex-direction: row;
    gap: 10px;
    margin-top: 10px;
  }
  .dropdown-menu {
    position: absolute;
    top: 100%; /* درست زیر منوی مادر */
    right: 0;
    min-width: unset;
    display: none;
    z-index: 1000; /* حتماً بالاتر از nav و سایر محتوا */
    width: 180px;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 0;
  }

  .dropdown:hover .dropdown-menu {
    display: block;
  }

  .dropdown-menu li {
    padding: 6px 15px;
    text-align: right;
  }
}


.nav-links li {
  position: relative;
  margin: 15px;
}

.nav-links a {
  color: #333;
  text-decoration: none;
  padding: 10px 15px;
  font-weight: 500;
  transition: all 0.3s;
}

.nav-links a:hover {
  color: var(--accent-red);
}

.dropdown-menu {
  display: none;
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  min-width: 200px;
  list-style: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dropdown:hover .dropdown-menu {
  display: block;
}

/* Auth Buttons */
.auth-buttons {
  display: flex;
  gap: 15px;
}
/* افکت Hover خاص برای دکمه "ورود" */
.login-btn:hover {
  color: white;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

/* افکت Hover خاص برای دکمه "ثبت‌نام" */
.register-btn:hover {
 background-image: linear-gradient(to left, #FFD700, #FF355E);
  color: #0a0a0a;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}
.login-btn, .register-btn, .profile-btn {
  padding: 8px 20px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s;
}

.login-btn {
  background: transparent;
  border: 2px solid var(--cosmic-gold);
  color: #0a0a0a;
}

.register-btn {
  background: linear-gradient(to right, var(--cosmic-gold), var(--accent-red));
  color: white;
  border: none;
}

.profile-btn {
  background: rgba(255, 255, 255, 0.3);
  color: #0a0a0a;
  display: inline-flex;    /* تا بتونی با align-items وسطش کنی */
  align-items: center;     /* عمودی وسط‌چین */
  justify-content: center;
}

/* Content */
.main-content {
  flex: 1;
  padding: 40px 40px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

/* Hero Section */
.hero-section {
  padding: 80px 0;
}

.hero-section h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #333;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(to right, var(--cosmic-gold), var(--accent-red));
  color: white;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 30px;
  box-shadow: 0 4px 15px rgba(255, 53, 94, 0.3);
  transition: all 0.3s;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 53, 94, 0.4);
}

.cta-button.filled {
  background-color: orange;
  color: white;
  padding: 15px 40px;
  border-radius: 30px;
  font-size: 18px;
  transition: 0.3s;
  text-decoration: none;
}

.cta-button.filled:hover {
  background-color: darkorange;
}

/* Benefit Section */
.benefits-section {
  padding: 50px 0;
  text-align: center;
}

.benefits-grid-three {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-top: 60px;
}

.benefit-card {
  position: relative;
  background: #fff;
  padding: 70px 20px 30px;
  border-radius: 20px;
  flex: 1 1 clamp(280px, 28%, 320px);
  max-width: 320px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  overflow: visible;
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.benefit-icon {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--cosmic-gold);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.benefit-card h3 {
  font-size: 1.2rem;
  margin-bottom: 25px;
  color: #2c3e50;
  padding-bottom: 10px;
  border-bottom: 2px solid #7c7c7c; /* خط با رنگ خاکستری روشن */
    display: inline-block; /* خط فقط زیر متن نمایش داده شود */

}

.benefit-card p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
}
 .benefits-section h2 {
  margin-bottom: 20px;
  font-size: 2.5rem;
  text-align: center;
}


/* Sections */
.intro-section, .pinyin-section, .benefits-section {
  padding: 10px;
  text-align: justify;
  color: #0a0a0a;
}

.intro-section h1{
  margin-bottom: 20px;
  font-size: 40px;
  text-align: right;
}

/* Centered Button */
.centered-button {
  text-align: center;
  margin-top: 50px;
}

/* Flag Image */
.china-flag {
  display: block;
  max-width: 100%;
  margin: 40px auto;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.china-write {
  max-width: 100%;    /* جلوگیری از بیرون زدن در موبایل */
  display: block;     /* برای وسط‌چین کردن */
  margin: 20px auto;  /* فاصله از متن اطراف */
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.starttxt {
  text-align: center;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .starttxt {
    text-align: justify;   /* وسط‌چین در موبایل */
    font-size: 1rem;      /* خواناتر در صفحه کوچک */
    padding: 0 10px;      /* کمی فاصله از لبه‌ها */
  }
}

/* Background Decorations */
.stars, .dragon-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.stars {
  background: radial-gradient(circle at center, transparent 60%, rgba(255, 105, 180, 0.3) 100%);
}

.dragon-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.5;
}

/* Typography */
p {
  font-size: 1.2rem;
  line-height: 2;
  color: #0a0a0a;
}
/* فوتر */
/* استایل اصلی فوتر */
.main-footer {
background: linear-gradient(to right, transparent, rgba(255, 215, 0, 0.2), transparent);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
border-top: 3px solid var(--cosmic-gold);
color: #333;
font-size: 1.1rem; /* افزایش اندازه فونت */
margin-top: auto;
padding: 0.5rem 0 !important;
margin: 0 !important;
}

.footer-container {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: flex-start;
gap: 4rem;
padding: 0.6rem 0.2rem;
max-width: 900px;
margin: 0 auto;
direction: rtl;
}

.footer-section {
flex: 1 1 45%;
text-align: right;
}

/* متن معرفی */
.footer-text {
text-align: justify;
line-height: 1.7;
margin-bottom: 10px; /* 👈 کمتر از قبل */
}

/* تماس */
.footer-contact {
text-align: right;
line-height: 1.4;
}

.contact-details {
margin-bottom: 10px;
font-size: 1.1rem; /* افزایش اندازه فونت */
}

/* آیکن‌ها */
.social-icon {
display: inline-block;
margin-top: 6px;
margin-left: 10px;
font-size: 1.4rem;
color: #0088cc;
transition: transform 0.3s ease;
}

.social-icon:hover {
transform: scale(1.2);
}

/* پاراگراف‌ها */
.main-footer p {
margin: 0 0 10px 0;
padding: 0;
line-height: 1.5;
}

@media (max-width: 768px) {
.footer-container {
flex-direction: column;
align-items: stretch;
gap: 1.5rem;
padding: 1rem;
text-align: center;
}

.footer-section {
flex: 1 1 100%;
width: 100%;
text-align: center;
}

.footer-text,
.footer-contact {
text-align: center;
}
}

.faq-section {
  padding: 2rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  direction: rtl;
  font-family: 'Vazirmatn', sans-serif; 
}

.faq-section h2 {
  text-align: center;
  font-size: 2rem;
  color: #0a0a0a;
  margin-bottom: 2rem;
}

.faq-item {
  max-width: 800px;
  margin: 1rem auto;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(114, 0, 27, 0.4);
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.faq-question {
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 500;
  color: #0a0a0a;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: #FF355E; /* طلایی در هاور */
}
.faq-question i {
  margin-left: 0.6%;
  font-size: 1.4rem;
  color: #FFD700; /* رنگ طلایی ستاره */
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.8), 0 0 12px rgba(255, 215, 0, 0.5);
}


.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.4rem;
  font-size: 0.95rem;
  color: #0a0a0a;
  line-height: 1.7;
  text-align: right;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0.2rem 1rem 1rem;
}
/* تنظیم کلی box-sizing برای همه عناصر */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* کانتینر کلی */
.profile-container {
  display: flex;
  height: auto;
  max-height: 100%;
}

.profile-sidebar {
  width: clamp(300px, 24vw, 400px);  /* پهن‌تر از قبل */
  align-self: flex-start;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex-shrink: 0;
}

/* هدر پروفایل */
.profile-header {
  text-align: center;
  margin-bottom: 0;
}

/* عکس پروفایل */
.profile-picture {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--cosmic-gold);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
  margin: 0 auto 15px auto;
  display: block;
}

/* نام کاربر */
.profile-name {
  font-size: 1.6rem;
  color: #0a0a0a;
  margin-bottom: 5px;
  word-break: break-word;
}

/* ایمیل کاربر */
.profile-email {
  font-size: 0.9rem;
  color: #0a0a0a;
  opacity: 0.7;
  word-break: break-word;
}

/* منوی سایدبار */

.profile-menu {
  overflow: visible; /* حذف اسکرول */
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.profile-menu li {
  position: relative;
  overflow: hidden;
}

/* لینک‌های منو */
.profile-menu a {
  min-height: 40px; /* ارتفاع حداقل برای هر گزینه */
  line-height: 1.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px ;
  width: 100%; /* عرض کامل سایدبار */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #2c2c2c;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}


.profile-menu a i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  color:#FFD700 ;
  transition: color 0.3s ease;
  flex-shrink: 0;
}
/* حالت هاور و آیتم فعال */
.profile-menu a:hover,
.profile-menu a.active {
  background: linear-gradient(
    45deg,
    var(--galaxy-purple),
    var(--galaxy-pink)
  );
  box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
  color: white;
}

.profile-menu a:hover i {
  color: white;
}

/* افکت ویژه روی آیتم منو */
.profile-menu li::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
  border-radius: 12px;
}

.profile-menu li:hover::before {
  left: 100%;
}

/* محتوای اصلی (چپ) */
.main-content {
  flex: 1;
  padding: 20px;
  
}

/* بخش راهنمای یادگیری */
.learning-guide {
  background: #ffffff;
  border-right: 4px solid var(--cosmic-gold);
  border-radius: var(--card-radius, 16px);
  padding: 20px;
  margin-bottom: 30px;
}
.learning-guide h2{
  color: #0a0a0a;
}

/* بخش دوره‌ها */
.courses-section {
  background: #ffffff;
  border-right: 4px solid var(--cosmic-gold);
  border-radius: var(--card-radius, 16px);
  padding: 20px;
  color: #0a0a0a;
}
.courses-section1 {
  /* حذف بک‌گراند */
  background: none !important;
  backdrop-filter: none !important;
  padding: 20px 0;
  margin-bottom: 30px;
}
/* اضافه کردن خط فقط زیر عنوان */
.courses-section1 h2 {
  position: relative;
  color: #0a0a0a;
  padding-bottom: 15px;
  margin-bottom: 30px;
}

/* ایجاد خط طلایی زیر عنوان */
.courses-section1 h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: #ffbd44;
}
.courses-container {
  display: flex; /* چیدمان سطری */
  flex-wrap: wrap; /* امکان رفتن به خط جدید */
  justify-content: center; /* این مهمه */
  gap: 20px; /* فاصله بین کارتها */
}

/* کارت دوره */
.course-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1; /* انعطاف‌پذیری برای پر کردن فضا */
  min-width: 300px; /* حداقل عرض برای کارت */
  max-width: calc(50% - 10px); /* حداکثر عرض برای دو کارت در یک ردیف */
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* تصویر دوره - اصلاح شده */
.course-image {
  width: 100%;
  height: 220px; /* افزایش ارتفاع برای نمایش بهتر */
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
}
/* جزئیات دوره */
.course-details {
  flex: 1;
}

/* عنوان دوره */
.course-title {
  margin: 0 0 7px 0;
  color: var(--accent-red);
  font-size: 1.3rem;
  min-height: 3rem; /* ثابت نگه داشتن ارتفاع */
}
/* پیشرفت دوره */
.course-progress {
  margin-top: 15px;
}
.course-desc {
  font-size: 1rem;
  margin-bottom: 10px;
}
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
}

.btn-success {
  background: #28a745;
  color: white;
  border: none;
}

.btn-success:hover {
  background: #218838;
}

.btn-primary {
  background: #007bff;
  color: white;
  border: none;
}

.btn-primary:hover {
  background: #0069d9;
}


/* پر شدن نوار پیشرفت */
.progress-fill {
  height: 100%;
  background: linear-gradient(
    to right,
    var(--galaxy-purple),
    var(--accent-red)
  );
  border-radius: 10px 0 0 10px;
  transition: width 0.5s ease;
}

 .progress-container {
      width: 100%;
      background-color: #f1f1f1;
      border-radius: 5px;
      margin: 10px 0;
      height: 20px;
      position: relative;
    }
    
    .progress-bar {
      height: 100%;
      border-radius: 5px;
      background-color: #4CAF50;
      transition: width 0.3s ease;
    }
    
    .progress-text {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: #333;
      font-size: 12px;
      font-weight: bold;
    }
/* نسخه موبایل */
@media (max-width: 600px) {
    html, body {
    overflow-x: hidden;
  }

  .profile-container {
    flex-direction: column;
    overflow-x: hidden;
  }

  .profile-sidebar {
    width: 100%;
    border-left: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    padding: 1rem;
  }

  .main-content {
    padding: 1.5rem;
  }

  .profile-menu a {
    backdrop-filter: none;
  }
 .course-card {
  display: flex;
  flex-direction: column;
  align-items: center;     /* محتوای داخل کارت در راستای افقی وسط‌چین میشه */
  text-align: center;      /* متن داخل کارت وسط‌چین میشه */
  width: 100%;
  max-width: 100%;
  min-width: unset;
  padding: 20px;
  box-sizing: border-box;
}
  .course-details {
    width: 100%;           /* این هم مهمه برای یکنواختی نوار پیشرفت */
    box-sizing: border-box;
  }

  .course-progress {
    width: 100%;
  }

  .progress-bar,
  .progress-text {
    width: 100%;
    box-sizing: border-box;
  }

  .courses-container{
    flex-direction: column;
    justify-content: center; /* وسط‌چینی در موبایل */
    gap: 20px;
  }
  .course-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 10px;
  }
}
@media (max-width: 360px) {
  .course-card {
    min-width: unset !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 16px;
    text-align: center;
  }

  .progress-text {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .course-title, .course-desc {
    font-size: 1rem;
  }

  .course-image {
    height: auto;
  }
}

.settings-form {
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    border-right: 4px solid var(--cosmic-gold);
    border-radius: var(--card-radius, 16px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-top {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.profile-top h2 {
    font-size: 22px;
    color: #0a0a0a;
    margin-bottom: 20px;
}

.settings-pic-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto;
}

.settings-profile-picture {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ccc;
  display: block;
  margin: 0 auto;
}

.settings-pic-wrapper .edit-icon {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #444;
  transition: background 0.2s ease;
  z-index: 2;
}


.edit-icon:hover {
    background: #f0f0f0;
}

.form-section {
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 6px;
    text-align: center;
}

.form-group input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 14px;
    width: 100%;
}

.form-row {
    display: flex;
        flex-wrap: wrap; /* اجازه می‌دهد آیتم‌ها در موبایل به خط بعد بروند */
    gap: 20px;
    width: 100%;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}
/* در موبایل هر آیتم را 100% عرض بگیرد */
@media (max-width: 768px) {
    .form-row .form-group {
        flex: 1 1 100%; /* در موبایل تمام عرض را بگیرد */
    }
}
.center {
    text-align: center;
}

.cta-button.filled {
    background: linear-gradient(to right, var(--cosmic-gold), var(--accent-red));
    color: #ffffff;
    padding: 12px 30px;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cta-button.filled:hover {
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}
.edit-icon.delete {
  position: absolute;
  bottom: -4px;
  left: -4px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #c00;
  transition: background 0.2s ease;
  z-index: 2;
}
.edit-icon.delete:hover {
  background: #f8d7da;
}
/* آیکن تغییر - پایین راست */
.edit-icon.change {
  position: absolute;
  bottom: -4px;
  right: -4px;
  top: auto;
  left: auto;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #444;
  transition: background 0.2s ease;
  z-index: 2;
}
.edit-icon.change:hover {
  background: #f0f0f0;
}

/* آیکن حذف - پایین چپ */
.edit-icon.delete {
  position: absolute;
  bottom: -4px;
  left: -4px;
  top: auto;
  right: auto;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #c00;
  transition: background 0.2s ease;
  z-index: 2;
}
.edit-icon.delete:hover {
  background: #f8d7da;
}
/* آیکن تغییر - پایین راست */
.edit-icon.change {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #444;
  transition: background 0.2s ease;
  z-index: 2;
}
.edit-icon.change:hover {
  background: #f0f0f0;
}

/* آیکن حذف - پایین چپ */
.edit-icon.delete {
  position: absolute;
  bottom: -4px;
  left: -4px;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #c00;
  transition: background 0.2s ease;
  z-index: 2;
}
.edit-icon.delete:hover {
  background: #f8d7da;
}
/* پس‌زمینهٔ نیمه‌شفاف */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;             /* مخفی به‌طور پیش‌فرض */
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

/* کادر مودال */
.modal-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  max-width: 400px;
  text-align: center;
}

/* دکمه‌ها */
.modal-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.btn-danger {
  background-color: #ff4c4c;
  color: #fff;
}

.btn-secondary {
  background-color: #ccc;
  color: #333;
}

.btn-danger:hover {
  background-color: #e03e3e;
}

.btn-secondary:hover {
  background-color: #bbb;
}
.quiz-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #ff8a00;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.quiz-btn:hover {
    background: #e67e22;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
/* بلاک محتوایی */
.content-block {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  border-radius: var(--card-radius);
  padding: 20px;
  margin-bottom: 30px;
  text-align: justify;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-title {
  font-size: 1.5rem;
  color: var(--galaxy-purple);
  margin-bottom: 15px;
  text-align: center;
}

.content-block p {
  margin-bottom: 15px;
  line-height: 1.8;
  color: var(--text-dark);
}

.content-block img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 15px auto;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}
.back{
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  border-radius: var(--card-radius);
}