/* ========== ПЕРЕМЕННЫЕ ДЛЯ ТЕМ ========== */
:root {
    /* Светлая тема (по умолчанию) */
    --auth-bg: white;
    --auth-text-primary: #333;
    --auth-text-dark: rgba(134, 78, 60, 1);
    --auth-border: #eee;
    --auth-input-bg: #f9f9f9;
    --auth-input-focus: rgba(134, 78, 60, 0.5);
    --auth-shadow: 0 20px 40px rgba(134, 78, 60, 0.15);
    --auth-btn-bg: rgba(134, 78, 60, 1);
    --auth-btn-hover: rgba(114, 58, 40, 1);
    --auth-link: rgba(134, 78, 60, 0.8);
    --auth-link-hover: rgba(134, 78, 60, 1);
    --auth-error-bg: #ffebee;
    --auth-error-text: #c62828;
    --auth-success-bg: #e8f5e9;
    --auth-success-text: #2e7d32;
}

/* Темная тема */
body.dark-theme {
    --auth-bg: #1a1a2e;
    --auth-text-primary: #e0e0e0;
    --auth-text-dark: #b87c4a;
    --auth-border: #2a3a5e;
    --auth-input-bg: #0f0f23;
    --auth-input-focus: rgba(184, 124, 74, 0.5);
    --auth-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    --auth-btn-bg: #b87c4a;
    --auth-btn-hover: #d4a373;
    --auth-link: rgba(184, 124, 74, 0.8);
    --auth-link-hover: #b87c4a;
    --auth-error-bg: #3a1a1a;
    --auth-error-text: #f44336;
    --auth-success-bg: #1b3a1b;
    --auth-success-text: #4caf50;
}

/* ========== СТРАНИЦА АВТОРИЗАЦИИ ========== */
.LogIn {
    max-width: 500px;
    width: 90%;
    margin: 200px auto 50px;
    padding: 40px;
    background: var(--auth-bg);
    border-radius: 30px;
    box-shadow: var(--auth-shadow);
    position: relative;
    overflow: hidden;
    margin-top: 70px;
    transition: all 0.3s ease;
}

.LogIn::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(134, 78, 60, 0.05);
    border-radius: 50%;
    z-index: 0;
}

.LogIn::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: rgba(134, 78, 60, 0.03);
    border-radius: 50%;
    z-index: 0;
}

.titleLogin {
    font-size: 36px;
    font-weight: 700;
    color: var(--auth-text-dark);
    text-align: center;
    margin: 0 0 40px 0;
    position: relative;
    z-index: 1;
}

.titleLogin::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--auth-text-dark);
    opacity: 0.3;
    border-radius: 2px;
}

.conteinerLabelInput {
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.titleInput {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: var(--auth-text-primary);
    margin-bottom: 8px;
}

.inputFormLogIn {
    width: 100%;
    height: 55px;
    padding: 0 20px;
    border: 2px solid var(--auth-border);
    border-radius: 15px;
    font-size: 16px;
    color: var(--auth-text-primary);
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: var(--auth-input-bg);
}

.inputFormLogIn:focus {
    outline: none;
    border-color: var(--auth-input-focus);
    background: var(--auth-bg);
    box-shadow: 0 5px 15px rgba(134, 78, 60, 0.1);
}

.inputFormLogIn:hover {
    border-color: var(--auth-input-focus);
}

.buttonLogIn {
    width: 200px;
    height: 55px;
    background: var(--auth-btn-bg);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.buttonLogIn:hover {
    background: var(--auth-btn-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.buttonLogIn:active {
    transform: translateY(-1px);
}

.linkRegistration {
    display: block;
    text-align: center;
    color: var(--auth-link);
    text-decoration: none;
    font-size: 15px;
    margin-top: 20px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.linkRegistration:hover {
    color: var(--auth-link-hover);
    text-decoration: underline;
}

.error-message {
    background-color: var(--auth-error-bg);
    color: var(--auth-error-text);
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 14px;
    border-left: 4px solid var(--auth-error-text);
    position: relative;
    z-index: 1;
}

.success-message {
    background-color: var(--auth-success-bg);
    color: var(--auth-success-text);
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 14px;
    border-left: 4px solid var(--auth-success-text);
    position: relative;
    z-index: 1;
}

/* ========== ПАРОЛЬ (глазик) ========== */
.password-container {
    position: relative;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-input {
    padding-right: 50px !important;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-link);
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--auth-link-hover);
}

.eye-icon {
    width: 22px;
    height: 22px;
    transition: all 0.3s ease;
    color: currentColor;
}

.button-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.register-btn-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* ========== СТРАНИЦА РЕГИСТРАЦИИ ========== */
.registration {
    max-width: 550px;
    width: 90%;
    margin: 180px auto 50px;
    padding: 40px;
    background: var(--auth-bg);
    border-radius: 30px;
    box-shadow: var(--auth-shadow);
    position: relative;
    overflow: hidden;
    margin-top: 70px;
    transition: all 0.3s ease;
}

.registration::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(134, 78, 60, 0.05);
    border-radius: 50%;
    z-index: 0;
}

.registration::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: rgba(134, 78, 60, 0.03);
    border-radius: 50%;
    z-index: 0;
}

.titleInputReg {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--auth-text-primary);
    margin-bottom: 6px;
    transition: color 0.3s ease;
}

.register {
    width: 250px;
    height: 55px;
    background: var(--auth-btn-bg);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 25px 0 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.register:hover {
    background: var(--auth-btn-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.password-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--auth-link);
    margin-left: 10px;
}

/* ========== ИНДИКАТОРЫ СИЛЫ ПАРОЛЯ ========== */
.password-strength,
.password-match {
    font-size: 12px;
    margin-top: 5px;
    transition: all 0.3s ease;
}

.password-strength {
    color: var(--auth-link);
}

.password-match {
    color: var(--auth-link);
}

/* ========== АДАПТИВНОСТЬ АВТОРИЗАЦИИ ========== */
@media screen and (max-width: 768px) {
    .LogIn {
        margin: 150px auto 30px;
        padding: 30px 20px;
    }

    .titleLogin {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .inputFormLogIn {
        height: 50px;
    }

    .buttonLogIn {
        width: 180px;
        height: 50px;
        font-size: 16px;
    }

    .registration {
        margin: 150px auto 40px;
        padding: 30px 25px;
    }

    .register {
        width: 220px;
        height: 50px;
        font-size: 17px;
    }

    .password-hint {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
}

@media screen and (max-width: 600px) {
    .registration {
        margin: 140px auto 30px;
        padding: 25px 20px;
    }

    .titleLogin {
        font-size: 30px;
    }

    .titleInputReg {
        font-size: 14px;
    }

    .inputFormLogIn {
        height: 45px;
        font-size: 14px;
    }

    .register {
        width: 200px;
        height: 48px;
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .LogIn {
        margin: 120px auto 20px;
        padding: 25px 15px;
    }

    .titleLogin {
        font-size: 28px;
    }

    .titleInput {
        font-size: 14px;
    }

    .inputFormLogIn {
        height: 45px;
        font-size: 14px;
    }

    .buttonLogIn {
        width: 160px;
        height: 45px;
        font-size: 15px;
    }

    .linkRegistration {
        font-size: 14px;
    }

    .registration {
        margin: 120px auto 20px;
        padding: 20px 15px;
    }

    .titleLogin {
        font-size: 26px;
        margin-bottom: 25px;
    }

    .titleLogin::after {
        bottom: -10px;
        width: 60px;
    }

    .conteinerLabelInput {
        margin-bottom: 15px;
    }

    .register {
        width: 180px;
        height: 45px;
        font-size: 15px;
    }

    .linkRegistration {
        font-size: 13px;
    }

    .password-input {
        padding-right: 45px !important;
    }

    .password-toggle {
        right: 12px;
    }

    .eye-icon {
        width: 20px;
        height: 20px;
    }

    .password-strength,
    .password-match {
        font-size: 12px;
    }
}