/* Модальное окно логина */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.login-modal.active {
    opacity: 1;
    visibility: visible;
}

.login-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    border: 2px solid rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
}

.login-modal.active .login-container {
    transform: scale(1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-title {
    color: #d4af37;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.login-subtitle {
    color: #a0a0a0;
    font-size: 14px;
    margin-bottom: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input::placeholder {
    color: #a0a0a0;
}

.form-input:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.05);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

/* Стили для автозаполнения браузера */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus,
.form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(212, 175, 55, 0.05) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: content-box !important;
    background: rgba(212, 175, 55, 0.05) !important;
    border-color: #d4af37 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Для Firefox */
.form-input:-moz-autofill {
    background-color: rgba(212, 175, 55, 0.05) !important;
    color: #ffffff !important;
}

/* Для Edge/IE */
.form-input:-ms-input-placeholder {
    color: #a0a0a0 !important;
}

/* Дополнительные стили для автозаполнения */
.form-input:autofill {
    background: rgba(212, 175, 55, 0.05) !important;
    color: #ffffff !important;
    border-color: #d4af37 !important;
}

/* Анимации для автозаполнения */
@keyframes onAutoFillStart {
    from {/**/}
    to {/**/}
}

@keyframes onAutoFillCancel {
    from {/**/}
    to {/**/}
}

.form-input:-webkit-autofill {
    animation-name: onAutoFillStart;
}

.form-input:not(:-webkit-autofill) {
    animation-name: onAutoFillCancel;
}

.form-input.error {
    border-color: #e74c3c;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.3);
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0a0a0;
    font-size: 18px;
}

.form-input:focus + .input-icon {
    color: #d4af37;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s ease;
}



.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.login-button {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #0f0f0f;
    border: 2px solid #d4af37;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    position: relative;
    overflow: hidden;
}

.login-button::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 ease;
}

.login-button:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

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

.login-button:active {
    transform: translateY(-1px);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

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

.forgot-password:hover {
    color: #d4af37;
}

.register-link {
    margin-top: 15px;
    color: #a0a0a0;
    font-size: 14px;
}

.register-link a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: #f4d03f;
}

.login-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-close:hover {
    color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
    transform: scale(1.1);
}

/* Анимация загрузки */
.loading-spinner-login {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-top: 2px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-button.loading .loading-spinner-login {
    display: inline-block;
}

/* Адаптивность */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .form-input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .login-button {
        padding: 12px;
        font-size: 14px;
    }
}

/* Эффект появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container {
    animation: fadeInUp 0.3s ease;
}

/* Дополнительные эффекты для соответствия дизайну */
.login-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 50%, rgba(212, 175, 55, 0.02) 100%);
    pointer-events: none;
    border-radius: 20px;
}

/* Стили для уведомлений */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.notification-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border-color: rgba(46, 204, 113, 0.3);
}

.notification-error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border-color: rgba(231, 76, 60, 0.3);
}
