.login-container {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1), 0 0 20px rgba(255, 107, 107, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15), 0 0 30px rgba(255, 107, 107, 0.15);
}

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

.login-header h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.login-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid rgba(0,0,0,0.05);
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.login-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.login-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    background-position: right center;
}

.login-decoration {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255,107,107,0.03);
    border-radius: 50%;
    z-index: 0;
}

.login-decoration-1 {
    top: -100px;
    right: -100px;
}

.login-decoration-2 {
    bottom: -100px;
    left: -100px;
}

.floating-emoji {
    position: absolute;
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite alternate;
    opacity: 0.7;
    z-index: 1;
}

.error-message {
    background: rgba(255,107,107,0.1);
    color: var(--primary);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.error-message:empty {
    display: none;
}

.password-hint {
    font-size: 0.9rem;
    color: #777;
    margin-top: 25px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(95, 39, 205, 0.05);
    border-left: 3px solid var(--purple);
    transition: all 0.3s ease;
}

.password-hint:hover {
    background: rgba(95, 39, 205, 0.1);
    transform: translateX(5px);
}

.back-home {
    display: inline-block;
    margin-top: 20px;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-home:hover {
    color: var(--primary);
    transform: translateX(-3px);
}

.go-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.back-home:hover .go-arrow {
    transform: translateX(-5px);
}

@media (max-width: 480px) {
    .login-container {
        margin: 30px 20px;
        padding: 25px;
    }
}

/* Анимация для фоновых элементов */
.shimmer {
    position: absolute;
    width: 50%;
    height: 50%;
    background: linear-gradient(
        90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(255,255,255,0) 100%
    );
    top: 0;
    left: -100%;
    animation: shimmer 3s infinite;
    z-index: 0;
    transform: rotate(-45deg);
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}
.login-form button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(-45deg, var(--primary), var(--purple));
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.button-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, var(--primary), var(--purple));
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-form.loading .button-text {
    opacity: 0;
}

.login-form.loading .button-loader {
    opacity: 1;
}

.loader-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    margin: 0 4px;
    animation: loader-bounce 1.4s infinite ease-in-out both;
}

.loader-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loader-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}
/* Анимированный фокус для поля ввода */
@keyframes input-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

.login-form input:focus {
    border-color: var(--primary);
    animation: input-pulse 1.5s infinite;
}

/* Улучшенный интерактивный фон */
.interactive-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    pointer-events: none;
}

.password-field {
    position: relative;
    margin-bottom: 15px;
}

.password-field input {
    width: 100%;
    padding: 15px 40px 15px 15px;
    margin-bottom: 0;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    opacity: 1;
}

.typing-indicator {
    position: absolute;
    bottom: -10px;
    left: 15px;
    display: none;
}

.typing-indicator.active {
    display: flex;
}

.typing-indicator span {
    width: 5px;
    height: 5px;
    margin: 0 2px;
    border-radius: 50%;
    background: var(--primary);
    animation: typing-pulse 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 1; }
}


.input-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
}