/* ============================================================
   index.css - ورود / ثبت‌نام | Noovin Sms
   ============================================================ */

:root{
    --bg:#080e1d;
    --panel:#0d172b;
    --panel2:#111f38;
    --border:rgba(133,165,220,.13);
    --text:#edf3ff;
    --muted:#8394b5;
    --primary:#6658ff;
    --cyan:#11c9ed;
    --green:#18d6a0;
    --red:#ff5577;
    --radius:20px;
}

*{margin:0;padding:0;box-sizing:border-box}

body{
    background:var(--bg);
    color:var(--text);
    font-family:'Vazirmatn',Tahoma,sans-serif;
    font-size:14px;
    min-height:100vh;
    overflow-x:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:80px 16px 40px;
    position:relative;
    isolation:isolate;
}

body::before{
    content:"";
    position:fixed;inset:0;z-index:-2;
    background:
        radial-gradient(ellipse at 15% 110%, #5e38ff38, transparent 48%),
        radial-gradient(ellipse at 80% 0%, #087bbd25, transparent 45%),
        linear-gradient(110deg,#0d1729,#0a1220 60%,#0b1a30);
}

body::after{
    content:"";
    position:fixed;inset:0;z-index:-1;
    background-image:
        radial-gradient(circle at 20% 30%, #6658ff10 0, transparent 40%),
        radial-gradient(circle at 80% 70%, #11c9ed0c 0, transparent 45%);
    pointer-events:none;
}

#particles{
    position:fixed;inset:0;z-index:-1;
    pointer-events:none;
    opacity:.7;
}

#cursorGlow{
    position:fixed;
    width:300px;height:300px;
    border-radius:50%;
    background:radial-gradient(circle, rgba(102,88,255,.15), transparent 70%);
    pointer-events:none;
    z-index:-1;
    transform:translate(-50%,-50%);
    opacity:0;
    transition:opacity .4s ease;
    will-change:transform;
}
@media (hover:none){
    #cursorGlow{display:none}
}

/* کارت */
.card{
    position:relative;
    width:100%;
    max-width:440px;
    background:rgba(13,23,43,.75);
    backdrop-filter:blur(22px) saturate(1.3);
    -webkit-backdrop-filter:blur(22px) saturate(1.3);
    border:1px solid rgba(133,165,220,.15);
    border-radius:var(--radius);
    padding:34px 30px 26px;
    box-shadow:0 30px 80px -20px rgba(0,0,0,.7),
               inset 0 1px 0 rgba(255,255,255,.03);
    animation:cardIn .55s cubic-bezier(.2,.9,.3,1.1) both;
}
@keyframes cardIn{
    from{opacity:0;transform:translateY(24px) scale(.98)}
    to{opacity:1;transform:translateY(0) scale(1)}
}

.logo-wrap{
    display:flex;flex-direction:column;align-items:center;
    margin-bottom:24px;
}
.logo-box{
    width:64px;height:64px;
    display:grid;place-items:center;
    border-radius:18px;
    background:linear-gradient(140deg,#7665ff,#19c9ed);
    color:#fff;
    font-weight:800;
    font-size:26px;
    box-shadow:0 8px 30px rgba(102,88,255,.35);
    margin-bottom:14px;
}
.logo-wrap h1{
    font-size:20px;font-weight:800;
    letter-spacing:-.3px;
}
.logo-wrap p{
    color:var(--muted);font-size:12px;
    margin-top:5px;
}

/* تب‌ها */
.tabs{
    display:flex;gap:6px;
    padding:5px;
    margin-bottom:22px;
    background:rgba(255,255,255,.03);
    border:1px solid var(--border);
    border-radius:14px;
}
.tab{
    flex:1;
    padding:11px 8px;
    border:0;
    background:transparent;
    color:var(--muted);
    border-radius:10px;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
    transition:.25s ease;
    font-family:inherit;
    display:flex;align-items:center;justify-content:center;gap:6px;
}
.tab:hover{color:#fff;background:rgba(255,255,255,.03)}
.tab.active{
    color:#fff;
    background:linear-gradient(100deg,#6556ff30,#263d7650);
    border:1px solid #6b61ff40;
    box-shadow:0 2px 12px rgba(102,88,255,.15);
}

.tab-pane{display:none;animation:fadeIn .3s ease}
.tab-pane.active{display:block}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}

/* فرم */
form{width:100%}

.form-group{margin-bottom:14px}
.form-group label{
    display:block;
    font-size:12px;
    font-weight:600;
    color:#b8c2dc;
    margin-bottom:7px;
}
.input-wrap{position:relative}
.input-wrap input{
    width:100%;
    padding:13px 15px;
    background:rgba(255,255,255,.035);
    border:1px solid var(--border);
    border-radius:12px;
    color:var(--text);
    font-family:inherit;
    font-size:14px;
    transition:.2s ease;
}
.input-wrap input:focus{
    outline:0;
    border-color:#6658ff80;
    background:rgba(255,255,255,.06);
    box-shadow:0 0 0 4px rgba(102,88,255,.12);
}
.input-wrap input::placeholder{color:#5a6b8a}

/* autofill هم‌رنگ */
.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover,
.input-wrap input:-webkit-autofill:focus{
    -webkit-box-shadow: 0 0 0 1000px #0f1b32 inset !important;
    -webkit-text-fill-color: #edf3ff !important;
    transition: background-color 5000s ease-in-out 0s;
    caret-color: #edf3ff;
}

.input-group{display:flex;gap:8px;align-items:stretch}
.input-group .input-wrap{flex:1}
.input-group .btn-ghost{
    padding:0 16px;
    flex-shrink:0;
    background:rgba(102,88,255,.12);
    border:1px solid #6658ff40;
    color:#b0a8ff;
    border-radius:12px;
    font-family:inherit;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
    transition:.2s ease;
}
.input-group .btn-ghost:hover{
    background:rgba(102,88,255,.2);
    border-color:#6658ff80;
    color:#fff;
}

/* دکمه‌ها */
.btn{
    width:100%;
    padding:13px 18px;
    border:0;
    border-radius:12px;
    font-family:inherit;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
    transition:.2s ease;
    display:flex;align-items:center;justify-content:center;gap:8px;
}
.btn-primary{
    background:linear-gradient(110deg,#7257ff,#4b63ff);
    color:#fff;
    box-shadow:0 8px 25px rgba(102,88,255,.25);
}
.btn-primary:hover:not(:disabled){
    filter:brightness(1.1);
    box-shadow:0 10px 30px rgba(102,88,255,.4);
    transform:translateY(-1px);
}
.btn-primary:disabled{opacity:.55;cursor:not-allowed}
.btn-success{
    background:linear-gradient(110deg,#12b788,#18d6a0);
    color:#04241a;
    box-shadow:0 8px 25px rgba(24,214,160,.25);
}
.btn-success:hover:not(:disabled){
    filter:brightness(1.07);
    transform:translateY(-1px);
}
.btn-success:disabled{opacity:.55;cursor:not-allowed}
.btn-secondary{
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.12);
    color:#dce5ff;
}
.btn-secondary:hover{background:rgba(255,255,255,.08)}

/* لینک فراموشی */
.btn-forgot{
    display:block;
    width:100%;
    margin-top:14px;
    padding:6px;
    background:none;
    border:0;
    color:#a9a0ff;
    font-family:inherit;
    font-size:12px;
    cursor:pointer;
    transition:.2s ease;
}
.btn-forgot:hover{color:#fff;text-decoration:underline}

/* هشدارها */
.alert{
    padding:11px 14px;
    border-radius:11px;
    font-size:12.5px;
    margin-bottom:12px;
    border:1px solid;
    line-height:1.7;
    display:none;
}
.alert.show{display:block;animation:shakeIn .3s ease}
.alert.show-inline{display:block;margin-bottom:14px}
@keyframes shakeIn{
    0%{transform:translateX(-4px)}
    50%{transform:translateX(4px)}
    100%{transform:translateX(0)}
}
.alert-danger{
    background:rgba(255,85,119,.08);
    border-color:rgba(255,85,119,.25);
    color:#ff8ba3;
}
.alert-success{
    background:rgba(24,214,160,.08);
    border-color:rgba(24,214,160,.25);
    color:#4ee0b5;
}
.alert-info{
    background:rgba(17,201,237,.08);
    border-color:rgba(17,201,237,.25);
    color:#5edaf3;
}

/* کد ۴ رقمی */
.code-boxes{
    display:flex;
    gap:10px;
    justify-content:center;
    direction:ltr;
    margin:6px 0 16px;
}
.code-boxes input{
    width:56px;height:62px;
    text-align:center;
    font-size:24px;
    font-weight:800;
    background:rgba(255,255,255,.04);
    border:1.5px solid var(--border);
    border-radius:14px;
    color:var(--text);
    font-family:inherit;
    transition:.2s ease;
}
.code-boxes input:focus{
    outline:0;
    border-color:#6658ff80;
    background:rgba(102,88,255,.1);
    box-shadow:0 0 0 4px rgba(102,88,255,.15);
}
.code-boxes input.filled{
    border-color:#6658ff90;
    background:rgba(102,88,255,.1);
}

/* تایمر */
.timer-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin-bottom:16px;
    font-size:12px;
}
.timer-row .time{color:var(--muted);font-variant-numeric:tabular-nums}
.resend-btn{
    background:none;
    border:0;
    color:#a9a0ff;
    font-family:inherit;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
    padding:4px 0;
}
.resend-btn:hover:not(:disabled){color:#fff;text-decoration:underline}
.resend-btn:disabled{opacity:.4;cursor:not-allowed;text-decoration:none}

/* شماره */
.phone-display{
    text-align:center;
    color:var(--muted);
    font-size:12.5px;
    margin-bottom:14px;
    line-height:1.8;
}
.phone-display strong{
    color:var(--text);
    font-weight:700;
}
.vip-badge{
    display:inline-block;
    background:linear-gradient(110deg,#12b788,#18d6a0);
    color:#04241a;
    padding:3px 10px;
    border-radius:20px;
    font-size:10px;
    font-weight:800;
    margin-right:6px;
    vertical-align:middle;
}

.masked-phone{
    font-family: monospace;
    direction: ltr;
    display: inline-block;
    color: #fff;
    letter-spacing: 1px;
}

/* username check */
.username-check{
    font-size:11.5px;
    margin-top:6px;
    min-height:16px;
    line-height:1.6;
}
.username-check .valid{color:#4ee0b5}
.username-check .invalid{color:#ff8ba3}
.username-check .checking{color:#5edaf3}

/* info box */
.info-box{
    background:rgba(102,88,255,.06);
    border:1px solid rgba(102,88,255,.2);
    border-radius:12px;
    padding:13px 15px;
    margin-bottom:16px;
    font-size:12.5px;
    line-height:1.9;
    color:#c3cce4;
    text-align:center;
}
.info-box strong{color:#fff}

/* footer */
.foot{
    margin-top:20px;
    text-align:center;
    color:#5a6b8a;
    font-size:11px;
    line-height:1.8;
}

/* اسپینر */
.spinner{
    width:14px;height:14px;
    border:2px solid rgba(255,255,255,.3);
    border-top-color:#fff;
    border-radius:50%;
    animation:spin .7s linear infinite;
    display:inline-block;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* مودال */
.modal-overlay{
    position:fixed;inset:0;z-index:200;
    display:none;
    align-items:center;justify-content:center;
    padding:16px;
    background:rgba(0,0,0,.7);
    backdrop-filter:blur(6px);
}
.modal-overlay.active{display:flex;animation:fadeIn .2s ease}

.modal{
    width:100%;max-width:440px;
    padding:22px;border-radius:18px;
    background:linear-gradient(160deg,#101c32,#0c1628);
    border:1px solid var(--border);
    box-shadow:0 30px 80px -20px rgba(0,0,0,.8);
    animation:modalIn .25s ease;
    max-height:90vh;
    overflow-y:auto;
}
@keyframes modalIn{
    from{opacity:0;transform:translateY(15px) scale(.97)}
    to{opacity:1;transform:translateY(0) scale(1)}
}
.modal-head{
    display:flex;justify-content:space-between;align-items:center;
    gap:12px;padding-bottom:14px;margin-bottom:16px;
    border-bottom:1px solid var(--border);
}
.modal-head h3{font-size:14px;font-weight:800}
.modal-close{
    background:none;border:0;
    color:var(--muted);font-size:22px;line-height:1;
    padding:0 6px;
    font-family:inherit;
    cursor:pointer;
}
.modal-close:hover{color:#ff8ba3}
.modal-actions{display:flex;gap:8px;margin-top:18px}
.modal-actions .btn{flex:1}

/* ریسپانسیو */
@media (max-width:420px){
    body{padding:60px 12px 30px}
    .card{padding:26px 20px 22px;border-radius:16px}
    .code-boxes input{width:48px;height:54px;font-size:20px}
    .logo-box{width:56px;height:56px;font-size:22px}
    .logo-wrap h1{font-size:18px}
    .modal-actions{flex-direction:column}
    .modal-actions .btn{width:100%}
}

@media (prefers-reduced-motion:reduce){
    *{animation-duration:.01ms !important;transition-duration:.01ms !important}
}