/* Базовые сбросы и нейтральный темный фон (подложка) */
body { 
    margin: 0; 
    background: linear-gradient(135deg, #1e2430 0%, #12161f 100%);
    font-family: "TildaSans", sans-serif; 
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === СТИЛИ МОДАЛЬНОГО ОКНА (Оригинальная анимация) === */
.auth-modal-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.2); 
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); 
    display: flex; justify-content: center; align-items: center; 
    padding: 20px; 
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.auth-modal-content { 
    width: 100%; 
    max-width: 420px; 
    position: relative; 
    transform: translateY(20px) scale(0.95);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

@keyframes fadeIn { to { opacity: 1; } }
@keyframes popIn { to { transform: translateY(0) scale(1); opacity: 1; } }

/* === СТИЛИ КАРТОЧКИ === */
.auth-card { 
    width: 100%; 
    padding: 40px 35px; 
    border-radius: 32px; 
    background: #fff; 
    border: 1px solid rgba(0, 0, 0, 0.05); 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); 
    overflow: hidden; 
    position: relative; 
    box-sizing: border-box; 
}

/* === КРЕСТИК ЗАКРЫТИЯ === */
.auth-modal-close { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    background: transparent; 
    border: none; 
    width: 24px; 
    height: 24px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 24px; 
    line-height: 1; 
    color: #999; 
    transition: all 0.2s ease; 
    z-index: 10; 
}
.auth-modal-close:hover { color: #333; transform: scale(1.1); }

.auth-tabs { display: flex; background: #f3f4f6; border-radius: 12px; padding: 4px; margin-bottom: 25px; margin-top: 5px; }
.auth-tab { flex: 1; padding: 12px; border: none; background: transparent; border-radius: 10px; font-family: inherit; font-weight: 600; font-size: 15px; color: #888; cursor: pointer; transition: all 0.3s ease; }
.auth-tab:hover { color: #333; }
.auth-tab.active { background: #fff; color: #333; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

.auth-form { display: none; flex-direction: column; gap: 16px; animation: formFadeIn 0.3s ease forwards; }
.auth-form.active { display: flex; }
@keyframes formFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.auth-input { width: 100%; padding: 16px; border: 1px solid rgba(0,0,0,0.1); border-radius: 14px; background: #fff; font-family: inherit; font-size: 16px; color: #333; box-sizing: border-box; transition: border-color 0.3s, box-shadow 0.3s; }
.auth-input:focus { outline: none; border-color: #288ceb; box-shadow: 0 0 0 3px rgba(40, 140, 235, 0.1); }

.auth-forgot { text-align: right; margin-top: -8px; }
.auth-forgot a, .auth-back a { color: #288ceb; text-decoration: none; font-size: 14px; font-weight: 600; }
.auth-forgot a:hover, .auth-back a:hover { text-decoration: underline; }
.auth-back { text-align: center; margin-top: 10px; }
.auth-error { color: #ff5c5c; font-size: 14px; text-align: center; font-weight: 500; display: none; margin-bottom: -5px; }
.auth-desc { font-size: 14px; color: #666; text-align: center; line-height: 1.5; margin-bottom: 5px; margin-top: 0; }

/* === ЧЕКБОКСЫ === */
.auth-legal-block { display: flex; flex-direction: column; gap: 12px; margin-top: 5px; }
.legal-check { display: flex; align-items: center; gap: 10px; cursor: pointer; position: relative; }
.legal-check input[type="checkbox"] { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0; }
.custom-check-box { flex-shrink: 0; width: 20px; height: 20px; background: rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.1); border-radius: 6px; position: relative; transition: all 0.2s; }
.legal-check input:checked ~ .custom-check-box { background: #288ceb; border-color: #288ceb; }
.legal-check input:checked ~ .custom-check-box::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.legal-text { font-size: 13px; color: #666; line-height: 1.4; }
.legal-text a { color: #288ceb; text-decoration: none; }
.implicit-consent { font-size: 12px; color: #999; text-align: center; margin-top: 5px; line-height: 1.4; }
.implicit-consent a { color: #288ceb; text-decoration: none; }