@font-face {
    font-family: 'Faberge-Regular'; 
    src: url('/static/Faberge-Regular.woff') format('woff');
    font-weight: normal; 
    font-style: normal;
  }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif; 
}

#body-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#auth_page {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

#auth_page h1 {
    font-family: 'Faberge-Regular', Arial, sans-serif;
    font-weight: normal;
    font-size: 1.4em;
    letter-spacing: 0.1em;
    background-color: #3e356c;
    padding: 20px;
    color: white;
    text-align: center;
    width: 100%;
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
    margin: 0;
    border-radius: 10px 10px 0 0;
}

#auth_page .auth_form {
    background: white;
    padding: 40px 30px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 130px;
}

#auth_page .auth_form.disabled {
    opacity: 0.7;
    pointer-events: none;
}

#auth_page .error_message {
    color: #e74c3c;
    font-size: 14px;
    text-align: center;
    min-height: 20px;
    font-weight: 500;
    display: none;
}

#auth_page .error_message.show {
    display: block;
}

#auth_page .auth_code {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    outline: none;
}

#auth_page .auth_code:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#auth_page .auth_code:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

#auth_page .auth_code::placeholder {
    text-transform: none;
    letter-spacing: normal;
    color: #999;
}

#auth_page .submit {
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

#auth_page .submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#auth_page .submit:active:not(:disabled) {
    transform: translateY(0);
}

#auth_page .submit:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Анимация загрузки */
#auth_page .submit.loading {
    color: transparent;
}

#auth_page .submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Пульсирующая анимация как альтернатива */
#auth_page .submit.pulse:disabled {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Анимация прогресса */
#auth_page .submit.progress:disabled {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

#auth_page .submit.progress:disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.4), 
        transparent
    );
    animation: shimmer 1.5s infinite;
}

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

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}