/* Стили для форм */
main {
    text-align: center;
}

form {
    max-width: 400px;
    margin: 15px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

a {
    color: white;
}

form p {
    margin-bottom: 15px;
}

form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}


form input[type="text"],
form input[type="email"],
form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
}

form button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

form button:hover {
    background: #0056b3;
}

/* Стили для формы логина */
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Цвет placeholder */
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
    color: white;
}

/* Для разных браузеров */
.form-control::-webkit-input-placeholder { /* Chrome/Opera/Safari */
    color: rgba(255, 255, 255, 0.5) !important;
}

.form-control::-moz-placeholder { /* Firefox 19+ */
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
}

.form-control:-ms-input-placeholder { /* IE 10+ */
    color: rgba(255, 255, 255, 0.5) !important;
}

.form-control:-moz-placeholder { /* Firefox 18- */
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important;
}

/* Убираем обводку при фокусе */
.form-control:focus {
    outline: none !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Для браузеров, которые игнорируют outline: none */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: white !important;
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.1) inset !important;
    transition: background-color 5000s ease-in-out 0s;
    color: white;
}

/* Дополнительно: стили для всей формы */
.auth-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: white;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: rgba(76, 175, 80, 0.3);
}

input {
    color: white;
    caret-color: white;
}

input,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:not(:-webkit-autofill) {
    -webkit-text-fill-color: white !important;
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.1) inset !important;
    caret-color: white !important;
    transition: background-color 0s, color 0s;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1 !important; /* чтобы не было приглушения в Firefox */
}
