/* ============================================================
   دیوان ادب پارسی - استایل اصلی (نسخه ۲)
   ============================================================ */

/* --- فونت‌ها --- */
@import url('https://fonts.googleapis.com/css2?family=Lalezar&family=Scheherazade+New:wght@400;700&display=swap');
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v20.0.0/dist/font-face.css');
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/gandom-font@master/dist/font-face.css');
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/yas-font@master/dist/font-face.css');

html {
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
html::-webkit-scrollbar { display: none; }

body {
    font-family: 'Vazirmatn', 'Vazir', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: #fffaf0;
    background-image: url('../img/texture.png');
    background-repeat: repeat;
    background-blend-mode: overlay;
    color: #1c1917;
}
html.dark body, .dark body, body.dark {
    background-color: #14100d;
    color: #e7e5e4;
}

/* --- عنوان‌ها با فونت لاله‌زار --- */
.poem-title, .ghazal-number, h1.font-title {
    font-family: 'Lalezar', cursive;
}

/* --- کارت اصلی (ornate-card) --- */
.ornate-card {
    position: relative;
    background-color: rgba(255, 251, 235, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 1.25rem;
    box-shadow: 0 10px 30px -10px rgba(146, 64, 14, 0.15);
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s ease;
}
.dark .ornate-card {
    background-color: rgba(28, 25, 23, 0.65);
    border-color: rgba(87, 83, 78, 0.5);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* --- افکت هاور روی کارت‌های صفحه اصلی --- */
.card-hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card-hover-effect:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 18px 40px -12px rgba(146, 64, 14, 0.28);
    border-color: rgba(217, 119, 6, 0.5);
}
.dark .card-hover-effect:hover {
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
    border-color: rgba(217, 119, 6, 0.4);
}

/* --- فونت‌های قابل انتخاب برای متن شعر --- */
.font-vazir { font-family: 'Vazir', 'Vazirmatn', sans-serif; }
.font-gandom { font-family: 'Gandom', serif; }
.font-yas { font-family: 'Yas', serif; }
.font-scheherazade { font-family: 'Scheherazade New', serif; font-weight: 700; }
.font-nastaliq { font-family: 'Scheherazade New', 'Vazir', serif; font-style: normal; }

/* --- جعبه‌ی شعر و ابیات --- */
.poem-box { font-size: 1.15rem; line-height: 2.6rem; }

.bayt {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
    padding: 0.6rem 0.9rem;
    border-radius: 0.6rem;
    transition: background-color 0.25s ease, transform 0.2s ease;
}
.bayt:hover {
    background-color: rgba(217, 119, 6, 0.08);
    transform: scale(1.015);
}
.dark .bayt:hover { background-color: rgba(255, 255, 255, 0.06); }

.mesra { flex: 1; white-space: normal; }
.mesra.m1 { text-align: right; }
.mesra.m2 { text-align: left; }

@media (max-width: 640px) {
    .bayt { flex-direction: column; gap: 0.25rem; }
    .mesra.m1, .mesra.m2 { text-align: right; }
}

/* --- انیمیشن ورود ملایم --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.7s ease-out forwards; }

/* --- toast --- */
#toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 14px;
    position: fixed;
    z-index: 60;
    left: 50%;
    bottom: 30px;
    font-size: 15px;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}
#toast.show { visibility: visible; opacity: 1; }

/* --- اسکرول‌بار سفارشی --- */
.custom-scroll::-webkit-scrollbar { width: 6px; }
.custom-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(180, 83, 9, 0.4);
    border-radius: 10px;
}
