/* ============================================
   فونت‌ها و تنظیمات پایه
   ============================================ */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/tanha-font@v0.9.2/dist/font-face.css');

/* ============================================
   بدنه اصلی
   ============================================ */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #030710;
    background-image: radial-gradient(circle at 50% 50%, #091224 0%, #030710 100%);
    font-family: "B Nazanin", "B Lotus", "Tanha", "Tahoma", sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    color: #f1ebd9;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: 1.1rem;
}

/* ============================================
   هدر لوکس (موج‌های طلایی)
   ============================================ */
.luxury-islamic-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 160px;
    overflow: hidden;
    z-index: 99;
    pointer-events: none;
}

.gold-wave-stripes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.gold-wave-stripes svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0px 4px 8px rgba(212, 175, 55, 0.4));
}

.navy-wave-body {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.navy-wave-body svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   نوار احراز هویت (ورود/ثبت‌نام)
   ============================================ */
.auth-bar {
    position: absolute;
    top: 30px;
    left: 25px;
    z-index: 9999;
    font-family: "B Nazanin", "Tanha", sans-serif;
    font-size: 1rem;
}

.style-mini {
    padding: 6px 15px !important;
    font-size: 0.95rem !important;
    border-radius: 15px !important;
}

/* ============================================
   نام سایت (نغمه قلم)
   ============================================ */
.site-name {
    position: absolute;
    top: -160px;
    right: 30px;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0px;
    pointer-events: none;
}

/* طرح اسلیمی گردان */
.site-name::before {
    content: "" !important;
    display: inline-block !important;
    width: 40px !important;
    height: 40px !important;
    background-image: url('8.png') !important;
    background-size: 45px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    margin-left: -150px !important;
    filter: brightness(0) saturate(100%) invert(68%) sepia(85%) saturate(950%) hue-rotate(354deg) brightness(95%) contrast(90%);
    animation: eslimiMiniRotate 10s linear infinite;
    will-change: transform;
    flex-shrink: 0 !important;
}

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

/* عکس لوگو */
.logo-img {
    display: block;
    width: 400px;
    height: auto;
    pointer-events: auto;
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.3));
    transition: all 0.3s ease;
}

.logo-img:hover {
    filter: drop-shadow(0 0 40px rgba(212, 175, 55, 0.6));
    transform: scale(1.05);
}

/* ============================================
   دکمه‌های ژانر
   ============================================ */
.genre-container {
    margin: 150px auto 15px auto;
    display: flex;
    gap: 10px;
    z-index: 10;
    width: 100%;
    max-width: 750px;
    padding: 10px 15px;
    box-sizing: border-box;
    justify-content: center;
    flex-wrap: wrap;
}

.genre-btn {
    background-color: rgba(7, 15, 30, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #e2c275;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-family: "B Nazanin", "B Lotus", "Tanha", sans-serif;
    font-size: 1.1rem;
    font-weight: normal;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.genre-btn.active,
.genre-btn:hover {
    background-color: #d4af37;
    color: #030710;
    border-color: #ffffff;
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.5);
}

/* دکمه محبوب‌های من */
.genre-btn.fav-gold-btn {
    background-color: rgba(7, 15, 30, 0.8) !important;
    border: 1px solid rgba(212, 175, 55, 0.6) !important;
    color: #e2c275 !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(212, 175, 55, 0.1);
}

.genre-btn.fav-gold-btn .heart-icon {
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.3s ease;
    color: #d4af37;
}

.genre-btn.fav-gold-btn:hover {
    background-color: #d4af37 !important;
    color: #030710 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.65) !important;
}

.genre-btn.fav-gold-btn:hover .heart-icon {
    transform: scale(1.2) rotate(10deg);
    color: #030710 !important;
}

.genre-btn.fav-gold-btn.active {
    background: linear-gradient(135deg, #d4af37 0%, #d4af37 100%) !important;
    color: #030710 !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.8) !important;
}

.genre-btn.fav-gold-btn.active .heart-icon {
    color: #030710 !important;
    transform: scale(1.25);
}

/* ============================================
   بخش اصلی و کارت شعر
   ============================================ */
.main-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 800px;
    padding: 20px;
    box-sizing: border-box;
    flex-grow: 1;
}

/* شمسه گردان */
.shamseh-bg {
    position: absolute;
    width: 100%;
    max-width: 750px;
    height: auto;
    aspect-ratio: 1 / 1;
    background-image: url('Eslimi_Design_Surah.svg.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    pointer-events: none;
    filter: invert(1) sepia(1) saturate(7) hue-rotate(5deg) brightness(0.9) opacity(0.35);
    transform-origin: center center;
    animation: slowRotate 140s linear infinite;
}

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

/* کارت اصلی */
.card {
    background-color: #070f1e;
    padding: 40px 30px;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(212, 175, 55, 0.2);
    width: 100%;
    max-width: 520px;
    text-align: center;
    border: 2px solid #d4af37;
    position: relative;
    z-index: 5;
    box-sizing: border-box;
}

.card::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 16px;
    pointer-events: none;
}

.quote-icon {
    font-size: 50px;
    color: #d4af37;
    font-family: Georgia, serif;
    line-height: 0;
    margin-top: 5px;
    margin-bottom: 20px;
}

/* متن شعر */
.text {
    font-family: "B Nazanin", "B Lotus", "Tanha", sans-serif;
    font-size: 1.65rem;
    font-weight: normal;
    color: #f1ebd9;
    line-height: 1.9;
    margin-bottom: 20px;
    min-height: 80px;
    word-wrap: break-word;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.source {
    font-size: 1.1rem;
    color: #a0aec0;
    margin-bottom: 30px;
    display: block;
    font-family: "B Nazanin", "B Lotus", sans-serif;
    font-weight: normal;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* دکمه‌های اکشن */
.actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    background-color: #d4af37;
    color: #030710;
    border: none;
    padding: 10px 26px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    font-family: "B Nazanin", "B Lotus", "Tanha", sans-serif;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background-color: #fff;
    color: #030710;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: #d4af37;
    border: 1px solid #d4af37;
}

.btn-secondary:hover {
    background-color: rgba(212, 175, 55, 0.1);
    color: #d4af37;
}

/* باکس توضیحات */
.info-box {
    background-color: #040914;
    border: 1px dashed rgba(212, 175, 55, 0.3);
    padding: 20px;
    border-radius: 14px;
    margin-top: 10px;
    text-align: justify;
    display: none;
    font-size: 1.1rem;
    color: #cbd5e0;
    line-height: 1.8;
    font-family: "B Nazanin", "B Lotus", sans-serif;
    box-sizing: border-box;
}

.info-box strong {
    color: #d4af37;
}

/* ============================================
   دکمه قلب (علاقه‌مندی)
   ============================================ */
#love-btn {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.heart-icon-img {
    width: 28px;
    height: 28px;
    transition: transform 0.2s ease;
}

#love-btn:hover .heart-icon-img {
    transform: scale(1.15);
}

.btn,
.genre-btn,
#toggle-password-btn,
#love-btn {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    transition: all 0.15s cubic-bezier(0.2, 0, 0.2, 1) !important;
}

button,
a {
    touch-action: manipulation;
}

/* ============================================
   مودال ورود / ثبت‌نام
   ============================================ */
#auth-modal {
    backdrop-filter: blur(8px);
}
#auth-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(3, 7, 16, 0.6) !important; /* پس‌زمینه تیره تیره نیمه‌شفاف */
    backdrop-filter: blur(12px) !important; /* مات کردن شدیدتر لایه‌های پشت مثل دکمه‌ها */
    -webkit-backdrop-filter: blur(12px) !important;
    display: none; /* در حالت عادی مخفی است */
    justify-content: center;
    align-items: center;
    z-index: 999999 !important; /* بالاترین لایه ممکن برای جلو آمدن کامل */
}

#auth-modal .card {
    max-width: 400px !important;
    width: 90% !important;
    padding: 40px 30px !important;
    background-color: #070f1e !important;
    border: 2px solid #d4af37 !important;
    border-radius: 24px !important;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9) !important;
}

#modal-title {
    font-family: "B Nazanin", "Tanha", sans-serif !important;
    font-size: 1.6rem !important;
    font-weight: bold !important;
    color: #d4af37 !important;
    margin-bottom: 30px !important;
    background: none !important;
    padding: 0 !important;
    user-select: none !important;
    cursor: default !important;
}

#auth-modal input[type="text"],
#auth-modal input[type="email"],
#auth-modal input[type="password"],
#auth-modal input[type="tel"] {
    width: 100% !important;
    height: 46px !important;
    box-sizing: border-box !important;
    background-color: #030710 !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    border-radius: 12px !important;
    color: #f1ebd9 !important;
    font-family: "B Nazanin", "Tanha", Tahoma, sans-serif !important;
    font-size: 1.15rem !important;
    margin-bottom: 18px !important;
    padding: 0 15px !important;
    text-align: right !important;
    direction: rtl !important;
    cursor: text !important;
    transition: border-color 0.2s ease !important;
}

#auth-modal #auth-password {
    padding-left: 45px !important;
    padding-right: 15px !important;
}

#auth-modal #auth-password[type="text"] {
    letter-spacing: 0px !important;
}

#auth-modal #auth-password[type="password"] {
    letter-spacing: 2px !important;
}

#auth-modal input:focus {
    border-color: #d4af37 !important;
    outline: none !important;
}

#auth-modal input::placeholder {
    color: rgba(241, 235, 217, 0.4) !important;
    text-align: right !important;
}

#auth-modal .actions-auth {
    display: flex !important;
    gap: 12px !important;
    justify-content: center !important;
    margin-top: 10px !important;
    width: 100% !important;
}

#auth-modal .btn {
    padding: 10px 30px !important;
    font-size: 1.1rem !important;
    border-radius: 25px !important;
    flex: 1 !important;
}

#toggle-auth-mode {
    color: #a0aec0 !important;
    margin-top: 25px !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    font-family: "B Nazanin", "Tanha", sans-serif !important;
    user-select: none !important;
    transition: color 0.3s ease !important;
}

#toggle-auth-mode:hover {
    color: #d4af37 !important;
}

/* ============================================
   آیکون چشم (نمایش/مخفی کردن پسورد)
   ============================================ */
.password-wrapper {
    position: relative !important;
    width: 100% !important;
    display: block !important;
}

.password-wrapper input {
    width: 100% !important;
    padding-left: 40px !important;
    box-sizing: border-box !important;
}

#toggle-password-container {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    align-items: center !important;
    border-right: 1px solid rgba(212, 175, 55, 0.4) !important;
    padding-right: 8px !important;
    height: 20px !important;
    z-index: 5 !important;
    pointer-events: none !important;
}

#toggle-password-container-signup {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 12px;
    display: flex;
    align-items: center;
}

.password-wrapper div[id^="toggle-password-container"] {
    position: absolute !important;
    left: 12px !important;
    top: 50% !important;
    transform: translateY(-85%) !important;
    display: flex !important;
    align-items: center !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

.toggle-eye-btn {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    user-select: none !important;
    pointer-events: auto !important;
    display: block !important;
}

#toggle-password-btn {
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
    user-select: none !important;
    pointer-events: auto !important;
    display: block !important;
}

/* ============================================
   نشانگر موس
   ============================================ */
.text,
.source,
id,
p,
span,
h2,
h3 {
    cursor: default !important;
}

.btn,
.genre-btn,
a,
button {
    cursor: pointer !important;
}

/* ============================================
   ریسپانسیو (موبایل)
   ============================================ */
@media (max-width: 600px) {
    .genre-container {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .genre-container::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 580px) {
    .luxury-islamic-header {
        height: 120px;
    }

    .auth-bar {
        top: 15px !important;
        left: 20px !important;
    }

    .genre-container {
        margin-top: 115px !important;
    }

    .card {
        padding: 30px 20px;
    }

    .text {
        font-size: 1.45rem;
        line-height: 1.8;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .site-name {
        top: 10px;
        right: 15px;
        gap: 10px;
    }

    .logo-img {
        height: 35px;
    }
}
/* ============================================
   سیستم پیام‌های سفارشی (Notification) - نسخه نهایی و بی‌نقص
   ============================================ */
/* ============================================
   سیستم پیام‌های سفارشی (Notification) - نسخه نهایی صفحه اصلی (بدون لایه اضافه)
   ============================================ */
.notification-container {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999999 !important;
    width: 90%;
    max-width: 420px;
    pointer-events: none;
    direction: rtl;
}

.notification {
    background: linear-gradient(135deg, #070f1e 0%, #0a1628 100%);
    color: #f1ebd9;
    
    /* 🌟 تکنیک طلایی پنل ادمین: حذف بردر معمولی برای جلوگیری از باگ رندر لبه‌ها */
    border: none !important; 
    
    border-radius: 14px;
    padding: 16px 28px;
    margin-bottom: 12px;
    font-family: "B Nazanin", "Tanha", sans-serif;
    font-size: 1.1rem;
    text-align: center;
    pointer-events: auto;
    animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
    overflow: hidden !important;
}

/* 🌟 استفاده از box-shadow به جای بردر (دقیقاً مثل پنل ادمین) برای داشتن لبه‌های ۱۰۰٪ تک‌لایه و تیز */
.notification.success { 
    box-shadow: 0 0 0 1.5px #4ecdc4, 0 15px 40px rgba(0, 0, 0, 0.8) !important; 
}
.notification.error { 
    box-shadow: 0 0 0 1.5px #ff6b6b, 0 15px 40px rgba(0, 0, 0, 0.8) !important; 
}
.notification.info { 
    box-shadow: 0 0 0 1.5px #a29bfe, 0 15px 40px rgba(0, 0, 0, 0.8) !important; 
}

/* 🌟 حذف کامل تمام شبه‌المان‌های قبل و بعد که لبه اضافه زیر یا روی کادر مینداختن */
.notification::before,
.notification::after {
    display: none !important;
    content: none !important;
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

/* ===== دکمه بستن نوتیفیکیشن ===== */
.notification .close-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.notification .close-btn:hover {
    color: #d4af37;
    transform: translateY(-50%) scale(1.2);
}
/* ============================================
   افکت شیشه‌ای مودال پیشنهادها
   ============================================ */
#suggestion-modal {
    backdrop-filter: blur(8px); /* مات کردن پس‌زمینه پشت پاپ‌آپ */
    -webkit-backdrop-filter: blur(8px);
}

/* کارت داخل مودال پیشنهادها */
#suggestion-modal .card {
    max-width: 450px !important;
    width: 90% !important;
    padding: 35px 25px !important;
    background-color: rgba(7, 15, 30, 0.75) !important; /* پس‌زمینه نیمه‌شفاف برای حس شیشه */
    border: 2px solid #d4af37 !important;
    border-radius: 24px !important;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(212, 175, 55, 0.1) !important;
}

/* استایل‌دهی به فیلدهای ورودی داخل مودال پیشنهاد */
#suggestion-modal textarea,
#suggestion-modal input,
#suggestion-modal select {
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: rgba(3, 7, 16, 0.8) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    border-radius: 12px !important;
    color: #f1ebd9 !important;
    font-family: "B Nazanin", "Tanha", sans-serif !important;
    font-size: 1.1rem !important;
    margin-bottom: 15px !important;
    padding: 10px 15px !important;
    text-align: right !important;
    direction: rtl !important;
}

#suggestion-modal textarea:focus,
#suggestion-modal input:focus,
#suggestion-modal select:focus {
    border-color: #d4af37 !important;
    outline: none !important;
}