/* =========================================================
   Ultimate SMS Vira Login Form - Premium Edition
   طراحی فوق‌حرفه‌ای با افکت‌های گلس‌مورفیسم و نئونی
========================================================= */

/* تعریف متغیرهای رنگی برای تغییر آسان (رنگ اصلی: نارنجی AllEscape) */
.svsms-login-wrapper {
    --primary-color: #ff5a00;         /* رنگ اصلی */
    --primary-gradient: linear-gradient(135deg, #ff7b00 0%, #ff5a00 100%);
    --glow-color: rgba(255, 90, 0, 0.4);
    --bg-glass: rgba(26, 26, 32, 0.75); /* پس‌زمینه شیشه‌ای تیره */
    --bg-input: rgba(15, 15, 18, 0.8);  /* پس‌زمینه فیلدها */
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: #9ba1a6;
    
    max-width: 420px;
    margin: 60px auto;
    padding: 40px 35px;
    background: var(--bg-glass);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px); /* افکت محوی پس‌زمینه (گلس‌مورفیسم) */
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-main);
    text-align: center;
    font-family: inherit;
    direction: rtl;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    animation: formAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* انیمیشن لود شدن فرم (ورود نرم به صفحه) */
@keyframes formAppear {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* افکت نور پس‌زمینه محو در بالای فرم */
.svsms-login-wrapper::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 100px;
    background: var(--primary-color);
    filter: blur(80px);
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}

/* عناوین */
.svsms-step h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to left, #ffffff, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* متن‌های راهنما */
.svsms-step p {
    color: var(--text-muted) !important;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* =========================================================
   فیلدهای ورودی (Inputs) - طراحی مدرن
========================================================= */
.svsms-login-wrapper input[type="tel"],
.svsms-login-wrapper input[type="text"] {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 20px;
    background: var(--bg-input);
    border: 1.5px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* افکت فوکوس روی فیلدها (درخشش نئونی) */
.svsms-login-wrapper input[type="tel"]:focus,
.svsms-login-wrapper input[type="text"]:focus {
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(255, 90, 0, 0.15), inset 0 0 10px rgba(255, 90, 0, 0.05);
    transform: translateY(-2px);
}


/* =========================================================
   استایل‌های اختصاصی 4 کادر OTP (رفع تداخل با استایل‌های عمومی)
========================================================= */
.svsms-otp-container {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    gap: 12px !important;
    margin-bottom: 25px !important;
    direction: ltr !important;
    width: 100% !important;
}

/* انتخابگر قوی‌تر برای جلوگیری از عرض 100 درصدی */
.svsms-login-wrapper input.svsms-otp-box {
    width: 60px !important;
    height: 65px !important;
    margin-bottom: 0 !important; /* خنثی کردن فاصله از پایین فیلدهای متنی */
    padding: 0 !important;
    background: var(--bg-input) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 14px !important;
    color: var(--primary-color) !important;
    font-size: 26px !important;
    font-weight: 900 !important;
    font-family: monospace, sans-serif !important;
    text-align: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.svsms-login-wrapper input.svsms-otp-box:focus {
    border-color: var(--primary-color) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    box-shadow: 0 0 0 4px rgba(255, 90, 0, 0.15), inset 0 0 10px rgba(255, 90, 0, 0.05) !important;
    transform: translateY(-2px) !important;
    outline: none !important;
}

/* انیمیشن لرزش هنگام ورود کد اشتباه */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.shake {
    animation: shake 0.3s ease-in-out 0s 2;
}

/* =========================================================
   دکمه اصلی (Call to Action) - افکت 3D و Glow
========================================================= */
.svsms-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px var(--glow-color);
    position: relative;
    overflow: hidden;
}

/* افکت موج (Ripple) ظریف روی دکمه */
.svsms-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
}

.svsms-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(255, 90, 0, 0.5);
}

.svsms-btn:hover::after {
    left: 150%;
}

.svsms-btn:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px var(--glow-color);
}

.svsms-btn:disabled {
    background: #333333 !important;
    color: #777777 !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed;
}

/* =========================================================
   باکس‌های پیام (Error / Success) - استایل شیشه‌ای
========================================================= */
.svsms-message {
    margin-top: 20px;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    display: none;
    backdrop-filter: blur(10px);
    animation: messageSlideDown 0.3s ease forwards;
}

@keyframes messageSlideDown {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.svsms-message.error, 
.svsms-message.success {
    display: block;
}

.svsms-message.error {
    color: #ff4a4a;
    background: rgba(255, 74, 74, 0.1);
    border: 1px solid rgba(255, 74, 74, 0.2);
    box-shadow: 0 4px 15px rgba(255, 74, 74, 0.1);
}

.svsms-message.success {
    color: #2ed573;
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid rgba(46, 213, 115, 0.2);
    box-shadow: 0 4px 15px rgba(46, 213, 115, 0.1);
}

/* =========================================================
   لینک‌ها و تایمر
========================================================= */
.svsms-resend-wrapper {
    margin-top: 20px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.svsms-login-wrapper a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px dashed transparent;
}

.svsms-login-wrapper a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* باکس زیبای تایمر */
#svsms-timer-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 90, 0, 0.08);
    border-radius: 20px;
    border: 1px solid rgba(255, 90, 0, 0.2);
}

#svsms-timer-countdown {
    color: var(--primary-color);
    font-family: monospace;
    font-size: 15px;
    font-weight: bold;
}

/* =========================================================
   بخش اصلاح شده: هدر فرم (لوگو و دکمه بازگشت)
========================================================= */
.svsms-form-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px; /* افزایش فاصله پایین هدر با عنوان ورود */
    position: relative;
    width: 100%;
}

.svsms-back-home-btn {
    position: absolute;
    right: 0;
    top: -10px; /* هدایت دکمه به سمت بالاتر برای ایجاد فضای بیشتر */
    font-size: 12px;
    color: var(--text-muted) !important;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none !important;
    background: rgba(255, 255, 255, 0.04);
    padding: 5px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
    z-index: 10;
    width: 100%;
}

.svsms-back-home-btn:hover {
    color: var(--text-main) !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-3px);
}

.svsms-site-logo {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
    margin-top: 40px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}
