/* ===== login.css ===== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: vazir;
}

/* ===== پس‌زمینه ===== */
body {
    font-family: vazir, sans-serif;
    direction: rtl;
    min-height: 100vh;
    background: #0a0a0f;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* ===== wrapper ===== */
.login-wrapper {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ===== کارت شیشه‌ای ===== */
.glass-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: cardIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== برند ===== */
.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(99, 102, 241, 0.5));
    margin: 20px;
}

.brand-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.02em;
}

.brand-sub {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
    font-family: vazir;
}

/* ===== فرم ===== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 1rem;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.glass-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.85rem 2.8rem 0.85rem 1rem;
    color: #f1f5f9;
    font-family: iransans, sans-serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.25s ease;
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.9rem;
}

.glass-input:focus {
    border-color: rgba(99, 102, 241, 0.6);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ===== دکمه اصلی ===== */
.btn-primary {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: vazir, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.25s;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.5);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== اسپینر ===== */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== بج شماره ===== */
.phone-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.phone-badge-icon {
    font-size: 1rem;
}

#set-number-show,
#set-number-show-register {
    flex: 1;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    color: #a5b4fc;
    font-weight: 600;
}

.change-phone-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-family: vazir, sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.change-phone-btn:hover {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.15);
}

/* ===== OTP ===== */
.otp-hint {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.otp-input {
    width: 52px;
    height: 58px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #f1f5f9;
    font-family: vazir, sans-serif;
    outline: none;
    transition: all 0.2s ease;
    caret-color: #6366f1;
}

.otp-input:focus {
    border-color: rgba(99, 102, 241, 0.7);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    transform: scale(1.05);
}

.otp-input.filled {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.08);
}

/* ===== تایمر ارسال مجدد ===== */
.resend-row {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 28px;
}

.resend-timer {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.35);
}

#countdown {
    color: #a5b4fc;
    font-weight: 600;
    direction: ltr;
    display: inline-block;
}

.resend-btn {
    background: none;
    border: none;
    color: #a5b4fc;
    font-family: vazir, sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.resend-btn:hover {
    color: #818cf8;
}

/* ===== فوتر ===== */
.login-footer {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.login-footer p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.3);
}

.footer-link {
    color: rgba(165, 180, 252, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #a5b4fc;
}

/* ===== یوتیلیتی ===== */
.hidden {
    display: none !important;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 480px) {
    .glass-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .otp-input {
        width: 44px;
        height: 50px;
        font-size: 1.2rem;
    }

    .otp-inputs {
        gap: 0.5rem;
    }
}
