/* ========== auth.css ========== */
/* Стили для страниц авторизации и регистрации */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent !important;
}

html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #0f1724;
    color: #e2e8f0;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* ========== Страница авторизации ========== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-y: auto;
    padding: 16px;
    background: #0f1724;
}

.auth-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 16px;
}

.auth-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: clamp(24px, 5vw, 40px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(79, 158, 248, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card h1 {
    font-size: clamp(20px, 6vw, 22px);
    font-weight: 700;
    background: linear-gradient(135deg, #4f9ef8 0%, #7b6ef6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    text-align: center;
}

.auth-card h2 {
    font-size: clamp(16px, 5vw, 18px);
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
    text-align: center;
    color: #e2e8f0;
}

.auth-card input {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 14px;
    background: rgba(15, 23, 36, 0.8);
    border: 1px solid #263e5d;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
    -webkit-appearance: none;
}

.auth-card input:focus {
    border-color: #3b6091;
}

.auth-card button {
    width: 100%;
    padding: 14px;
    background: #263855;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 12px;
    border: 1px solid #3a5e97;
}

.auth-card button:hover {
	background: #2c3d59;
	transition: all 0.3s;
    border: 1px solid #3a5e97;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #94a3b8;
    font-size: 14px;
}

.auth-link a {
    color: #4f9ef8;
    text-decoration: none;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #475569;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #334155;
}

.auth-divider::before { margin-right: 12px; }
.auth-divider::after { margin-left: 12px; }

/* Обнаружение автозаполнения */
@keyframes onAutoFillStart {
    from { opacity: 1; }
    to { opacity: 1; }
}

input:-webkit-autofill {
    animation-name: onAutoFillStart;
}

/* Переопределение стилей автозаполнения */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(15, 23, 36, 0.8) inset !important;
    -webkit-text-fill-color: white !important;
    caret-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
    background-color: rgba(15, 23, 36, 0.8) !important;
}

/* ========== Сообщения об ошибках/успехе ========== */
.error-message, .success-message {
    background: #1e2a3a;
    border: 1px solid #263e5d;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #e0e0e0;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
}

.error-message {
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid #ff4757;
    color: #ff4757;
    display: none;
    margin-top: 12px;
}

.success-message {
    background: #1e2a3a;
    border: 1px solid #2ecc71;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 24px;
    color: #e0e0e0;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
}

/* ========== ЗАЩИТА ОТ АВТОЗАПОЛНЕНИЯ ========== */

/* Скрываем выпадающий список автозаполнения */
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
    visibility: hidden !important;
    display: none !important;
    pointer-events: none !important;
    position: absolute !important;
    right: 0 !important;
}

/* Скрываем иконку ключа в Chrome */
input::-webkit-strong-password,
input::-webkit-strong-password-auto-fill-button {
    display: none !important;
}

/* Скрываем выпадающий список предложений */
input::-webkit-calendar-picker-indicator {
    display: none !important;
}

/* Переопределение стилей автозаполнения */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(15, 23, 36, 0.8) inset !important;
    -webkit-text-fill-color: white !important;
    caret-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
    background-color: rgba(15, 23, 36, 0.8) !important;
}

/* Блокируем выпадающие списки */
input[readonly] {
    -webkit-user-select: text;
    user-select: text;
}

input[autocomplete="off"]::-webkit-contacts-auto-fill-button,
input[autocomplete="off"]::-webkit-credentials-auto-fill-button {
    display: none !important;
}