/* ============ СБРОС ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============ ФОН СТРАНИЦЫ ============ */
body {
    font-family: 'Segoe UI', 'Georgia', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #533483);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: relative;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Плавающие пузыри на фоне */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

body::before {
    width: 400px;
    height: 400px;
    background: #e94560;
    top: -100px;
    left: -100px;
    animation: float 8s ease-in-out infinite;
}

body::after {
    width: 500px;
    height: 500px;
    background: #0ea5e9;
    bottom: -150px;
    right: -150px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(30px, -30px) scale(1.1); }
}

/* ============ КОНТЕЙНЕР ============ */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 50px 45px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ ЛОГОТИП ============ */
.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #e94560, #533483);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4); }
    50%      { transform: scale(1.05); box-shadow: 0 15px 40px rgba(233, 69, 96, 0.6); }
}

.logo h1 {
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.logo p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 6px;
    font-style: italic;
}

/* ============ ПОДЗАГОЛОВОК ============ */
.auth-reason {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border-left: 3px solid #e94560;
}

/* ============ БЛОК ФОРМЫ ============ */
.auth-block {
    margin-bottom: 25px;
}

.auth-title {
    text-align: center;
    font-size: 13px;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 25px;
    text-transform: uppercase;
    position: relative;
}

.auth-title::before,
.auth-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.auth-title::before { left: 0; }
.auth-title::after  { right: 0; }

/* ============ ПОЛЯ ВВОДА ============ */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group .icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transition: color 0.3s;
    z-index: 2;
}

.input-group input {
    width: 100%;
    height: 54px;
    padding: 0 18px 0 52px;
    font-size: 15px;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.input-group input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #e94560;
    box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.15);
}

.input-group input:focus + .icon,
.input-group input:focus ~ .icon {
    color: #e94560;
}

.input-group input:focus::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Кнопка показа пароля */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
    z-index: 2;
}

.toggle-password:hover {
    color: #e94560;
}

/* ============ ГАЛОЧКА ============ */
.remember-row {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-left: 5px;
}

.remember-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.05);
}

.remember-row input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #e94560, #533483);
    border-color: #e94560;
}

.remember-row input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 13px;
    font-weight: bold;
}

.remember-row label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    user-select: none;
}

/* ============ КНОПКА ВХОДА ============ */
.btn-submit {
    width: 100%;
    height: 54px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(135deg, #e94560, #533483);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(233, 69, 96, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(233, 69, 96, 0.5);
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:active {
    transform: translateY(0);
}

/* ============ ССЫЛКИ ПОД КНОПКОЙ ============ */
.actions {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    gap: 10px;
}

.actions a {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.actions a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* ============ ОШИБКА ============ */
.error-message {
    background: rgba(233, 69, 96, 0.15);
    border: 1px solid rgba(233, 69, 96, 0.5);
    color: #ff6b81;
    padding: 14px 18px;
    font-size: 14px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 20px;
    animation: shake 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-8px); }
    75%      { transform: translateX(8px); }
}

/* ============ КОНТАКТЫ ============ */
.footer-contacts {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.8;
}

.footer-contacts span {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ============ АДАПТИВ ============ */
@media (max-width: 500px) {
    .auth-container {
        padding: 35px 25px;
        border-radius: 20px;
    }

    .logo h1 {
        font-size: 22px;
    }

    .actions {
        flex-direction: column;
    }

    .actions a {
        padding: 12px;
    }
}