/* =====================================================
   RESET
===================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

body {
    font-family:
        "Vazirmatn",
        Tahoma,
        Arial,
        sans-serif;

    background: #090d1b;
    color: #edf1ff;
}

button,
input,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}


/* =====================================================
   GLOBAL BACKGROUND
===================================================== */

.login-page,
.main-site {
    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(98, 91, 255, .17),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(131, 73, 229, .15),
            transparent 30%
        ),
        #090d1b;
}


/* =====================================================
   LOGIN
===================================================== */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    overflow: hidden;
}

.background-grid {
    position: absolute;
    inset: 0;

    opacity: .3;

    background-image:
        linear-gradient(
            rgba(255,255,255,.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.035) 1px,
            transparent 1px
        );

    background-size: 45px 45px;
}

.glow {
    position: absolute;

    width: 350px;
    height: 350px;

    border-radius: 50%;

    filter: blur(100px);

    opacity: .25;
}

.glow-1 {
    background: #675cff;

    top: -150px;
    right: -100px;
}

.glow-2 {
    background: #9a4bea;

    bottom: -150px;
    left: -100px;
}


/* =====================================================
   LOGIN CARD
===================================================== */

.login-card {
    width: 410px;
    max-width: calc(100% - 30px);

    position: relative;
    z-index: 2;

    padding: 30px;

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: 28px;

    background:
        rgba(17,23,42,.92);

    box-shadow:
        0 30px 100px rgba(0,0,0,.45);

    backdrop-filter: blur(20px);

    text-align: center;
}


/* =====================================================
   PANDA
===================================================== */

.panda-area {
    height: 140px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.panda {
    width: 160px;
    height: 140px;

    position: relative;
}

.panda-ear {
    width: 45px;
    height: 45px;

    position: absolute;

    top: 4px;

    background: #050811;

    border-radius: 50%;
}

.panda-ear-left {
    left: 10px;
}

.panda-ear-right {
    right: 10px;
}

.panda-face {
    width: 118px;
    height: 108px;

    position: absolute;

    top: 18px;
    left: 21px;

    background: #fff;

    border-radius:
        48% 48% 44% 44%;

    box-shadow:
        0 15px 35px rgba(0,0,0,.3);

    overflow: visible;
}


/* EYES */

.eye {
    width: 27px;
    height: 38px;

    position: absolute;

    top: 32px;

    background: #050811;

    border-radius: 50%;

    z-index: 5;
}

.eye-left {
    left: 23px;
    transform: rotate(25deg);
}

.eye-right {
    right: 23px;
    transform: rotate(-25deg);
}

.eye span {
    width: 7px;
    height: 7px;

    position: absolute;

    left: 6px;
    top: 7px;

    border-radius: 50%;

    background: white;
}


/* NOSE */

.panda-nose {
    width: 14px;
    height: 10px;

    position: absolute;

    left: 52px;
    top: 69px;

    border-radius: 50%;

    background: #050811;

    z-index: 4;
}


/* MOUTH */

.panda-mouth {
    width: 23px;
    height: 10px;

    position: absolute;

    left: 47px;
    top: 78px;

    border-bottom:
        3px solid #050811;

    border-radius: 50%;

    z-index: 3;
}


/* =====================================================
   PANDA HANDS
===================================================== */

.panda-hand {
    width: 34px;
    height: 56px;

    position: absolute;

    top: 28px;

    border-radius: 50%;

    background: #050811;

    z-index: 20;

    opacity: 0;

    transition:
        transform .25s ease,
        opacity .18s ease;
}


/* دست چپ */

.panda-hand-left {
    left: 12px;

    transform:
        rotate(35deg)
        translateY(20px);
}


/* دست راست */

.panda-hand-right {
    right: 12px;

    transform:
        rotate(-35deg)
        translateY(20px);
}


/* دست روی چشم */

.panda.password-focus
.panda-hand-left {

    opacity: 1;

    transform:
        rotate(24deg)
        translate(
            12px,
            -18px
        );
}

.panda.password-focus
.panda-hand-right {

    opacity: 1;

    transform:
        rotate(-24deg)
        translate(
            -12px,
            -18px
        );
}


/* =====================================================
   BRAND
===================================================== */

.brand-login {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 12px;

    margin-bottom: 22px;
}

.brand-login h1 {
    font-size: 29px;
    letter-spacing: 1px;
    font-weight: 900;
}

.brand-login h1 span,
.brand strong span {
    color: #8d78ff;
}

.brand-login p {
    margin-top: 5px;

    color: #78839d;

    font-size: 10px;
}


/* =====================================================
   INPUT
===================================================== */

.login-input {
    width: 100%;
    height: 55px;

    display: flex;
    align-items: center;

    margin-top: 11px;

    background: #141b30;

    border:
        1px solid #28324d;

    border-radius: 14px;

    transition:
        border .2s,
        box-shadow .2s;
}

.login-input:focus-within {
    border-color: #707aff;

    background: #141b30;

    box-shadow:
        0 0 0 3px
        rgba(112,122,255,.1);
}

.input-icon {
    width: 45px;

    color: #707d9b;

    font-size: 14px;
}

.login-input input {
    flex: 1;

    width: 100%;
    height: 100%;

    border: 0;
    outline: 0;

    background: transparent !important;

    color: white !important;

    font-size: 13px;
}

.login-input input::placeholder {
    color: #69758f;
}

.login-input input:-webkit-autofill,
.login-input input:-webkit-autofill:hover,
.login-input input:-webkit-autofill:focus {
    -webkit-text-fill-color: white !important;

    -webkit-box-shadow:
        0 0 0 1000px #141b30 inset !important;
}

.password-eye {
    width: 45px;
    height: 100%;

    border: 0;

    background: transparent;

    color: #78849f;
}

.password-eye:hover {
    color: white;
}


/* =====================================================
   BUTTONS
===================================================== */

.primary-button {
    width: 100%;
    height: 53px;

    margin-top: 16px;

    border: 0;

    border-radius: 13px;

    color: white;

    background:
        linear-gradient(
            135deg,
            #6673ff,
            #914ee7
        );

    font-size: 13px;
    font-weight: bold;

    box-shadow:
        0 12px 30px
        rgba(102,115,255,.2);

    transition: .2s;
}

.primary-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 17px 35px
        rgba(102,115,255,.3);
}

.secondary-button {
    width: 100%;
    height: 48px;

    margin-top: 9px;

    border:
        1px solid #29334e;

    border-radius: 13px;

    color: #8995ad;

    background: #141b30;

    font-size: 12px;
}

.secondary-button:hover {
    color: white;

    border-color: #414d70;
}

.login-message {
    min-height: 19px;

    margin-top: 9px;

    color: #ff7070;

    font-size: 11px;
}

.login-footer {
    margin-top: 16px;

    color: #4e5a75;

    font-size: 8px;

    letter-spacing: 2px;
}


/* =====================================================
   MAIN
===================================================== */

.main-site {
    min-height: 100vh;

    color: #eef1ff;
}


/* =====================================================
   NAVBAR
===================================================== */

.navbar {
    height: 72px;

    padding: 0 5%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid rgba(255,255,255,.07);

    background:
        rgba(10,14,28,.88);

    backdrop-filter: blur(18px);

    position: sticky;
    top: 0;

    z-index: 50;
}

.brand {
    display: flex;
    align-items: center;

    gap: 10px;
}

.brand-symbol.small {
    width: 39px;
    height: 39px;

    border-radius: 11px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #6975ff,
            #914fe9
        );

    color: white;

    font-size: 17px;
    font-weight: 900;
}

.brand strong {
    display: block;

    font-size: 15px;
    font-weight: 800;
}

.brand small {
    display: block;

    margin-top: 3px;

    color: #69758f;

    font-size: 8px;
}

.nav-user {
    display: flex;
    align-items: center;

    gap: 9px;
}

.nav-user span {
    padding: 8px 12px;

    border-radius: 9px;

    color: #a59aff;

    background: rgba(116,100,255,.1);

    font-size: 10px;
}

.nav-user button {
    padding: 9px 14px;

    border: 0;

    border-radius: 9px;

    color: #ff7777;

    background: rgba(255,90,90,.08);
}


/* =====================================================
   HERO
===================================================== */

.hero {
    width: 90%;
    max-width: 1200px;

    min-height: 240px;

    margin: 28px auto;

    padding: 40px;

    position: relative;

    overflow: hidden;

    display: flex;
    align-items: center;

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: 26px;

    background:
        linear-gradient(
            135deg,
            #151c36,
            #17152e
        );

    box-shadow:
        0 25px 70px rgba(0,0,0,.2);
}

.hero:before {
    content: "";

    position: absolute;

    width: 330px;
    height: 330px;

    border-radius: 50%;

    background: #6d61ff;

    filter: blur(120px);

    opacity: .17;

    right: -80px;
    top: -160px;
}

.hero-badge {
    display: inline-block;

    padding: 7px 12px;

    border-radius: 30px;

    color: #a69bff;

    background:
        rgba(117,101,255,.1);

    font-size: 9px;
    letter-spacing: 1px;
}

.hero h1 {
    margin-top: 14px;

    font-size:
        clamp(25px,4vw,39px);

    line-height: 1.5;
}

.hero h1 span {
    color: #8f7cff;
}

.hero p {
    max-width: 570px;

    margin-top: 9px;

    color: #7e8aa6;

    line-height: 2;

    font-size: 12px;
}

.hero-shape {
    position: absolute;

    left: 7%;

    color: rgba(255,255,255,.025);

    font-size: 80px;
    font-weight: 900;
}


/* =====================================================
   CONTENT
===================================================== */

.content {
    width: 90%;
    max-width: 1200px;

    margin: auto;

    padding-bottom: 70px;
}

.section-title small,
.library-header small {
    color: #8174ff;

    font-size: 9px;

    letter-spacing: 1px;
}

.section-title h2,
.library-header h2 {
    margin-top: 5px;

    font-size: 23px;
}

.subject-title {
    margin-top: 35px;

    margin-bottom: 15px;
}


/* =====================================================
   GRADE CARDS
===================================================== */

.grade-cards {
    display: grid;

    grid-template-columns:
        repeat(3,1fr);

    gap: 12px;

    margin-top: 18px;
}

.grade-card {
    min-height: 125px;

    padding: 19px;

    position: relative;

    text-align: right;

    overflow: hidden;

    border:
        1px solid #242d48;

    border-radius: 18px;

    background:
        #12192c;

    color: white;

    transition: .25s;
}

.grade-card:before {
    content: "";

    position: absolute;

    width: 90px;
    height: 90px;

    border-radius: 50%;

    background: #7163ff;

    filter: blur(40px);

    opacity: 0;

    left: -30px;
    bottom: -30px;

    transition: .25s;
}

.grade-card:hover,
.grade-card.active {
    transform: translateY(-3px);

    border-color:
        rgba(124,112,255,.7);

    background:
        linear-gradient(
            145deg,
            #171f3b,
            #15182e
        );
}

.grade-card.active:before {
    opacity: .22;
}

.grade-number {
    display: block;

    color: #6f78a0;

    font-size: 28px;

    font-weight: 900;
}

.grade-card.active .grade-number {
    color: #8c7cff;
}

.grade-name {
    display: block;

    margin-top: 8px;

    font-size: 14px;

    font-weight: bold;
}

.grade-desc {
    display: block;

    margin-top: 4px;

    color: #69758e;

    font-size: 9px;
}


/* =====================================================
   SUBJECT GRID
===================================================== */

.subject-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(170px,1fr)
        );

    gap: 10px;
}

.subject-card {
    min-height: 112px;

    padding: 16px;

    position: relative;

    text-align: right;

    border:
        1px solid #242d48;

    border-radius: 17px;

    background: #11182b;

    color: white;

    overflow: hidden;

    transition:
        transform .2s,
        border .2s,
        background .2s;
}

.subject-card:hover {
    transform: translateY(-3px);

    border-color: #515c91;
}

.subject-card.active {
    border-color: #796bff;

    background:
        linear-gradient(
            145deg,
            #1b2040,
            #17172f
        );

    box-shadow:
        0 12px 30px
        rgba(101,89,255,.12);
}

.subject-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    color: #a296ff;

    background:
        rgba(122,106,255,.1);

    font-size: 15px;

    font-weight: 900;
}

.subject-card h3 {
    margin-top: 12px;

    font-size: 12px;
}

.subject-card p {
    margin-top: 4px;

    color: #68748f;

    font-size: 8px;
}

.subject-check {
    position: absolute;

    top: 12px;
    left: 12px;

    width: 20px;
    height: 20px;

    display: none;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: white;

    background: #796bff;

    font-size: 10px;
}

.subject-card.active .subject-check {
    display: flex;
}


/* =====================================================
   LIBRARY
===================================================== */

.library-header {
    margin-top: 40px;
    margin-bottom: 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.upload-button {
    padding:
        11px 16px;

    border: 0;

    border-radius: 10px;

    color: white;

    background:
        linear-gradient(
            135deg,
            #6673ff,
            #914ee7
        );

    font-size: 10px;
    font-weight: bold;
}


/* =====================================================
   PDF
===================================================== */

.pdf-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(245px,1fr)
        );

    gap: 13px;
}

.pdf-card {
    padding: 17px;

    border:
        1px solid #222b45;

    border-radius: 17px;

    background: #11182b;

    transition: .2s;
}

.pdf-card:hover {
    transform: translateY(-3px);

    border-color: #3b476b;
}

.pdf-icon {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    color: #ff7d8b;

    background:
        rgba(255,95,110,.08);

    font-size: 10px;

    font-weight: 900;
}

.pdf-card h3 {
    margin-top: 12px;

    font-size: 13px;
}

.pdf-info {
    margin-top: 7px;

    color: #69758f;

    line-height: 1.9;

    font-size: 9px;
}

.pdf-actions {
    display: flex;

    gap: 6px;

    margin-top: 13px;
}

.view-pdf-button {
    flex: 1;

    padding: 9px;

    border: 0;

    border-radius: 8px;

    color: white;

    background: #6673ff;

    font-size: 10px;
}

.delete-pdf-button {
    padding: 9px 12px;

    border: 0;

    border-radius: 8px;

    color: #ff7777;

    background: rgba(255,90,90,.08);
}


/* =====================================================
   EMPTY
===================================================== */

.empty-state {
    padding: 60px 20px;

    text-align: center;
}

.empty-icon {
    width: 55px;
    height: 55px;

    margin: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    color: #8678ff;

    background:
        rgba(118,102,255,.08);

    font-size: 23px;

    font-weight: 900;
}

.empty-state h3 {
    margin-top: 14px;

    font-size: 14px;
}

.empty-state p {
    margin-top: 7px;

    color: #68748f;

    font-size: 10px;
}


/* =====================================================
   MODAL
===================================================== */

.modal {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(4,7,15,.8);

    backdrop-filter: blur(8px);
}

.modal-card {
    width: 520px;
    max-width: 100%;

    padding: 24px;

    border:
        1px solid #28324d;

    border-radius: 22px;

    background: #11182b;

    box-shadow:
        0 30px 80px rgba(0,0,0,.5);
}

.modal-header {
    display: flex;

    justify-content: space-between;
}

.modal-header small {
    color: #8477ff;

    font-size: 8px;
}

.modal-header h2 {
    margin-top: 4px;

    font-size: 18px;
}

.close-button {
    width: 35px;
    height: 35px;

    border: 0;

    border-radius: 9px;

    color: #8995ae;

    background: #1a2238;

    font-size: 21px;
}

.file-upload {
    margin-top: 20px;

    padding: 22px;

    text-align: center;

    border:
        1px dashed #34405f;

    border-radius: 15px;

    background: #0e1527;
}

.upload-icon {
    color: #8174ff;

    font-size: 23px;

    font-weight: 900;
}

.file-upload h3 {
    margin-top: 8px;

    font-size: 12px;
}

.file-upload p {
    margin: 6px 0 12px;

    color: #68748f;

    font-size: 9px;
}

.form-row {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 10px;
}

.form-control {
    margin-top: 13px;
}

.form-control label {
    display: block;

    margin-bottom: 6px;

    color: #78849f;

    font-size: 9px;
}

.form-control input,
.form-control select {
    width: 100%;
    height: 43px;

    padding: 0 10px;

    outline: none;

    border:
        1px solid #29334d;

    border-radius: 9px;

    background: #151d32;

    color: white;
}

.form-control input:focus,
.form-control select:focus {
    border-color: #6f79ff;
}

.upload-message {
    min-height: 18px;

    margin-top: 10px;

    text-align: center;

    font-size: 10px;
}


/* =====================================================
   PDF VIEWER
===================================================== */

.pdf-viewer {
    position: fixed;

    inset: 0;

    z-index: 200;

    background: #080c17;
}

.viewer-container {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
}

.viewer-header {
    min-height: 62px;

    padding: 8px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #11182b;

    border-bottom:
        1px solid #222b44;
}

.viewer-header small {
    display: block;

    color: #7166ed;

    font-size: 7px;
}

.viewer-header strong {
    display: block;

    margin-top: 3px;

    font-size: 12px;
}

.viewer-buttons {
    display: flex;

    gap: 7px;
}

.viewer-buttons button {
    min-height: 38px;

    padding: 0 12px;

    border: 0;

    border-radius: 8px;

    color: white;

    background: #1c263d;
}

.viewer-close {
    width: 38px;

    padding: 0 !important;

    font-size: 21px;
}

.viewer-body {
    flex: 1;

    min-height: 0;
}

#pdfFrame {
    width: 100%;
    height: 100%;

    border: 0;
}


/* =====================================================
   POSTER
===================================================== */

.poster-popup {
    position: fixed;

    inset: 0;

    z-index: 300;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(3,6,14,.8);

    backdrop-filter: blur(9px);
}

.poster-card {
    width: 900px;
    max-width: 100%;

    height: 90vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border:
        1px solid #29334c;

    border-radius: 22px;

    background: #11182b;

    box-shadow:
        0 35px 100px rgba(0,0,0,.55);
}

.poster-header {
    min-height: 80px;

    padding: 13px 17px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background:
        linear-gradient(
            135deg,
            #202956,
            #261b43
        );
}

.poster-header small {
    color: #8c80ff;

    font-size: 8px;
}

.poster-header h2 {
    margin-top: 4px;

    font-size: 18px;
}

.poster-header p {
    margin-top: 3px;

    color: #77839e;

    font-size: 9px;
}

.poster-close {
    width: 38px;
    height: 38px;

    border: 0;

    border-radius: 9px;

    color: white;

    background: rgba(255,255,255,.08);

    font-size: 22px;
}

.poster-body {
    flex: 1;

    min-height: 0;

    background: white;
}

.poster-body iframe {
    width: 100%;
    height: 100%;

    display: block;

    border: 0;
}

.poster-footer {
    min-height: 56px;

    padding: 8px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #0e1527;

    border-top:
        1px solid #222b44;
}

.poster-footer span {
    color: #68748f;

    font-size: 9px;
}

.poster-footer button {
    padding: 10px 16px;

    border: 0;

    border-radius: 9px;

    color: white;

    background: #6673ff;

    font-size: 10px;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 700px) {

    .login-card {
        padding: 25px 20px;
    }

    .navbar {
        padding: 0 14px;
    }

    .brand small {
        display: none;
    }

    .nav-user span {
        display: none;
    }

    .hero {
        width: 94%;

        padding: 27px;

        min-height: 220px;
    }

    .content {
        width: 94%;
    }

    .grade-cards {
        grid-template-columns: 1fr;
    }

    .subject-grid {
        grid-template-columns:
            repeat(2,1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .poster-card {
        height: 95vh;
    }

    .poster-footer span {
        display: none;
    }

    .poster-footer button {
        width: 100%;
    }

}