/* ============================================================
   ОБЩИЕ СТИЛИ ДЛЯ СТРАНИЦ АУТЕНТИФИКАЦИИ (ВХОД/РЕГИСТРАЦИЯ)
   ============================================================ */

/* ----- Базовый сброс и настройки ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background: radial-gradient(ellipse at 50% 30%, #1a2332, #0d1117 70%);
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

/* Декоративный фон — мягкие круги */
body::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* ----- Контейнер авторизации (карточка) ----- */
.auth-container {
    position: relative;
    z-index: 1;
    max-width: 460px;
    width: 100%;
    padding: 2.8rem 2.5rem;
    background: rgba(22, 27, 34, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ----- Заголовок ----- */
.auth-container h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #f0f6fc;
    letter-spacing: -0.5px;
    text-align: center;
    margin-bottom: 0.4rem;
}

/* Небольшой подзаголовок с символом */
.auth-container h1::after {
    content: ' ✦';
    color: rgba(255, 255, 255, 0.15);
    font-weight: 300;
}

.auth-container p {
    color: #8b949e;
    font-size: 0.95rem;
    text-align: center;
    margin: 1rem 0 0.2rem;
}

/* ----- Сообщения (успех/ошибка) ----- */
.auth-container p[style*="color:green"],
.auth-container p[style*="color:red"] {
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    margin: 0.6rem 0 1.2rem;
}

.auth-container p[style*="color:green"] {
    color: #7ee787 !important;
    border: 1px solid rgba(46, 160, 67, 0.3);
}

.auth-container p[style*="color:red"] {
    color: #f0888e !important;
    border: 1px solid rgba(218, 54, 51, 0.3);
}

/* ----- Форма ----- */
.auth-container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ----- Поля ввода ----- */
.auth-container input {
    padding: 0.9rem 1.2rem;
    background: rgba(13, 17, 23, 0.7);
    border: 1px solid rgba(48, 54, 61, 0.8);
    border-radius: 14px;
    font-size: 1rem;
    color: #e6edf3;
    transition: all 0.25s ease;
    font-family: inherit;
    backdrop-filter: blur(4px);
}

.auth-container input::placeholder {
    color: #484f58;
    font-weight: 400;
}

.auth-container input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.15);
    background: rgba(22, 27, 34, 0.9);
}

.auth-container input:hover {
    border-color: #484f58;
}

/* ----- Кнопка отправки ----- */
.auth-container button {
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(145deg, #238636, #1a7a30);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 16px rgba(35, 134, 54, 0.25);
}

.auth-container button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: left 0.6s ease;
}

.auth-container button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(35, 134, 54, 0.35);
    background: linear-gradient(145deg, #2ea043, #1f8a3a);
}

.auth-container button:hover::before {
    left: 100%;
}

.auth-container button:active {
    transform: scale(0.97);
}

/* ----- Ссылки ----- */
.auth-container a {
    color: #58a6ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, border-bottom 0.2s;
    border-bottom: 1px solid transparent;
}

.auth-container a:hover {
    color: #79c0ff;
    border-bottom-color: rgba(88, 166, 255, 0.3);
}

.auth-container .link-group {
    margin-top: 1.2rem;
    text-align: center;
    font-size: 0.95rem;
    color: #8b949e;
}

/* ----- Адаптивность ----- */
@media (max-width: 540px) {
    .auth-container {
        padding: 2rem 1.5rem;
        border-radius: 1.8rem;
    }
    .auth-container h1 {
        font-size: 1.6rem;
    }
    .auth-container input {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    .auth-container button {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 400px) {
    body {
        padding: 0.8rem;
    }
    .auth-container {
        padding: 1.5rem 1rem;
    }
}
