* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

html {
    overflow-x: hidden;
    overflow-y: hidden;
}/* ==================== RESET & BASE ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-primary: 'Vazirmatn', sans-serif;
    --color-bg: #f8fafc;
    --color-surface: rgba(255, 255, 255, 0.9);
    --color-border: rgba(0, 0, 0, 0.08);
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-primary: #1a73e8;
    --color-primary-light: #4a8df0;
    --color-error: #d93025;
    --color-success: #0d904f;
    --radius-lg: 2rem;
    --radius-md: 1rem;
    --radius-sm: 0.75rem;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    overflow: hidden;
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg);
    font-family: var(--font-primary);
    color: var(--color-text);
    padding: clamp(1rem, 5vw, 2rem);
    position: relative;
    overflow: hidden;
}

/* ==================== BACKGROUND DECOR ==================== */
.bg-decor {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(26, 115, 232, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(13, 144, 79, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(138, 43, 226, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.bg-decor::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26, 115, 232, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    animation: float 20s infinite alternate ease-in-out;
}

.bg-decor::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(13, 144, 79, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    animation: float 25s infinite alternate-reverse ease-in-out;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -30px) scale(1.1); }
}

/* ==================== LOGIN CONTAINER ==================== */
.login-container {
    width: 100%;
    max-width: 440px;
    z-index: 10;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== LOGIN CARD ==================== */
.login-card {
    background: var(--color-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 6vw, 3rem);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

/* نوار گرادیانت بالا */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1a73e8, #0d904f, #7c3aed);
    background-size: 200% 100%;
    animation: gradientBar 4s infinite alternate;
}

@keyframes gradientBar {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* ==================== HEADER ==================== */
.card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 1.5rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform var(--transition);
    border: 1px solid var(--color-border);
}

.logo-wrapper:hover {
    transform: scale(1.05);
}

.logo-img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    filter: none;
}

.card-header h1 {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    color: #202124;
}

.subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* ==================== INPUT FIELDS ==================== */
.input-field {
    position: relative;
    margin-bottom: 1.8rem;
}

.input-animated {
    width: 100%;
    height: 56px;
    padding: 0 3rem 0 1rem;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: #202124;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    outline: none;
    transition: all var(--transition);
    direction: rtl;
}

.input-animated:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.15);
    border-width: 2px;
}

/* لیبل شناور */
.input-animated + label {
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: all var(--transition);
    background: transparent;
    padding: 0 0.25rem;
}

.input-animated:focus + label,
.input-animated:not(:placeholder-shown) + label {
    top: -0.6rem;
    right: 0.75rem;
    font-size: 0.75rem;
    color: var(--color-primary);
    background: #fff;
    padding: 0 0.5rem;
    border-radius: 4px;
}

/* آیکون داخل اینپوت */
.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: var(--color-text-muted);
    transition: color var(--transition);
    pointer-events: none;
}

.input-animated:focus ~ .input-icon {
    color: var(--color-primary);
}

.input-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

/* دکمه نمایش/مخفی رمز */
.toggle-password {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    z-index: 2;
    padding: 0;
    transition: color var(--transition);
}

.toggle-password:hover {
    color: var(--color-primary);
}

.toggle-password .eye-closed {
    display: none;
}

.toggle-password.visible .eye-open {
    display: none;
}

.toggle-password.visible .eye-closed {
    display: block;
}

.toggle-password svg {
    width: 100%;
    height: 100%;
}

/* ==================== ERROR MESSAGE ==================== */
.error-message {
    display: none;
    color: var(--color-error);
    font-size: 0.75rem;
    margin-top: 0.4rem;
    padding-right: 0.5rem;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ==================== SUBMIT BUTTON ==================== */
.submit-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 24px; /* دکمه گرد مشابه گوگل */
    background: var(--color-primary);
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-primary);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0.2px;
}

.submit-btn:hover {
    background: #1557b0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.submit-btn:active {
    background: #0d47a1;
    box-shadow: none;
}

/* حالت بارگذاری */
.btn-loader {
    display: none;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

.btn-loader svg {
    width: 100%;
    height: 100%;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.submit-btn.loading .btn-text {
    display: none;
}

.submit-btn.loading .btn-loader {
    display: block;
}

.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #a8c7fa;
}

/* ==================== FOOTER ==================== */
.card-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    padding-top: 1.2rem;
}

.card-footer strong {
    color: #1e293b;
    font-weight: 500;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 1.5rem;
    }
    
    .input-animated {
        height: 52px;
        font-size: 0.9rem;
    }
    
    .submit-btn {
        height: 46px;
        font-size: 0.9rem;
    }
    
    .logo-wrapper {
        width: 65px;
        height: 65px;
    }
}


body {

    min-height: 100vh;

    background:
        radial-gradient(circle at top right, rgba(26, 115, 232, 0.06), transparent 30%),
        radial-gradient(circle at bottom left, rgba(13, 144, 79, 0.05), transparent 30%),
        #f8fafc;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    color: #202124;

    padding: 20px;

    overflow: hidden;

}

/* BACKGROUND */

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .15;
    z-index: 1;
}

.circle1 {
    width: 300px;
    height: 300px;
    background: #1a73e8;
    top: -100px;
    right: -100px;
}

.circle2 {
    width: 250px;
    height: 250px;
    background: #0d904f;
    bottom: -100px;
    left: -100px;
}

/* CONTAINER */

.login-container {
    width: 100%;
    max-width: 430px;
    position: relative;
    z-index: 10;
}

/* LOGIN BOX */

.login-box {

    width: 100%;

    background: rgba(255, 255, 255, 0.95);

    backdrop-filter: blur(18px);

    border: 1px solid #e8eaed;

    border-radius: 28px;

    padding: 40px 32px;

    box-shadow:
        0 1px 2px rgba(0,0,0,0.06),
        0 8px 24px rgba(0,0,0,0.04);

    position: relative;

    overflow: hidden;

}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1a73e8, #0d904f);
}

/* LOGO */

.logo {
    text-align: center;
    margin-bottom: 35px;
}

.logo-icon {

    width: 95px;
    height: 95px;

    margin: auto;
    margin-bottom: 18px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    border: 1px solid #e8eaed;

    box-shadow:
        0 1px 2px rgba(0,0,0,0.05);

}

.logo h1 {
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #202124;
}

.logo p {
    color: #5f6368;
    font-size: 14px;
    line-height: 1.8;
}

/* INPUTS */

.input-group {
    margin-bottom: 22px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    color: #5f6368;
    font-size: 14px;
}

.input-box {
    position: relative;
}

.input-box input {

    width: 100%;
    height: 56px;

    border: none;
    outline: none;

    background: #fff;

    border-radius: 4px;

    padding: 0 55px 0 18px;

    color: #202124;

    font-size: 15px;

    border: 1px solid #dadce0;

    transition: .3s;

}

.input-box input:focus {

    border-color: #1a73e8;
    border-width: 2px;

    box-shadow:
        0 0 0 4px rgba(26, 115, 232, .15);

}

.input-box svg {

    position: absolute;

    right: 18px;
    top: 50%;

    transform: translateY(-50%);

    width: 22px;
    height: 22px;

    fill: #5f6368;

}

/* OPTIONS */

.options {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 25px;

    flex-wrap: wrap;

}

.remember {

    display: flex;
    align-items: center;
    gap: 8px;

    color: #5f6368;
    font-size: 14px;

}

.remember input {
    accent-color: #1a73e8;
}

.forgot {

    color: #1a73e8;
    text-decoration: none;

    font-size: 14px;
    font-weight: 500;

    transition: .3s;

}

.forgot:hover {
    color: #1557b0;
}

/* BUTTON */

.login-btn {

    width: 100%;
    height: 48px;

    border: none;
    border-radius: 24px;

    cursor: pointer;

    color: white;

    font-size: 15px;
    font-weight: 500;

    background: #1a73e8;

    transition: .2s;

    box-shadow: 0 1px 2px rgba(0,0,0,0.1);

}

.login-btn:hover {

    background: #1557b0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);

}

/* FOOTER */

.footer {

    margin-top: 25px;

    text-align: center;

    color: #5f6368;

    font-size: 13px;

    line-height: 1.8;

}

/* TABLET */

@media(max-width:768px) {

    body {
        display: block;
        padding: 20px 14px;
    }

    .login-container {
        max-width: 100%;
        margin: auto;
    }

    .login-box {
        padding: 30px 20px;
        border-radius: 24px;
    }

    .logo {
        margin-bottom: 28px;
    }

    .logo h1 {
        font-size: 24px;
    }

    .logo p {
        font-size: 13px;
    }

    .logo-icon {
        width: 78px;
        height: 78px;
    }

    .logo-icon svg {
        width: 38px;
        height: 38px;
    }

    .input-group {
        margin-bottom: 18px;
    }

    .input-group label {
        font-size: 13px;
    }

    .input-box input {
        height: 52px;
        font-size: 14px;
        padding: 0 50px 0 14px;
    }

    .input-box svg {
        width: 20px;
        height: 20px;
        right: 15px;
    }

    .options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .remember,
    .forgot {
        font-size: 13px;
    }

    .login-btn {
        height: 48px;
        font-size: 14px;
    }

    .footer {
        margin-top: 20px;
        font-size: 12px;
    }

}

/* MOBILE */

@media(max-width:480px) {

    body {
        padding: 14px;
    }

    .login-box {
        padding: 25px 16px;
        border-radius: 20px;
    }

    .logo h1 {
        font-size: 22px;
    }

    .logo p {
        font-size: 12px;
    }

    .logo-icon {
        width: 70px;
        height: 70px;
    }

    .input-box input {
        height: 48px;
        font-size: 13px;
    }

    .login-btn {
        height: 46px;
        font-size: 14px;
    }

}

/* SMALL DEVICES */

@media(max-width:360px) {

    .login-box {
        padding: 22px 14px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo-icon {
        width: 62px;
        height: 62px;
    }

    .input-box input {
        font-size: 12px;
    }

}
/* ==================== OTP STYLES ==================== */
.otp-info {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.otp-info strong {
    color: var(--color-text);
    font-weight: 500;
    direction: ltr;
    display: inline-block;
}

.otp-fields {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    direction: ltr;
}

.otp-digit {
    width: 48px;
    height: 56px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: #202124;
    font-size: 1.4rem;
    font-weight: 400;
    font-family: var(--font-primary);
    text-align: center;
    outline: none;
    transition: all var(--transition);
}

.otp-digit:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.15);
    border-width: 2px;
}

.otp-digit.filled {
    border-color: var(--color-primary);
    background: #e8f0fe;
}

.otp-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.2rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    flex-wrap: wrap;
}

.resend-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition);
}

.resend-btn:hover {
    color: #1557b0;
}

.resend-btn:disabled {
    color: #a8c7fa;
    cursor: not-allowed;
}

.timer {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    direction: ltr;
    display: inline-block;
}

.change-number-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1.2rem;
    padding: 0.8rem;
    background: transparent;
    border: 1px solid #dadce0;
    border-radius: 4px;
    color: var(--color-text-muted);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.change-number-btn:hover {
    background: #f1f3f4;
    border-color: #c4c7c5;
    color: var(--color-text);
}

.change-number-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

#phoneDisplay {
    direction: ltr;
}

/* responsive OTP */
@media (max-width: 480px) {
    .otp-fields {
        gap: 8px;
    }
    
    .otp-digit {
        width: 44px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .otp-footer {
        font-size: 0.8rem;
    }
}