/* =========================================================
   KhodroSup Premium Tech & Automotive Auth Styling
   ========================================================= */

@import url("variables.css");

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
    direction: rtl;
    background-color: #0b0f19;
}

/* =========================================================
   Background Page (Sport & Tech Dark Mode)
   ========================================================= */

.auth-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 50px 20px;
    
    /* پس‌زمینه ترکیبی اسپرت و های‌تک با نورپردازی متحرک ملایم */
    background: 
        radial-gradient(circle at 15% 20%, rgba(229, 9, 20, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(13, 110, 253, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.8) 0%, #080c14 100%);
}

/* خطوط و شبکه گرافیکی اسپرت در پس‌زمینه */
.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

/* نور درخشان بالای کارت */
.auth-page::after {
    content: "";
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: linear-gradient(180deg, rgba(229, 9, 20, 0.3) 0%, rgba(0,0,0,0) 100%);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

/* =========================================================
   Glassmorphic Card
   ========================================================= */

.auth-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 540px;
    padding: 45px 40px 38px;
    
    /* شیشه تیره‌رنگ مات با حاشیه لوکس */
    background: rgba(18, 24, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(229, 9, 20, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
        
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(229, 9, 20, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* =========================================================
   Header & Titles
   ========================================================= */

.auth-title {
    margin: 0 0 32px;
    text-align: center;
    font-size: 28px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* خط تزیینی قرمز زیر عنوان */
.auth-title::after {
    content: "";
    position: absolute;
    bottom: -12px;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #e50914, #ff5252);
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(229, 9, 20, 0.6);
}

.auth-subtitle {
    margin: -10px 0 28px;
    text-align: center;
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
}

/* =========================================================
   Form Groups & Inputs
   ========================================================= */

.auth-form {
    width: 100%;
}

.auth-group {
    margin-bottom: 22px;
    position: relative;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
}

.auth-input-wrap {
    position: relative;
    width: 100%;
}

.auth-input {
    width: 100%;
    height: 52px;
    padding: 0 18px 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(10, 15, 26, 0.6);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* افکت استایل آیکون‌دار در صورت وجود آیکون */
.auth-input-wrap:has(.auth-input-icon) .auth-input {
    padding-right: 48px;
}

/* افکت درخشان هنگام کلیک روی کادر (Focus) */
.auth-input:focus {
    border-color: #e50914;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 
        0 0 0 4px rgba(229, 9, 20, 0.18),
        0 0 20px rgba(229, 9, 20, 0.15);
}

.auth-input::placeholder {
    color: #64748b;
    font-size: 14px;
}

/* =========================================================
   Input Guide Text (متن‌های راهنمای زیر کادرها)
   ========================================================= */

/* استایل‌دهی هوشمند متون راهنمای زیر اینپوت‌ها بدون تغییر HTML */
.auth-group small,
.auth-group p,
.auth-group span:not(.auth-input-icon):not(.auth-label),
.auth-hint {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.6;
    padding-right: 4px;
    transition: color 0.2s;
}

.auth-group:focus-within small,
.auth-group:focus-within p,
.auth-group:focus-within .auth-hint {
    color: #cbd5e1;
}

/* =========================================================
   Input Icons
   ========================================================= */

.auth-input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #64748b;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-input:focus + .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
    color: #e50914;
}

/* =========================================================
   Alert Messages (Error & Success)
   ========================================================= */

.auth-error {
    margin-bottom: 22px;
    padding: 14px 18px;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    font-size: 13.5px;
    line-height: 1.7;
    backdrop-filter: blur(8px);
}

.auth-success {
    margin-bottom: 22px;
    padding: 14px 18px;
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
    font-size: 13.5px;
    line-height: 1.7;
    backdrop-filter: blur(8px);
}

/* =========================================================
   Buttons (Sport Red Gradient)
   ========================================================= */

.auth-button {
    width: 100%;
    height: 54px;
    margin-top: 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #e50914 0%, #b20710 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(229, 9, 20, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.auth-button:hover {
    background: linear-gradient(135deg, #f40a16 0%, #c40812 100%);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(229, 9, 20, 0.45);
}

.auth-button:active {
    transform: translateY(1px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.3);
}

/* =========================================================
   Links & Footer
   ========================================================= */

.auth-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 28px;
    text-align: center;
}

.auth-link {
    color: #38bdf8;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.auth-link:hover {
    color: #7dd3fc;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.auth-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.15);
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0 20px;
    color: #94a3b8;
    font-size: 13.5px;
    cursor: pointer;
}

.auth-remember input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: #e50914;
    cursor: pointer;
}

.auth-footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 5;
    text-align: center;
    color: #64748b;
    font-size: 12.5px;
}

/* =========================================================
   Responsive Design
   ========================================================= */

@media (max-width: 600px) {
    .auth-page {
        padding: 20px 12px;
    }

    .auth-card {
        padding: 32px 20px 28px;
        border-radius: 18px;
    }

    .auth-title {
        font-size: 24px;
        margin-bottom: 28px;
    }

    .auth-input {
        height: 48px;
        font-size: 14px;
    }

    .auth-button {
        height: 50px;
        font-size: 15px;
    }

    .auth-links {
        flex-direction: column;
        gap: 12px;
    }

    .auth-divider {
        display: none;
    }

    .auth-footer {
        display: none;
    }
}