:root {
    /* متغیرهای حالت روشن (Light Mode) */
    --primary: #0095f6;
    --primary-hover: #0077c8;
    --danger: #ed4956;
    --bg-main: #fafafa;
    --bg-box: #ffffff;
    --text-main: #262626;
    --text-muted: #8e8e8e;
    --border-color: #dbdbdb;
    --input-bg: #fafafa;
    --footer-bg-hover: rgba(0, 0, 0, 0.05); /* برای دکمه‌های فوتر موبایل */
}

/* اعمال دارک‌مود به صورت خودکار (اگر سیستم روی دارک باشد و کاربر تم لایت را اجبار نکرده باشد) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-main: #121212;
        --bg-box: #1e1e1e;
        --text-main: #f5f5f5;
        --text-muted: #a8a8a8;
        --border-color: #363636;
        --input-bg: #2a2a2a;
        --footer-bg-hover: rgba(255, 255, 255, 0.1);
    }
}

/* اعمال دارک‌مود به صورت دستی (زمانی که در تگ html ویژگی data-theme="dark" ست شود) */
:root[data-theme="dark"] {
    --bg-main: #121212;
    --bg-box: #1e1e1e;
    --text-main: #f5f5f5;
    --text-muted: #a8a8a8;
    --border-color: #363636;
    --input-bg: #2a2a2a;
    --footer-bg-hover: rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease; /* انیمیشن نرم هنگام تغییر تم */
}

.main {
    display: flex;
    min-height: 10vh;
}

.form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* تنظیمات اصلی باکس ولکام */
.welcome-side {
    flex: 1.2;
    /* گرادیانت عمیق‌تر و جذاب‌تر */
    background: linear-gradient(135deg, #0078d4, #004b87); 
    color: white;
    margin:40px;
        border-radius: 8px;

    display: flex;
    flex-direction: column; /* چیدمان عمودی برای کنترل بهتر عناصر */
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.1); /* سایه داخلی ملایم */
        height: calc(100vh - 60px); 

}

/* افکت نوری (Glow) ملایم در پس‌زمینه برای حالت مدرن‌تر */
.welcome-side::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* --- تنظیمات برای محتوای داخل باکس ولکام (فرض بر این است که از تگ‌های استاندارد استفاده کرده‌اید) --- */

/* استایل عنوان اصلی (h1 یا h2) */
.welcome-side h1, 
.welcome-side h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* سایه متن برای خوانایی بهتر */
    z-index: 1; /* برای قرار گرفتن روی افکت نوری */
}

/* استایل متن توضیحات زیر عنوان */
.welcome-side > p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.9;
    z-index: 1;
}

/* اگر ویژگی‌ها را داخل تگ ul و li گذاشته‌اید، این استایل عالی می‌شود */
.welcome-side ul {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    text-align: right; /* راست‌چین کردن لیست */
    display: inline-block; 
    z-index: 1;
}

.welcome-side li {
    margin-bottom: 15px;
    font-size: 1.05rem;
    position: relative;
    padding-right: 25px; /* فضای خالی برای تیک */
    opacity: 0.95;
}

/* اضافه کردن یک تیک سفارشی کنار هر آیتم */
.welcome-side li::before {
    content: '✓'; 
    position: absolute;
    right: 0;
    color: #66c2ff; /* رنگ آبی روشن برای تیک‌ها */
    font-weight: bold;
    font-size: 1.2rem;
}


.box {
    background: var(--bg-box);
    border: 1px solid var(--border-color);
    padding: 40px;
    width: 100%;
    max-width: 380px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    filter: drop-shadow(0px 0px 2px rgba(255, 255, 255, 0.8));

}

/* اگر لوگو در دارک مود ناخوانا می‌شود، می‌توانید با این کد به آن پس‌زمینه سفید بدهید */
@media (prefers-color-scheme: dark) {
    .box img[alt="eShopping.center"] {
        background: white;
        padding: 10px;
        border-radius: 8px;
    }
}

input, button {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 4px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-main);
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* تنظیم رنگ placeholder برای دارک مود */
input::placeholder {
    color: var(--text-muted);
}

button {
    background: var(--primary);
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: var(--primary-hover);
}

.error {
    background: rgba(237, 73, 86, 0.1); /* بکگراند ارور شفاف‌تر تا در دارک‌مود هم خوب دیده شود */
    color: var(--danger);
    border: 1px solid rgba(237, 73, 86, 0.3);
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
}

.switch-link {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.switch-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}



.features {
    text-align: start; /* هوشمند: در فارسی راست‌چین و در انگلیسی چپ‌چین می‌شود */
    max-width: 500px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.features li {
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .main {
        flex-direction: column;
    }
    
    .welcome-side {
        display: none;
    }
    
    .form-side {
        padding: 20px 15px;
    }
    
    .box {
        max-width: 100%;
        padding: 30px 20px;
    }
}
.lang-switcher {
    display: flex; /* این خط اصلاح شد */
    justify-content: flex-end; 
    margin-bottom: 20px;
    width: 100%; /* این خط اضافه شد تا حتما جابجایی کار کند */
}

.lang-switcher select {
    padding: 6px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    background-color: var(--bg-box);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    appearance: none; 
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 1em;
}

html[dir="rtl"] .lang-switcher select {
    background-position: left 10px center;
    padding-left: 30px;
    padding-right: 12px;
}

html[dir="ltr"] .lang-switcher select {
    background-position: right 10px center;
    padding-right: 30px;
    padding-left: 12px;
}

.lang-switcher select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.lang-switcher select:hover {
    border-color: #aaa;
}
.esc-footer-wrapper {
    text-align: center;
    padding: 20px 10px;
    margin-top: auto; /* برای چسبیدن فوتر به پایین در صورت کم بودن محتوا */
    width: 100%;
    box-sizing: border-box;
    clear: both;
}

.esc-footer-nav-links {
    display: flex;
    flex-wrap: wrap; /* این خط از فشرده شدن لینک‌ها جلوگیری می‌کند */
    justify-content: center;
    align-items: center;
    gap: 15px; /* فاصله کمی بیشتر شد تا زیباتر شود */
    margin-bottom: 15px;
}

.esc-footer-nav-links a {
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.esc-footer-nav-links a:hover {
    opacity: 0.8;
}

.esc-footer-separator {
    color: var(--text-muted);
}

.esc-footer-copy-text {
    font-size: 14px;
    color: var(--text-muted);
}

/* استایل رسپانسیو برای موبایل */
@media (max-width: 768px) {
    .esc-footer-nav-links {
        gap: 10px;
    }

    .esc-footer-wrapper a {
        padding: 6px 12px;
        background: var(--footer-bg-hover, rgba(128,128,128,0.1)); /* یک پس‌زمینه پیش‌فرض هم اضافه شد */
        border-radius: 6px;
        font-size: 13px;
        white-space: nowrap;
    }

    .esc-footer-separator {
        display: none !important; 
    }
}

/* رفع مشکل سفید شدن پس‌زمینه اینپوت‌ها هنگام Autofill در دارک‌مود */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--input-bg) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}
