/* ============ MODERN AUTH ============ */
body {
    background: #0a0a12;
    overflow: hidden;
}

/* Animasyonlu gradient arka plan */
body::before {
    content: '';
    position: fixed;
    inset: -50%;
    background: conic-gradient(from 0deg, var(--primary), var(--accent-2), #3ea6ff, var(--primary));
    animation: spin 20s linear infinite;
    opacity: 0.15;
    z-index: -2;
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 0%, #0a0a12 70%);
    z-index: -1;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Floating blobs */
.auth-container::before,
.auth-container::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
    animation: float 8s ease-in-out infinite;
}
.auth-container::before {
    background: #ee2a7b;
    top: 10%; left: 10%;
}
.auth-container::after {
    background: #6228d7;
    bottom: 10%; right: 10%;
    animation-delay: -4s;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.2); }
}

.auth-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: calc(var(--safe-top) + 16px) 20px calc(var(--safe-bottom) + 20px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Dil seçici - glass pill */
.lang-switcher {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 20px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    padding: 4px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.1);
    width: fit-content;
    margin-left: auto;
    backdrop-filter: blur(10px);
}

.lang-switcher button {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    padding: 8px 14px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 800;
    transition: 0.25s;
    letter-spacing: 0.5px;
}
.lang-switcher button:active { transform: scale(0.95); }
.lang-switcher button:hover { color: #fff; }

/* Ana kutu - daha şık */
.auth-box {
    width: 100%;
    max-width: 400px;
    margin: auto;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.85), rgba(30, 20, 45, 0.85));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 28px;
    padding: 36px 26px;
    box-shadow: 
        0 25px 60px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.1),
        0 0 80px rgba(238,42,123,0.15);
    animation: authIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Üstte parlayan çizgi */
.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ee2a7b, #6228d7, transparent);
    animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes authIn {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo - daha göz alıcı */
.logo {
    font-size: 34px;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(135deg, #ff2a7b, #a855f7, #3b82f6);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    animation: logoFlow 4s ease infinite;
    letter-spacing: -1px;
}
@keyframes logoFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.auth-box h2 {
    text-align: center;
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 28px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Tab'lar - daha şık */
.tabs {
    display: flex;
    background: rgba(0,0,0,0.4);
    border-radius: 14px;
    padding: 5px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    transition: 0.3s;
    min-height: 44px;
    position: relative;
    z-index: 1;
}

.tab-btn.active {
    color: #fff;
}

/* Aktif tab arka planı */
.tabs::before {
    content: '';
    position: absolute;
    top: 5px;
    bottom: 5px;
    width: calc(50% - 5px);
    background: linear-gradient(135deg, #ee2a7b, #6228d7);
    border-radius: 10px;
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(238,42,123,0.4);
    left: 5px;
}
.tabs.register-active::before {
    left: calc(50% + 0px);
}

/* Input'lar - floating label + animasyon */
#authForm {
    position: relative;
}

#authForm input {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border: 1.5px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 18px 18px 18px 18px;
    color: #fff;
    font-size: 15px;
    margin-bottom: 12px;
    transition: all 0.3s;
    min-height: 56px;
    font-weight: 500;
}

#authForm input::placeholder {
    color: rgba(255,255,255,0.3);
    font-weight: 400;
}

#authForm input:focus {
    border-color: #ee2a7b;
    background: rgba(238,42,123,0.08);
    box-shadow: 
        0 0 0 4px rgba(238,42,123,0.15),
        inset 0 0 20px rgba(238,42,123,0.1);
    outline: none;
}

#authForm input:not(:placeholder-shown) {
    background: rgba(0,0,0,0.5);
}

/* Şifre wrapper */
.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 18px;
    padding: 6px;
    cursor: pointer;
    transition: 0.2s;
    min-width: unset;
    min-height: unset;
}
.toggle-password:hover { color: #fff; transform: translateY(-50%) scale(1.1); }

/* Submit butonu - parlak gradient */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #ee2a7b, #6228d7, #3b82f6);
    background-size: 200% 200%;
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 900;
    margin-top: 12px;
    transition: all 0.3s;
    box-shadow: 
        0 10px 30px rgba(238,42,123,0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
    min-height: 56px;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    animation: btnFlow 5s ease infinite;
}

@keyframes btnFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.btn-submit::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    opacity: 1;   /* ✅ */
    transition: 0.5s;
}

.btn-submit:hover::after {
    left: 100%;
}

.btn-submit:active { 
    transform: scale(0.98); 
    box-shadow: 0 4px 15px rgba(238,42,123,0.3);
}

.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Hata input'u */
#authForm input.error {
    border-color: #ef4444;
    background: rgba(239,68,68,0.08);
    animation: shake 0.4s;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Mobil */
@media (max-height: 650px) {
    .auth-box { padding: 28px 20px; }
    .logo { font-size: 26px; }
    .auth-box h2 { font-size: 12px; margin-bottom: 20px; }
    #authForm input { padding: 14px; min-height: 48px; }
    .btn-submit { padding: 14px; min-height: 48px; }
}

/* Cinsiyet seçimi */
.auth-select {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px 16px;
    color: #fff;
    font-size: 16px;
    margin-bottom: 12px;
    min-height: 50px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b8b9e' stroke-width='2'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
.auth-select:focus { 
    border-color: var(--primary); 
    outline: none;
}
.auth-select option {
    background: #1a1a26;
    color: #fff;
}

/* 🎯 "Şifrəni unutdum" düyməsi - təmiz text link */
.forgot-password-btn {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    
    background: transparent !important;
    border: none !important;
    color: #a89ac4 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    
    padding: 16px 8px 4px !important;
    margin: 0 !important;
    
    cursor: pointer !important;
    text-align: center !important;
    letter-spacing: 0.2px;
    transition: color 0.2s !important;
    
    /* 🎯 base.css-dən gələn problem stilləri sıfırla */
    min-height: unset !important;
    min-width: unset !important;
    position: static !important;
    overflow: visible !important;
    line-height: 1.4 !important;
}

/* 🎯 Ripple effektini söndür (transparent düymədə qəribə görünür) */
.forgot-password-btn::after {
    display: none !important;
}

.forgot-password-btn:hover {
    color: #ee2a7b !important;
}

.forgot-password-btn:active {
    color: #ff4d8f !important;
}

/* ================================================
   🎯 ŞİFRƏ BƏRPASI MODAL — self-contained styles
   (index.html yalnız auth.css yüklədiyi üçün)
   ================================================ */

/* Modal overlay */
#forgotPasswordModal.avatar-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}
#forgotPasswordModal.avatar-modal.open {
    display: flex;
    animation: forgotFadeIn 0.25s ease;
}
@keyframes forgotFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal kartı */
#forgotPasswordModal .avatar-modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.98), rgba(30, 20, 45, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    padding: 24px 22px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: forgotPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}
@keyframes forgotPopIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Modal header */
#forgotPasswordModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#forgotPasswordModal .modal-title {
    font-size: 17px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.2px;
}

#forgotPasswordModal .modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: unset;
    min-height: unset;
    transition: all 0.2s;
    padding: 0;
}
#forgotPasswordModal .modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}
#forgotPasswordModal .modal-close:active {
    transform: scale(0.9);
}

/* Form field-lər */
#forgotPasswordModal .form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#forgotPasswordModal .form-field-label {
    font-size: 12px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#forgotPasswordModal .form-field-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    min-height: 50px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
#forgotPasswordModal .form-field-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}
#forgotPasswordModal .form-field-input:focus {
    border-color: #ee2a7b;
    background: rgba(238, 42, 123, 0.08);
    box-shadow: 0 0 0 4px rgba(238, 42, 123, 0.15);
}

/* Suallar üçün xüsusi blok */
#forgotQuestionText {
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(238, 42, 123, 0.15), rgba(98, 40, 215, 0.1));
    border: 1.5px solid rgba(238, 42, 123, 0.35);
    border-radius: 12px;
    font-size: 14px;
    color: #fff;
    font-weight: 700;
    line-height: 1.5;
    min-height: 50px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* Save düyməsi */
#forgotPasswordModal .save-btn {
    width: 100%;
    background: linear-gradient(135deg, #ee2a7b, #6228d7);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(238, 42, 123, 0.35);
    font-family: inherit;
    letter-spacing: 0.3px;
}
#forgotPasswordModal .save-btn:hover {
    filter: brightness(1.1);
}
#forgotPasswordModal .save-btn:active {
    transform: scale(0.98);
}
#forgotPasswordModal .save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* "Geri" düyməsi */
#forgotPasswordModal .btn-skip {
    width: 100%;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 46px;
    font-family: inherit;
    margin-top: 8px;
}
#forgotPasswordModal .btn-skip:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}
#forgotPasswordModal .btn-skip:active {
    transform: scale(0.98);
}

/* Addım keçidləri */
#forgotPasswordModal #forgotStep1,
#forgotPasswordModal #forgotStep2 {
    animation: forgotSlideIn 0.3s ease;
}
@keyframes forgotSlideIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Mobil */
@media (max-height: 700px) {
    #forgotPasswordModal .avatar-modal-content {
        padding: 18px 16px;
    }
    #forgotPasswordModal .form-field-input {
        padding: 12px 14px;
        min-height: 44px;
    }
    #forgotPasswordModal .save-btn {
        padding: 12px;
        min-height: 46px;
    }
}

/* 🎯 Şifrəni unutdum düyməsi - text link */
.forgot-password-btn {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: none !important;
    color: #a89ac4 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    padding: 16px 8px 4px !important;
    margin: 0 !important;
    cursor: pointer !important;
    text-align: center !important;
    min-height: unset !important;
    min-width: unset !important;
    position: static !important;
    overflow: visible !important;
    line-height: 1.4 !important;
    letter-spacing: 0.2px;
    transition: color 0.2s !important;
}
.forgot-password-btn::after { display: none !important; }
.forgot-password-btn:hover { color: #ee2a7b !important; }
.forgot-password-btn:active { color: #ff4d8f !important; }

/* "və ya" divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 4px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}