:root {
    --bg: #06060f;
    --cyan: #00f0ff;
    --purple: #a855f7;
    --muted: #8490a5
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: #f8fafc;
    font-family: Vazir, sans-serif;
    min-height: 100vh;
    overflow-x: hidden
}

#particles,
.grid {
    position: fixed;
    inset: 0;
    pointer-events: none
}

.grid {
    background: linear-gradient(#22d3ee08 1px, transparent 1px), linear-gradient(90deg, #a855f708 1px, transparent 1px);
    background-size: 65px 65px;
    mask-image: radial-gradient(ellipse, #000 20%, transparent 75%)
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .32;
    pointer-events: none
}

.orb-a {
    width: 480px;
    height: 480px;
    right: -180px;
    top: -140px;
    background: #00eaff
}

.orb-b {
    width: 400px;
    height: 400px;
    left: -150px;
    bottom: -130px;
    background: #8a2be2
}

header {
    height: 90px;
    padding: 22px clamp(22px, 5vw, 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 900
}

.brand img {
    width: 40px;
    height: 40px;
    object-fit: contain
}

.brand b {
    color: var(--cyan)
}

.back {
    color: #98a3b7;
    text-decoration: none;
    font-size: 13px
}

.back span {
    color: var(--cyan);
    font-size: 20px;
    margin-right: 7px
}

.auth-shell {
    max-width: 1200px;
    margin: auto;
    padding: 45px 6vw 70px;
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 48px;
    align-items: center
}

.story {
    direction: rtl
}

.eyebrow {
    font-size: 12px;
    color: var(--cyan);
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px
}

.eyebrow i {
    display: block;
    width: 8px;
    height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 14px var(--cyan)
}

h1 {
    font-size: clamp(42px, 5.4vw, 78px);
    line-height: 1.25;
    margin: 0;
    letter-spacing: -3px;
    font-weight: 900
}

h1 em {
    font-style: normal;
    background: linear-gradient(100deg, var(--cyan), #b68cff 75%);
    -webkit-background-clip: text;
    color: transparent
}

.story>p {
    color: #8994a8;
    line-height: 2;
    font-size: 16px;
    max-width: 440px;
    margin: 22px 0 34px
}

.terminal {
    direction: ltr;
    width: min(100%, 450px);
    background: #0a0d19d9;
    border: 1px solid #25354e;
    border-radius: 16px;
    box-shadow: 0 20px 70px #0006, 0 0 40px #00eaff08;
    overflow: hidden
}

.dots {
    height: 38px;
    border-bottom: 1px solid #1d2a3d;
    padding: 10px 14px;
    display: flex;
    gap: 6px;
    align-items: center
}

.dots b {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5d67
}

.dots b:nth-child(2) {
    background: #ffc85c
}

.dots b:nth-child(3) {
    background: #3de08c
}

.dots span {
    font: 11px monospace;
    color: #617087;
    margin-left: auto
}

.code {
    font: 14px monospace;
    line-height: 2.05;
    padding: 18px 21px;
    color: #bec9d9
}

.code small {
    color: #c792ea
}

.code strong {
    color: #fae27d
}

.code mark {
    background: none;
    color: #8be9f8
}

.code span {
    color: #65e6b0
}

.code label {
    color: #8490a5
}

.cursor {
    animation: blink 1s infinite
}

@keyframes blink {
    50% {
        opacity: 0
    }
}

.trust {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #7e899d;
    font-size: 12px;
    margin-top: 26px
}

.trust strong {
    color: #e7edf7
}

.avatars {
    display: flex;
    direction: ltr
}

.avatars i {
    font-style: normal;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #1d3552;
    border: 2px solid var(--bg);
    margin-left: -7px;
    font-size: 10px;
    color: #9cf
}

.avatars i:nth-child(2) {
    background: #583f75;
    color: #f6c
}

.avatars i:nth-child(3) {
    background: #815a34;
    color: #ffd
}

.avatars i:nth-child(4) {
    background: #172333;
    color: var(--cyan)
}

.card-wrap {
    position: relative
}

.card-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--cyan), #8b5cf6, transparent 60%);
    filter: blur(22px);
    opacity: .2
}

.card {
    position: relative;
    background: linear-gradient(145deg, #111a2adf, #0b0e1ae8);
    border: 1px solid #263450;
    border-radius: 25px;
    padding: 34px;
    box-shadow: 0 30px 90px #0008;
    backdrop-filter: blur(22px)
}

.card-head {
    display: flex;
    gap: 15px;
    align-items: center
}

.mini-brand {
    width: 49px;
    height: 49px;
    padding: 8px;
    border-radius: 15px;
    background: #0c2430;
    border: 1px solid #1e6070
}

.mini-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.card h2 {
    margin: 0;
    font-size: 22px
}

.card-head p {
    color: var(--muted);
    font-size: 12px;
    margin: 3px 0 0
}

.tabs {
    display: flex;
    gap: 25px;
    margin: 31px 0 22px;
    position: relative
}

.tab {
    background: none;
    border: 0;
    color: #738096;
    font-family: inherit;
    font-size: 14px;
    padding: 0 0 13px;
    cursor: pointer
}

.tab.active {
    color: #fff
}

.tab-line {
    position: absolute;
    height: 2px;
    background: var(--cyan);
    bottom: 0;
    width: 42px;
    right: 0;
    transition: .3s
}

.field {
    margin: 17px 0
}

.field label,
.label-row {
    font-size: 12px;
    color: #aeb9c9
}

.label-row {
    display: flex;
    justify-content: space-between
}

.forgot {
    color: var(--cyan);
    text-decoration: none;
    font-size: 11px
}

.input {
    height: 48px;
    border: 1px solid #27364e;
    border-radius: 11px;
    background: #080d18aa;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    margin-top: 8px;
    transition: .2s
}

.input:focus-within {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px #00eaff12
}

.input>span {
    color: #6d7e99;
    font-size: 18px
}

.input input {
    border: 0;
    outline: 0;
    background: none;
    color: #fff;
    font: 12px Vazir;
    flex: 1
}

.input input::placeholder {
    color: #536176
}

.input button {
    background: none;
    border: 0;
    color: #65758d;
    cursor: pointer
}

.strength {
    display: none;
    gap: 4px;
    margin-top: 7px;
    align-items: center
}

.strength i {
    height: 3px;
    flex: 1;
    background: #263247;
    border-radius: 3px
}

.strength small {
    font-size: 9px;
    color: #7c8ca4;
    margin-right: 5px
}

.check {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #8794a8;
    font-size: 11px
}

.check input {
    display: none
}

.check span {
    width: 15px;
    height: 15px;
    border: 1px solid #40506a;
    border-radius: 4px
}

.check input:checked+span {
    background: var(--cyan);
    box-shadow: 0 0 12px #00eaff88
}

.submit {
    height: 51px;
    width: 100%;
    margin-top: 22px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(100deg, #00bcca, #7c4dca);
    color: #fff;
    font: 700 13px Vazir;
    cursor: pointer;
    display: flex;
    justify-content: center;
    gap: 14px;
    align-items: center;
    box-shadow: 0 9px 25px #00eaff20;
    transition: .25s
}

.submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 13px 30px #00eaff40
}

.submit b {
    font-size: 20px
}

.or {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #536176;
    font-size: 10px;
    margin: 23px 0
}

.or:before,
.or:after {
    content: "";
    height: 1px;
    background: #233049;
    flex: 1
}

.social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.social button {
    border: 1px solid #26364e;
    background: #0b111e;
    color: #d8e1ef;
    border-radius: 9px;
    height: 42px;
    font: bold 13px Arial;
    cursor: pointer
}

.social span {
    font: 11px Vazir;
    margin-right: 5px
}

.bottom {
    text-align: center;
    color: #718099;
    font-size: 11px;
    margin: 24px 0 0
}

.bottom button {
    border: 0;
    background: none;
    color: var(--cyan);
    font: 11px Vazir;
    cursor: pointer
}

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translate(-50%, 20px);
    opacity: 0;
    background: #122437;
    color: #b5faff;
    border: 1px solid #24566c;
    border-radius: 9px;
    padding: 11px 20px;
    font-size: 12px;
    transition: .3s;
    z-index: 5
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0)
}

.signup-only {
    display: none
}

.signup .signup-only {
    display: block
}

.signup .check {
    display: flex
}

.signup .tab-line {
    right: 66px
}

.signup #title:after {
    content: ''
}

@media(max-width:850px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 510px;
        padding-top: 20px;
        gap: 45px
    }

    .story {
        text-align: center
    }

    .story>p {
        margin-left: auto;
        margin-right: auto
    }

    .terminal {
        margin: auto;
        text-align: left
    }

    .trust {
        justify-content: center
    }

    .story h1 {
        font-size: 48px
    }

    .card {
        padding: 27px
    }
}

@media(max-width:500px) {
    header {
        height: 75px
    }

    .back {
        font-size: 11px
    }

    .auth-shell {
        padding: 15px 20px 50px
    }

    .story h1 {
        font-size: 42px
    }

    .story>p {
        font-size: 13px
    }

    .card {
        padding: 23px 19px
    }

    .terminal {
        font-size: 11px
    }
}

/* بزرگ‌تر کردن لوگوی صفحه احراز هویت */
.auth-shell .card-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    transform: scale(1.35);
    transform-origin: right center;
    margin: 0 0 18px 0;
}

.auth-shell .card-brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.auth-shell .card-brand span {
    font-size: 25px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.auth-shell .card-brand span b {
    color: inherit;
}

/* لوگوی هدر هم‌اندازه‌ی لوگوی صفحه‌ی لندینگ */
header .brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

header .brand span {
    font-size: 25px;
    font-weight: 800;
    white-space: nowrap;
}

/* تنظیم اندازه در موبایل */
@media (max-width: 600px) {
    .auth-shell .card-brand {
        transform: scale(1.15);
        transform-origin: right center;
        margin-bottom: 14px;
    }

    .auth-shell .card-brand img,
    header .brand img {
        width: 48px;
        height: 48px;
    }

    .auth-shell .card-brand span,
    header .brand span {
        font-size: 21px;
    }
}
/* حالت ورود: خلوت، متمرکز و هم‌هویت با لندینگ */
body.login-mode .story {
    display: none;
}

body.login-mode .auth-shell {
    grid-template-columns: minmax(320px, 450px);
    justify-content: center;
    min-height: calc(100vh - 90px);
    padding-top: 20px;
}

body.login-mode .card-wrap {
    width: 100%;
}

body.login-mode .card {
    padding: 38px 34px;
}

body.login-mode .card-head {
    display: block;
    text-align: center;
}

body.login-mode .card-brand {
    margin: 0 auto 26px;
    transform-origin: center;
}

body.login-mode .card-head h2 {
    font-size: 24px;
}

body.login-mode .bottom {
    margin-top: 18px;
}

@media (max-width: 500px) {
    body.login-mode .auth-shell { min-height: calc(100vh - 75px); }
    body.login-mode .card { padding: 30px 20px; }
}

/* فیلدهای نئونی ویژه */
.field { position: relative; margin: 22px 0; }
.field > label, .label-row { display:block; color:#b8c7dc; letter-spacing:.1px; transition:.25s; }
.field:focus-within > label, .field:focus-within .label-row { color:var(--cyan); text-shadow:0 0 14px #00eaff66; }
.input {
  position:relative; height:56px; margin-top:9px; padding:0 16px;
  border:1px solid #30445f; border-radius:15px;
  background:linear-gradient(120deg,#0b1424d9,#101528c7);
  box-shadow:inset 0 1px #ffffff0b, 0 8px 25px #0003;
  overflow:hidden; transition:border-color .3s, box-shadow .3s, transform .3s;
}
.input::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:0; background:linear-gradient(110deg,transparent 20%,#00eaff12 50%,transparent 80%); transform:translateX(-100%); transition:.5s; }
.input:hover { border-color:#49688d; transform:translateY(-1px); }
.input:hover::before, .input:focus-within::before { opacity:1; transform:translateX(100%); }
.input:focus-within { border-color:var(--cyan); box-shadow:0 0 0 1px #00eaff55, 0 0 26px #00eaff1c, inset 0 1px #ffffff12; }
.input > span { position:relative; z-index:1; width:25px; height:25px; display:grid; place-items:center; color:#7890b0; transition:.3s; }
.input:focus-within > span { color:var(--cyan); filter:drop-shadow(0 0 7px #00eaff); transform:scale(1.1); }
.input input { position:relative; z-index:1; height:100%; font-size:13px; }
.input input::placeholder { color:#667994; transition:.25s; }
.input input:focus::placeholder { color:#839bb9; transform:translateX(-3px); }
.input input:-webkit-autofill { -webkit-text-fill-color:#fff; box-shadow:0 0 0 100px #0d1526 inset; }
.input button { position:relative; z-index:2; width:28px; height:28px; border-radius:8px; transition:.25s; }
.input button:hover { color:var(--cyan); background:#00eaff12; box-shadow:0 0 14px #00eaff20; }
.strength { margin-top:9px; padding:0 3px; }
.strength i { height:4px; box-shadow:0 0 8px #00eaff18; }
.submit { border-radius:15px; position:relative; overflow:hidden; letter-spacing:.2px; }
.submit::after { content:""; position:absolute; inset:0; background:linear-gradient(110deg,transparent,#ffffff30,transparent); transform:translateX(-120%); transition:.6s; }
.submit:hover::after { transform:translateX(120%); }


/* ===== اصلاح صفحه‌ی ثبت‌نام ===== */
/* لوگوی سایت کنار «به جمع ما خوش اومدی» بماند؛ متن Code Load که روی عنوان می‌افتاد حذف شد */
body.signup .auth-shell .card-brand { display: inline-flex !important; transform: none; margin: 0; }
body.signup .auth-shell .card-brand img { width: 82px; height: 82px; }
body.signup .auth-shell .card-brand span { display: none; }
body.signup .auth-shell .card-head { gap: 14px; align-items: center; }
/* یکسان‌سازی فاصله‌ی فیلدها (حذف فاصله‌ی اضافه‌ی وسط) */
.field { margin: 16px 0 !important; }
.uname-status { min-height: 0; margin-top: 3px; }
.uname-status:empty { display: none; margin: 0; }
