/* ===== Reset & Base ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    overflow: hidden;
    background: linear-gradient(-45deg, #0f0c29, #302b63, #24243e, #1a1a2e);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== Particles ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    bottom: -10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) translateX(50px) scale(0.3);
        opacity: 0;
    }
}

/* ===== Login Wrapper ===== */
.login-wrapper {
    position: relative;
    z-index: 1;
    animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== Glass Card ===== */
.login-container {
    width: 420px;
    max-width: 92vw;
    padding: 44px 38px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #fff;
}

/* ===== Logo Section ===== */
.logo-section {
    margin-bottom: 30px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

.login-container h2 {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

/* ===== Error Message ===== */
.error-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff8a98;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    text-align: right;
    backdrop-filter: blur(10px);
    animation: shakeError 0.5s ease;
}

.error-msg a {
    color: #ff8a98;
    text-decoration: underline;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-8px); }
    40%      { transform: translateX(8px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* ===== Input Groups ===== */
.input-group {
    position: relative;
    margin-bottom: 18px;
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.35);
    font-size: 15px;
    transition: color 0.3s;
    z-index: 2;
    pointer-events: none;
}

.input-group.focused .input-icon {
    color: #667eea;
}

.input-field {
    width: 100%;
    padding: 14px 46px 14px 46px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    font-size: 14px;
    font-family: 'Tahoma', Arial, sans-serif;
    color: #fff;
    direction: rtl;
    transition: all 0.3s ease;
    outline: none;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.input-field:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.input-line {
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-group.focused .input-line {
    right: 10%;
    width: 80%;
}

/* ===== Toggle Password ===== */
.toggle-password {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.35);
    font-size: 15px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    z-index: 2;
    border-radius: 8px;
}

.toggle-password:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* ===== Form Options ===== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 12.5px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.remember-me input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
}
.input-icon-svg {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.35);
    z-index: 2;
    pointer-events: none;
    transition: color 0.3s;
}

.input-group.focused .input-icon-svg {
    color: #667eea;
}

.remember-me input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: #fff;
    font-size: 11px;
    font-weight: bold;
}

.forgot-link {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: #667eea;
}

/* ===== Login Button ===== */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 16px;
    font-family: 'Tahoma', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.45);
}

.login-btn:active {
    transform: translateY(0);
}

.btn-icon {
    transition: transform 0.3s;
}

.login-btn:hover .btn-icon {
    transform: translateX(-4px);
}

/* ===== Divider ===== */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12.5px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.divider span {
    padding: 0 14px;
}
/* -------- Toggle Password Button -------- */
.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.toggle-password:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toggle-password:hover svg {
    stroke: rgba(255, 255, 255, 0.9);
}

.toggle-password svg {
    transition: stroke 0.3s ease;
}

/* فیلد پسورد - فاصله برای دکمه چشم */
.input-group:has(.toggle-password) input {
    padding-left: 45px;
}

/* ===== Google Button ===== */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #fff;
    font-size: 14px;
    font-family: 'Tahoma', Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.google-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.google-logo {
    flex-shrink: 0;
}

/* ===== Register Link ===== */
.register-link {
    margin-top: 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
}

.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.register-link a:hover {
    color: #8b9ff5;
    text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .login-container {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
        border-radius: 16px;
    }

    .login-container h2 {
        font-size: 19px;
    }

    .input-field {
        padding: 12px 40px 12px 40px;
        font-size: 13px;
    }

    .form-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 28px 18px;
    }
}
.sms-login-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sms-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.sms-login-btn .btn-icon-left {
    order: -1;
}

.sms-login-btn .btn-icon-right {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.sms-login-btn:hover .btn-icon-right {
    transform: translateX(-4px);
}
