/* Основные стили */
body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #1a1a1a;
}

header {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.navbar {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: #0044cc;
    text-decoration: none;
}

.brand-logo {
    width: 1.5rem;
    height: auto;
    margin-bottom: 5px;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: bold;
}

.login {
    background-color: #f0f4f9;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 56px);
    position: relative;
}

.card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-title {
    font-size: 1.5rem;
    color: #000000;
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
}

.btn:hover {
    transform: scale(1.02);
    background-color: #0066ff;
}

/* Основные стили для кнопок */
.btn {
    border: none;
    background-color: #0044cc;
    color: #ffffff;
    border-radius: 30px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* Основной стиль для кнопок */
.btn-primary {
    background-color: #0044cc;
    color: #ffffff;
    border: 2px solid #003399;
}

.btn-primary:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.btn-primary:hover {
    background-color: #0066ff;
    color: #ffffff;
}

/* Вторичный стиль для кнопок */
.btn-secondary {
    background-color: transparent;
    border: 2px solid #0044cc;
    color: #0044cc;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(0, 68, 204, 0.1);
    transition: all 0.3s ease;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 0;
}

.btn-secondary:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.btn-secondary:hover {
    background-color: rgba(0, 68, 204, 0.1);
}

/* Стили для формы */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

/* Стили для полей ввода */
.form-control {
    background-color: #f0f0f0;
    border: 1px solid #cccccc;
    color: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 0.75rem;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s;
}

.form-control::placeholder {
    color: #999;
}

/* Стили для меток внутри полей ввода */
.input-wrapper input {
    width: 100%;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 8px;
    color: #1a1a1a;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.input-wrapper input:focus,
.input-wrapper input:not(:placeholder-shown) {
    border-color: #0044cc;
}

.input-wrapper label {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0 0.5rem;
    color: #666;
    pointer-events: none;
    transition: all 0.3s;
    background: #ffffff;
}

.input-wrapper input:focus+label,
.input-wrapper input:not(:placeholder-shown)+label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: 0.85rem;
    color: #0044cc;
}

/* Стили для контейнера иконки переключения пароля и текста */
.password-toggle {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.password-toggle a {
    margin-left: 0.5rem;
    margin-bottom: 0.25rem;
    color: #0044cc;
}

.password-toggle .material-symbols-outlined {
    font-size: 1.5rem;
    color: #0044cc;
    cursor: pointer;
    user-select: none;
}

/* Стили для текста ошибки */
.error-message {
    color: red;
    font-size: 14px;
    margin-bottom: 10px;
    display: none;
}

/* Анимация тряски */
@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

.shake-animation {
    animation: shake 0.5s ease;
    border: 2px solid red !important;
}

/* Оверлей для затемнения фона */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 999;
    display: none;
}

/* Стили для сообщения об успешной регистрации */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    background: #28a745;
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    z-index: 1000;
    display: none;
}

.success-message.show {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 10px rgba(40, 167, 69, 0.5), 0 0 20px rgba(40, 167, 69, 0.4);
    }

    100% {
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.8), 0 0 30px rgba(40, 167, 69, 0.6);
    }
}

.overlay.show {
    display: block;
    opacity: 1;
}

.loader-container {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    z-index: 9999;
    background-color: rgba(255, 255, 255, 0.9);
}

.loader {
    --c: no-repeat linear-gradient(#0044cc 0 0);
    background:
        var(--c), var(--c), var(--c),
        var(--c), var(--c), var(--c),
        var(--c), var(--c), var(--c);
    background-size: 16px 16px;
    animation:
        l32-1 1.5s infinite,
        l32-2 1.5s infinite;
}

@keyframes l32-1 {

    0%,
    100% {
        width: 45px;
        height: 45px
    }

    35%,
    65% {
        width: 65px;
        height: 65px
    }
}

@keyframes l32-2 {

    0%,
    40% {
        background-position: 0 0, 0 50%, 0 100%, 50% 100%, 100% 100%, 100% 50%, 100% 0, 50% 0, 50% 50%
    }

    60%,
    100% {
        background-position: 0 50%, 0 100%, 50% 100%, 100% 100%, 100% 50%, 100% 0, 50% 0, 0 0, 50% 50%
    }
}