* {
    box-sizing: border-box;
}

:root {
    --deep: #0a0d17;
    --mid: #10182a;
    --teal: #2bc4b6;
    --teal-light: #5eead4;
    --violet: #a78bfa;
    --danger: #ffb4b4;
}

html,
body {
    height: 100%;
    margin: 0;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* جلوگیری از بزرگ‌شدن خودکار فونت در بعضی مرورگرهای گوشی */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Vazirmatn', 'Shabnam', Tahoma, 'Segoe UI', sans-serif;
    min-height: 100vh;
    position: relative;
    background:
        radial-gradient(340px circle at 90% 8%, rgba(94, 234, 212, 0.28) 0%, transparent 60%),
        radial-gradient(300px circle at 6% 92%, rgba(167, 139, 250, 0.24) 0%, transparent 60%),
        linear-gradient(160deg, var(--deep) 0%, var(--mid) 55%, var(--deep) 100%);
}

/* فقط صفحات ورود/ثبت‌نام/فراموشی رمز این حالت رو دارن: کارت همیشه وسط صفحه */
body.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

/* اسکرول کل صفحه (افقی و عمودی) غیرفعاله؛ صفحاتی که محتوای بلندتر از صفحه دارن
   (مثل ثبت‌نام) باید خودشون یه اسکرول داخلی مخصوص (overflow-y: auto) روی همون بخش بذارن */
html,
body {
    overflow: hidden;
    height: 100%;
}

/* لوگو: همیشه ثابت، گوشه بالا-راست صفحه */
.site-logo {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo img {
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

.site-logo img {
    height:80px;width:auto;max-width:none;flex-shrink:0;object-fit:contain;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.ensat {
    font-family: 'Shabnam', 'Vazirmatn', sans-serif;
    font-size: 35px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #ffffff 0%, var(--teal-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 14px rgba(43, 196, 182, 0.4);
    user-select: none;
}


/* نام بخش + توضیح کنار لوگو */
.logo-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.logo-desc {
    display: block;
    max-width: 210px;
    font-family: 'Shabnam', 'Vazirmatn', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    user-select: none;
}
@media (max-width: 720px) { .logo-desc { font-size: 10.5px; max-width: 140px; } }
@media (max-width: 380px) { .logo-desc { font-size: 9.5px; max-width: 110px; } }

/* بلاب‌های تزئینی پس‌زمینه */
.blob {
    pointer-events: none;
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.35;
}

.blob.b1 {
    width: 340px;
    height: 340px;
    top: -80px;
    right: -60px;
    background: radial-gradient(circle at 30% 30%, rgba(94, 234, 212, 0.7), rgba(94, 234, 212, 0) 70%);
}

.blob.b2 {
    width: 220px;
    height: 220px;
    bottom: 60px;
    left: -60px;
    background: radial-gradient(circle at 30% 30%, rgba(167, 139, 250, 0.65), rgba(167, 139, 250, 0) 70%);
}

.blob.b3 {
    width: 120px;
    height: 120px;
    bottom: 20%;
    right: 12%;
    opacity: 0.25;
    background: radial-gradient(circle at 30% 30%, rgba(94, 234, 212, 0.6), rgba(94, 234, 212, 0) 70%);
}

@media (max-width: 720px) {
    .site-logo {
        top: 14px;
        right: 14px;
        gap: 8px;
    }

    .site-logo img {
        height:48px;width:auto;max-width:none;flex-shrink:0;object-fit:contain;
    }

    .ensat {
        font-size: 22px;
    }

    body.auth-page {
        padding: 14px;
    }

    .blob.b1 {
        width: 220px;
        height: 220px;
    }

    .blob.b2 {
        width: 150px;
        height: 150px;
    }

    .blob.b3 {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 380px) {
    .site-logo img {
        height:40px;width:auto;max-width:none;flex-shrink:0;object-fit:contain;
    }

    .ensat {
        font-size: 18px;
    }
}

/* اسکرول‌بار سفارشی هماهنگ با تم شیشه‌ای/فیروزه‌ای برنامه */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(127, 233, 221, 0.6) rgba(255, 255, 255, 0.08);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background-color: var(--teal-light);
    background-image: linear-gradient(180deg, var(--teal-light), var(--teal));
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background-image: linear-gradient(180deg, #fff, var(--teal-light));
    background-clip: padding-box;
}

/* ===== سازگاری با مرورگرهای قدیمی (مثل گلکسی J5): gap داخل flex رو ندارن =====
   فقط روی مرورگرهای قدیمی اعمال میشه، روی گوشی/لپ‌تاپ جدید هیچ تغییری نداره */
@supports not (aspect-ratio: 1 / 1) {
    html .site-logo {
        gap: 0 !important;
    }

    html .site-logo>* {
        margin-left: 12px;
    }

    html .site-logo>*:last-child {
        margin-left: 0;
    }
}

@supports not (aspect-ratio: 1 / 1) {
    @media (max-width: 720px) {
        html .site-logo>* {
            margin-left: 8px;
        }

        html .site-logo>*:last-child {
            margin-left: 0;
        }
    }
}