:root {
    --item-bg: #1f1f1f;
    --input-focus: #4a90e2;
}

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

body {
    background-color: var(--item-bg);
    color: #f2f2f2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.form-container {
    background-color: #2d2d2d;
    border-radius: 8px;
    padding: 20px 40px 40px 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    margin: 20px;
}

h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #f2f2f2;
    text-align: center;
}

label {
    display: block;
    margin-top: 10px;
    color: #bbbbbb;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    background-color: #3b3b3b;
    border: 1px solid #444444;
    border-radius: 4px;
    color: #f2f2f2;
    font-size: 16px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #5a5a5a;
    outline: none;
}

button {
    width: 100%;
    padding: 12px;
    background-color: var(--input-focus);
    border: none;
    border-radius: 4px;
    color: #f2f2f2;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

button:hover {
    background-color: #3b5a77;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 40px; /* щоб кнопка не перекривала текст */
    box-sizing: border-box; /* дуже важливо */
}

.toggle-password {
    width: 25px;
    height: 25px;
    position: absolute;
    left: 89%;
    top: 15%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.toggle-password img {
    width: 22px;
    height: 22px;
    fill: #777;
    transition: 0.2s;
}

.toggle-password:hover {
    background-color: rgba(0, 0, 0, 0) !important;
}

.toggle-password:hover img {
    transform: scale(1.1);
}

.redirect {
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

.redirect a {
    color: #4a76a8;
    text-decoration: none;
    font-weight: bold;
}

.redirect a:hover {
    text-decoration: underline;
}

.back-arrow {
    display: inline-block;
    padding: 10px 15px;
    margin-bottom: 35px;
    background-color: #333;
    color: #fff;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.back-arrow:hover {
    background-color: #555;
}

.back-arrow span {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
}
