* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    background: #0f0f0f;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    padding: 20px;
}

.login-card {
    max-width: 420px;
    margin: 0 auto;
    background: #1f1f1f;
    border-radius: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.card-header {
    padding: 48px 32px 32px 32px;
    text-align: center;
    background: #1f1f1f;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    color: #27a6e5;
}

.card-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.card-header p {
    font-size: 15px;
    color: #8e8e93;
}

form {
    padding: 8px 32px 32px 32px;
}

.input-group {
    position: relative;
    margin-bottom: 28px;
}

.input-group input {
    width: 100%;
    padding: 14px 12px;
    font-size: 16px;
    background: #2b2b2b;
    border: 1px solid #3a3a3a;
    border-radius: 12px;
    outline: none;
    color: #ffffff;
    transition: all 0.2s ease;
}

.input-group input:focus {
    border-color: #27a6e5;
    background: #2b2b2b;
}

.input-group label {
    position: absolute;
    left: 12px;
    top: 14px;
    color: #8e8e93;
    pointer-events: none;
    transition: 0.2s ease;
    font-size: 16px;
    background: transparent;
    padding: 0 4px;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: #27a6e5;
    background: #1f1f1f;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.6;
    color: #8e8e93;
    transition: opacity 0.2s ease;
}

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

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #27a6e5;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-top: 8px;
}

.btn-submit:hover {
    opacity: 0.9;
}

.btn-submit:active {
    opacity: 0.8;
}

.message {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    padding: 10px;
    border-radius: 10px;
    transition: 0.2s ease;
}

.message.error {
    background: #2c1618;
    color: #ff5c5c;
    border: 1px solid #3a2023;
}

.message.success {
    background: #162b24;
    color: #6fcf97;
    border: 1px solid #1e3a2f;
}

.card-footer {
    padding: 20px 32px 32px 32px;
    text-align: center;
    border-top: 0.5px solid #3a3a3a;
    display: flex;
    justify-content: space-between;
    background: #1f1f1f;
}

.card-footer a {
    color: #27a6e5;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s ease;
}

.card-footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Анимация загрузки (только для кнопки) */
.btn-submit.loading span {
    visibility: hidden;
}

.btn-submit.loading {
    position: relative;
}

.btn-submit.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Стили для автозаполнения */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #2b2b2b inset !important;
    -webkit-text-fill-color: #ffffff !important;
}


img {
  filter: invert(100%);
}

/* Адаптивность */
@media (max-width: 480px) {
    .login-card {
        border-radius: 20px;
    }
    
    .card-header {
        padding: 36px 24px 24px 24px;
    }
    
    form {
        padding: 8px 24px 24px 24px;
    }
    
    .card-footer {
        padding: 16px 24px 24px 24px;
    }
}