body {
    font-family: 'Vazir', sans-serif; /* استفاده از فونت Lalezar */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); /* سایه برای خواناتر شدن */
    margin: 0;
    padding: 0;
    background-color: #f3f3f3;
    direction: rtl;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header {
    background-color: #7e2ad9;
    color: white;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px; 
    padding: 20px;
    position: relative;
}

header h1 {
    color: #30db3e;
    margin: 0;
    font-size: 36px;
    
}

header p {
    font-size: 18px;
    margin-top: 10px;
}

.menu-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
}

.hamburger-menu {
    font-size: 30px;
    cursor: pointer; 
    
}

.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 10px;
    color: white;
}

main {
    padding: 20px;
}

.content h2 {
    color: #30db3e;
    font-size: 28px;
}

.content p {
    font-size: 18px;
    color: #333;
}

footer {
    background-color: #7e2ad9;
    color: white;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px; 
    padding: 20px;
    position: relative;
}


footer a {

    color: #30db3e;
}
.navbar {
    display: none;
    background-color: #30db3e;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    padding: 10px;
    list-style-type: none;
    border-radius: 5px;
}

.navbar ul {
    padding: 0;
}

.navbar ul li {
    margin: 10px 0;
}

.navbar ul li a {
    color: white;
    text-decoration: none;
}

/* استایل بخش "درباره" */
#about-section {
    margin-top: 100px;
    padding: 20px;
    background-color: #f3f3f3;
    text-align: center;
}

.social-links {
    display: flex;
    flex-direction: column; /* نمایش عمودی */
    align-items: center; /* قرار گرفتن لینک‌ها در مرکز */
    gap: 10px; /* فاصله بین لینک‌ها */
    margin-top: 20px;
}

.social-links a {
    display: inline-block;
    width: 256px; /* عرض مستطیل */
    padding: 10px 0; /* فاصله داخلی */
    text-align: center; /* متن در مرکز */
    background-color: #7e2ad9; /* رنگ پس‌زمینه */
    color: #fff; /* رنگ متن */
    border-radius: 15px; /* گوشه‌های گرد */
    text-decoration: none; /* حذف خط زیر متن */
    font-weight: bold;
    transition: background-color 0.3s ease; /* افکت تغییر رنگ */
}

.social-links a:hover {
    background-color: #30db3e; /* رنگ در حالت هاور */
}

.image-below-text {
    width: 100%; /* تنظیم عرض تصویر به 100% از عرض صفحه */
    max-width: 600px; /* حداکثر عرض تصویر */
    margin-top: 20px; /* فاصله بالای تصویر */
    display: block; /* اطمینان از نمایش به صورت بلاک */
    margin-left: auto;
    margin-right: auto; /* برای مرکزچین کردن تصویر */
    border-radius: 15px; /* گوشه‌های گرد */
    overflow: hidden; /* برای اطمینان از اینکه گوشه‌ها به درستی گرد شوند */
    opacity: 0; /* ابتدا تصویر غیر قابل مشاهده است */
    animation: fadeIn 1.5s forwards; /* استفاده از انیمیشن فیداین */
}

@keyframes fadeIn {
    0% {
        opacity: 0; /* شروع انیمیشن از غیر قابل مشاهده */
        transform: scale(0.8); /* شروع از اندازه کوچکتر */
    }
    100% {
        opacity: 1; /* پایان انیمیشن با نمایش کامل تصویر */
        transform: scale(1); /* بازگشت به اندازه اصلی */
    }
}

/* دکمه دایره‌ای */
#scrollToTopBtn {
    position: fixed;
    bottom: 20px;  /* فاصله از پایین صفحه */
    left: 20px;    /* فاصله از سمت چپ صفحه */
    width: 50px;   /* عرض دکمه */
    height: 50px;  /* ارتفاع دکمه */
    border-radius: 50%;  /* گرد کردن گوشه‌های دکمه */
    background-color: #4c1d7d;  /* رنگ پس‌زمینه دکمه */
    color: white;  /* رنگ متن */
    font-size: 24px;  /* اندازه فونت */
    border: none;   /* حذف مرز */
    cursor: pointer;  /* تغییر نشانگر موس به حالت دست */
    display: none;  /* به طور پیش‌فرض دکمه مخفی باشد */
    align-items: center;  /* قرار دادن محتوای دکمه در مرکز */
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);  /* سایه نرم برای دکمه */
    transition: background-color 0.3s ease;  /* افکت تغییر رنگ */
    z-index: 9999; /* اطمینان از اینکه دکمه روی سایر عناصر قرار گیرد */
}

#scrollToTopBtn:hover {
    background-color: #30db3e;  /* رنگ دکمه در حالت هاور */
}

/* اطمینان از اینکه فوتر روی دکمه دایره‌ای نرود */
footer {
    position: relative;
    z-index: 1; /* دکمه دایره‌ای بالاتر از فوتر باشد */
}



body.dark-mode {
    background-color: #000000;
    color: white;
}

body.dark-mode header {
    background-color: #1a092d;
}

body.dark-mode footer {
    background-color: #1a092d;
}

body.dark-mode .dark-mode-toggle {
    color: #ffcd38;
}

body.dark-mode p {
    color: #ffffff; /* رنگ دلخواه در حالت دارک مود */
}

body.dark-mode .social-links a {
    background-color: #1a092d; /* رنگ پس‌زمینه در حالت دارک مود */
    color: #30db3e; /* رنگ متن در حالت دارک مود */
}

/* تغییر رنگ در حالت هاور (دارک مود) */
body.dark-mode .social-links a:hover {
    background-color: #666; /* رنگ هاور در حالت دارک مود */
}

body.dark-mode .bs {
    background: #1a092d;
}

.bs{
    margin: 40px auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    background: #7e2ad9;
    border-radius: 15px;
    display: flex;
    flex-direction: column; /* نمایش عمودی */
    align-items: center;
}

.bs h1 {
    color: #30db3e;
    margin: 0;
    font-size: 25px;

}

.bs p{

    color: white;
}

.book {
    position: relative;
    width: 200px;
    height: 300px;
    transform-style: preserve-3d; /* فعال‌سازی سه‌بعدی */
    transform: rotateX(0deg) rotateY(0deg);
    transition: transform 0.1s linear; /* برای انیمیشن نرم */
    touch-action: none; /* غیرفعال کردن اسکرول هنگام لمس */
    
  }

  .cover {
    position: absolute;
    width: 200px;
    height: 300px;
    background-size: cover;
    
  }

.front {
    background-image: url('https://raw.githubusercontent.com/Amir24NZ/mashghe_eshgh_alaleh/main/images/book.jpg');
    transform: rotateY(0deg) translateZ(10px);
}

.back {
    background-image: url('https://raw.githubusercontent.com/Amir24NZ/mashghe_eshgh_alaleh/main/images/book2.jpg');
    transform: rotateY(180deg) translateZ(10px);
}

.spine1 {
    position: absolute;
    width: 20px;
    height: 300px;
    background: #0438a6;
    transform: rotateY(90deg) translateX(0px) translateZ(10px);
  }

  .spine2 {
    position: absolute;
    width: 20px;
    height: 300px;
    background: #d4d4d4;
    transform: rotateY(90deg) translateX(0px) translateZ(-190px);
  }

  .spine3 {
    position: absolute;
    width: 200px; /* طول ستون فقرات افقی */
    height: 20px; /* ضخامت ستون فقرات افقی */
    background: #d4d4d4; /* رنگ ستون */
    transform: rotateX(90deg) translateY(0px) translateZ(10px); /* چرخش و موقعیت */
  }

  .spine4 {
    position: absolute;
    width: 200px; /* طول ستون فقرات افقی */
    height: 20px; /* ضخامت ستون فقرات افقی */
    background: #d4d4d4; /* رنگ ستون */
    transform: rotateX(90deg) translateY(0px) translateZ(-290px); /* چرخش و موقعیت */
  }

.book:hover {
    transform: rotateY(360deg);
}

.price-container {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }
  
  .old-price {
    text-decoration: line-through;
    color: red; /* خط قرمز روی قیمت قدیمی */
    margin-bottom: 5px;
  }
  
  .new-price {
    font-weight: bold;
    color: green; /* رنگ سبز برای قیمت جدید */
  }
  
  .social-links {
    display: flex;
    flex-direction: column; /* نمایش عمودی */
    align-items: center; /* قرار گرفتن لینک‌ها در مرکز */
    gap: 10px; /* فاصله بین لینک‌ها */
    margin-top: 20px;
}

.book-links a {
    display: inline-block;
    width: 256px; /* عرض مستطیل */
    padding: 10px 0; /* فاصله داخلی */
    text-align: center; /* متن در مرکز */
    background-color: #30db3e; /* رنگ پس‌زمینه */
    color: #fff; /* رنگ متن */
    border-radius: 15px; /* گوشه‌های گرد */
    text-decoration: none; /* حذف خط زیر متن */
    font-weight: bold;
    transition: background-color 0.3s ease; /* افکت تغییر رنگ */
}