* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  background-image: url('./bg.png');
  background-size: cover;       /* Сохраняет пропорции и покрывает весь экран */
  background-position: center;  /* Центрирует изображение */
  background-attachment: fixed;  /* Фон не прокручивается */
  color: white;
  padding: 20px;                /* Отступы на маленьких экранах */
}

.window {
  width: min(1080px, 100%);     /* Не выходит за границы экрана */
  max-width: 100%;
  background-color: rgba(0, 0, 0, 0.45); /* Чуть темнее для лучшей читаемости */
  backdrop-filter: blur(6px);   /* Современный эффект стекла (опционально) */
  border-radius: 16px;
  padding: 30px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.window p {
  width: 90%;
  max-width: 700px;
  text-align: center;
  padding-top: 20px;
  line-height: 1.6;
  font-size: 1.1em;
}

/* === Форма === */
.form-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  width: 90%;
  max-width: 700px;
}
/* === Таблица регистрации === */
table.registration-form {
  width: 90%;
  border-collapse: collapse;
  margin: 24px auto 0;
  border-radius: 12px;
  overflow: hidden;
}

table.registration-form td {
  padding: 14px 20px;
  vertical-align:center /* чтобы подсказки не съезжали */
}

table.registration-form td:first-child {
  font-weight: 600;
  text-align: right;
  color: #a0d2ff;
  width: 20%; /* немного уменьшил, чтобы поле ввода не сжималось */
}

table.registration-form td:last-child {
  text-align: left;
  font-size: 0.9em;
  padding-left: 16px;
}

/* Подсказки */
table.registration-form .hint {
  color: #a0d2ff;
  font-style: italic;
  line-height: 1.4;
}
table.registration-form td:nth-child(2) {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  width: 40%;
}
table.registration-form input:not([type="checkbox"]),
table.registration-form select,
table.registration-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  transition: border-color 0.3s, background 0.3s;
}

table.registration-form input:focus,
table.registration-form select:focus,
table.registration-form textarea:focus {
  outline: none;
  border-color: #4da6ff;
  background: rgba(255, 255, 255, 0.15);
}
/* Иконки валидации (если Font Awesome подключён) */
table.registration-form .fa {
  margin-left: 8px;
  display: none; /* по умолчанию скрыты — покажутся JS */
}
.form-row label {
  text-align: right;
  padding-right: 10px;
  font-weight: 500;
}

.form-row input:not([type="checkbox"]),
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  transition: border-color 0.3s, background 0.3s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #4da6ff;
  background: rgba(255, 255, 255, 0.15);
}

/* === Чекбокс === */
.checkbox-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 90%;
  max-width: 700px;
  margin: 12px 0;
}

.checkbox-row label {
  margin-left: 10px;
  cursor: pointer;
  font-weight: 500;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* === Кнопки и ссылки === */
.buttons {
  display:flex;
  width: 90%;
  margin: 20px auto 0;
  align-items:center;
  justify-content:center;
}

.buttons a,
.buttons input[type="submit"],
.buttons input[type="button"] {
  background: transparent;
  border: none;
  color: #4da6ff;
  font-weight: bold;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.2s ease, transform 0.1s ease;
}

.buttons a:hover,
.buttons input[type="submit"]:hover,
.buttons input[type="button"]:hover {
  color: #0077ff;
  text-decoration: underline;
  transform: translateY(-1px);
}

/* === Таблица === */
table.New {
  width: 90%;
  max-width: 700px;
  border-collapse: collapse;
  margin: 24px auto 0;
  background-color: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  overflow: hidden;
}

table.New td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

table.New td:first-child {
  font-weight: 600;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  text-align: right;
  color: #a0d2ff;
  width: 50%;
}

table.New tr:last-child td {
  border-bottom: none;
}

table.New td:last-child {
  color: white;
  text-align: left;
}
a {
  color: #4da6ff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease;
}

a:hover {
  color: #0077ff;
  text-decoration: underline;
  cursor: pointer;
}
.zadanie2{
  display:flex;
  align-self: flex-end;
  margin-top:auto;
}

/* === Адаптивность для мобильных === */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .form-row label {
    text-align: left;
    padding-right: 0;
  }

  .checkbox-row {
    justify-content: flex-start;
  }

  .buttons {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  table.New td:first-child {
    text-align: left;
    border-right: none;
    width: auto;
  }
}