/* Login page specific styles */
.login-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background-color: #161616;
    border-radius: 35px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
    position: absolute;
    top: -75px;
    left: 50%;
    transform: translateX(-50%);
}

.login-logo img {
    max-width: 150px;
    height: auto;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.close-btn span {
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #A0A0A0;
    transition: all 0.3s ease;
}

.close-btn span:first-child {
    transform: rotate(45deg);
}

.close-btn span:last-child {
    transform: rotate(-45deg);
}

.close-btn:hover span {
    background-color: var(--prime);
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-top: 35px;
    margin-bottom: 25px;
    color: #fff;
}

.login-form {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.login-form.active {
    display: block;
    opacity: 1;
}


/* Стили для полей в login формах - адаптация под систему .fieldset */
.login-form .fieldset {
    margin-bottom: 20px;
}

.login-form .fieldset__label {
    color: #A0A0A0;
}

/* Кнопка показа пароля */
.password-field .toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.password-field .toggle-password.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.password-field .toggle-password:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.password-field .toggle-password:active {
    transform: translateY(-50%) scale(0.95);
    background-color: rgba(255, 255, 255, 0.15);
}

.password-field .toggle-password img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    filter: brightness(10);
    pointer-events: none;
}


.forgot-password {
    text-align: right;
    margin-bottom: 20px;
}

.forgot-password a {
    color: #A0A0A0;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: var(--prime);
}

.login-btn {
    width: 100%;
    margin-bottom: 20px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.login-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #2f2f2f;
}

.login-divider span {
    position: relative;
    display: inline-block;
    padding: 0 10px;
    background-color: #161616;
    color: #A0A0A0;
    font-size: 14px;
    z-index: 1;
}

.social-login {
    text-align: center;
    margin-bottom: 20px;
}

.social-login p {
    color: #A0A0A0;
    font-size: 14px;
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #242424;
    transition: all 0.3s ease;
    overflow: hidden;
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 5px;
}

.social-icon:hover {
    background-color: #333;
    transform: scale(1.05);
}

.social-icon.telegram {
    position: relative;
    overflow: visible;
    background-color: #242424;
}

.social-icon.telegram img {
    position: relative;
    z-index: 1;
    pointer-events: none;
    padding: 3px;
}

.social-icon.telegram:hover {
    background-color: #333;
    transform: scale(1.05);
}

.social-icon.google {
    position: relative;
    z-index: 10;
}

.telegram-widget-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: auto;
    opacity: 0.01;
    display: block;
}

.telegram-widget-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    transform: none;
    transform-origin: center;
    opacity: 0.01;
    pointer-events: auto;
}

.login-register-link {
    text-align: center;
}

.login-register-link p {
    color: #A0A0A0;
    font-size: 16px;
}

.login-register-link a {
    color: var(--prime);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.login-register-link a:hover {
    opacity: 0.8;
}

.form-animation-in {
    animation: fadeIn 0.5s forwards;
}

.form-animation-out {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@media screen and (max-width: 480px) {
    .login-container {
        width: 100%;
        height: 100vh;
        max-width: none;
        border-radius: 0;
        padding: 30px 20px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .login-logo {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        margin-top: 20px;
        margin-bottom: 40px;
        text-align: center;
        width: 100%;
    }

    .login-logo img {
        max-width: 120px;
        display: inline-block;
    }

    .login-title {
        font-size: 22px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    .login-form {
        width: 100%;
        max-width: 400px;
    }
}
