/* ===== Dima Admin - Login Dark Theme ===== */
@import url('vazir.css');

:root {
    --dima-login-bg: #0a0e27;
    --dima-login-bg-gradient: linear-gradient(135deg, #0a0e27 0%, #1a1f45 50%, #0a0e27 100%);
    --dima-login-card: rgba(20, 25, 60, 0.75);
    --dima-login-border: rgba(139, 146, 184, 0.15);
    --dima-login-text: #e6e9ff;
    --dima-login-text-secondary: #8b92b8;
    --dima-login-accent-blue: #3b82f6;
    --dima-login-accent-purple: #a855f7;
    --dima-login-accent-cyan: #06b6d4;
    --dima-login-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

body.login {
    background: var(--dima-login-bg-gradient) !important;
    font-family: 'Vazir', 'Segoe UI', Tahoma, sans-serif !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* پس‌زمینه متحرک */
body.login::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    animation: dimaLoginBg 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes dimaLoginBg {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* ذرات شناور */
body.login::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 33% 80%, rgba(255,255,255,0.2), transparent);
    background-size: 200% 200%;
    animation: dimaLoginStars 15s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes dimaLoginStars {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 200%; }
}

/* کانتینر لاگین */
#login {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    z-index: 1;
    position: relative;
}

/* لوگو */
.login h1 {
    margin-bottom: 30px;
    text-align: center;
}
.login h1 a {
    background-image: url('../img/logo.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto !important;
    display: block;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
    transition: transform 0.3s ease;
}
.login h1 a:hover {
    transform: scale(1.1) rotate(5deg);
}

/* فرم لاگین */
.login form {
    background: var(--dima-login-card) !important;
    border: 1px solid var(--dima-login-border) !important;
    border-radius: 20px !important;
    padding: 35px 30px !important;
    box-shadow: var(--dima-login-shadow) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: dimaLoginFadeIn 0.6s ease-out;
}

@keyframes dimaLoginFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login form .input {
    background: rgba(10, 14, 39, 0.6) !important;
    border: 1px solid var(--dima-login-border) !important;
    border-radius: 10px !important;
    color: var(--dima-login-text) !important;
    font-size: 15px !important;
    padding: 14px 16px !important;
    height: auto !important;
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif !important;
}
.login form .input:focus {
    border-color: var(--dima-login-accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
    background: rgba(10, 14, 39, 0.8) !important;
}
.login form .input::placeholder {
    color: var(--dima-login-text-secondary) !important;
}

.login form label {
    color: var(--dima-login-text-secondary) !important;
    font-size: 14px !important;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

/* دکمه ورود */
.login .button-primary {
    background: linear-gradient(135deg, var(--dima-login-accent-blue), var(--dima-login-accent-purple)) !important;
    border: none !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    padding: 14px !important;
    width: 100% !important;
    height: auto !important;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4) !important;
    transition: all 0.3s ease !important;
    font-family: 'Vazir', sans-serif !important;
    margin-top: 10px;
}
.login .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.6) !important;
}
.login .button-primary:active {
    transform: translateY(0);
}

/* لینک‌های پایین فرم */
.login #nav, .login #backtoblog {
    text-align: center;
    margin-top: 20px;
    padding: 0;
}
.login #nav a, .login #backtoblog a {
    color: var(--dima-login-text-secondary) !important;
    font-size: 14px !important;
    text-decoration: none;
    transition: color 0.2s ease;
    font-family: 'Vazir', sans-serif !important;
}
.login #nav a:hover, .login #backtoblog a:hover {
    color: var(--dima-login-accent-blue) !important;
}

/* پیام خطا */
.login #login_error, .login .message, .login .success {
    background: var(--dima-login-card) !important;
    border: 1px solid var(--dima-login-border) !important;
    border-radius: 10px !important;
    border-right: 4px solid var(--dima-login-accent-blue) !important;
    color: var(--dima-login-text) !important;
    padding: 14px 18px !important;
    margin-bottom: 20px !important;
    backdrop-filter: blur(10px);
    font-family: 'Vazir', sans-serif !important;
}
.login #login_error {
    border-right-color: #ef4444 !important;
}
.login .success {
    border-right-color: #10b981 !important;
}
.login #login_error strong, .login .message strong {
    color: var(--dima-login-text) !important;
}

/* Checkbox مرا به خاطر بسپار */
.login form .forgetmenot {
    color: var(--dima-login-text-secondary) !important;
    font-size: 14px;
}
.login form .forgetmenot label {
    color: var(--dima-login-text-secondary) !important;
    cursor: pointer;
}
.login form input[type="checkbox"] {
    accent-color: var(--dima-login-accent-blue) !important;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* زبان */
.login .language-switcher {
    margin-top: 20px;
    text-align: center;
}
.login .language-switcher select {
    background: var(--dima-login-card) !important;
    border: 1px solid var(--dima-login-border) !important;
    border-radius: 8px !important;
    color: var(--dima-login-text) !important;
    padding: 8px 12px !important;
    font-family: 'Vazir', sans-serif !important;
}

/* Footer */
.login #footer {
    color: var(--dima-login-text-secondary) !important;
    font-size: 13px;
    text-align: center;
    margin-top: 30px;
    font-family: 'Vazir', sans-serif !important;
}
.login #footer a {
    color: var(--dima-login-accent-blue) !important;
    text-decoration: none;
}
.login #footer a:hover {
    color: var(--dima-login-accent-cyan) !important;
}

/* Shake animation برای خطا */
@keyframes dimaShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}
.login #login_error {
    animation: dimaShake 0.4s ease-in-out;
}

/* Responsive */
@media (max-width: 480px) {
    .login form {
        padding: 25px 20px !important;
        border-radius: 16px !important;
    }
    #login {
        padding: 15px;
    }
}
