/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.8s ease-out;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(102, 126, 234, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
}

.logo {
    text-align: center;
    margin-bottom: 35px;
}

.logo-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: #888;
    font-weight: 400;
    -webkit-text-fill-color: #888;
}

.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

.hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    padding-left: 4px;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 6px;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0px);
}

.btn-login::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: 0.6s;
}

.btn-login:hover::after {
    left: 100%;
}

.links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.separator {
    color: #ddd;
    margin: 0 12px;
}

.security-badge {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #999;
}

.security-badge .dot {
    margin: 0 8px;
    color: #ddd;
}

.message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.message.hidden {
    display: none;
}

.message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.footer {
    text-align: center;
    margin-top: 25px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.footer .version {
    font-size: 11px;
    opacity: 0.5;
    margin-top: 4px;
    font-family: 'Courier New', monospace;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Адаптивность */
@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
}

/* Стили для автозаполнения */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #333 !important;
}

/* Индикатор загрузки */
.btn-login.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-login.loading::before {
    content: '⏳';
    margin-right: 10px;
}