* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    display: flex;
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
    height: 100vh; /* Full viewport height */
    font-family: 'Montserrat', sans-serif;
    background-color: #151515;
    color: #333;
    line-height: 1.6;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    background-attachment: fixed;
}

/* Adjustments for Centering the Form */
.form-container {
    display: flex; /* Enable Flexbox */
    flex-direction: column; /* Stack children vertically */
    justify-content: center; /* Center content vertically within the container */
    align-items: center; /* Center content horizontally within the container */
    width: 100%; /* Full width of its container */
    max-width: 400px; /* Maximum width to keep the form contained */
    padding: 20px; /* Padding around the form for spacing */
    border-radius: 8px; /* Rounded corners */
    margin: 0 20px; /* Ensures some spacing on small screens */
}

.header {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 20px 0;
    text-align: center;
}


/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 2.5em;
    color: #c8c8cb;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); /* Slight shadow for the text */
}


/* Buttons */
.btn {
    display: inline-block;
    background: #1f4287;
    color: #fff;
    padding: 10px 20px;
    margin: 5px 5px 5px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #276FBF;
}

/* Container */
.container {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background-color: #2d2c2c;
    box-shadow: 0 0 10px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.container h2 {
    margin-bottom: 20px;
    color: #8e8f90;
}

input[type="text"],
input[type="password"] {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #5c5b5b;
    border-radius: 5px;
    background-color: #6d6969;
    color: #1a1a1a;
}

input[type="submit"] {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    color: #6d6969;
    background-color: #1f4287;
    cursor: pointer;
}

input[type="submit"]:hover {
    background-color: #276FBF;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        width: 100%;
        padding: 15px;
    }

    input[type="text"],
    input[type="password"] {
        width: calc(100% - 10px);
    }
}

@media (max-width: 600px) {
    .form-container {
        width: 90%; /* More width for smaller screens */
        margin: 0 10px; /* Adjusted margin for small screens */
    }
}

input::placeholder {
    color: #1a1a1a; /* Или #000000 для черного цвета */
}

.error-message {
    background-color: #FFC7C7;
    border: 1px solid #FF5E5E;
    border-radius: 5px;
    color: #D43F00;
    padding: 10px 15px;
    text-align: center;
    position: fixed;
    top: 10%; /* или другое значение, чтобы подогнать под вашу навигационную панель */
    right: 2%;
    z-index: 1000; /* убедитесь, что сообщение об ошибке находится выше других элементов */
}

/* Styling for Select Dropdown */
.select {
    display: block; /* Ensures the select fills the container it's in */
    width: calc(100% - 20px); /* Full width minus padding for aesthetic alignment */
    padding: 10px; /* Comfortable padding for clicking */
    margin-bottom: 20px; /* Space below the dropdown */
    background-color: #6d6969; /* Grey background to match input fields */
    color: #000000; /* Text color for options */
    border: 1px solid #5c5b5b; /* Slightly darker border similar to input fields */
    border-radius: 5px; /* Rounded corners to match other form elements */
    cursor: pointer; /* Pointer cursor on hover */
    appearance: none; /* Remove default system dropdown styling */
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>'); /* Custom dropdown arrow */
    background-repeat: no-repeat;
    background-position: right 10px center; /* Position for the dropdown arrow */
    background-size: 12px; /* Size of the dropdown arrow */
}

/* Hover effects for dropdown */
.select:hover {
    background-color: #797676; /* Slightly lighter on hover to indicate interactiveness */
    border-color: #797676; /* Matching border color on hover */
}

/* Focus effects to enhance accessibility */
.select:focus {
    outline: none; /* Removes default focus outline */
    box-shadow: 0 0 0 2px #1f4287; /* Custom focus ring around the select */
}
