/* Контейнер страницы */
h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

p {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #555;
}

/* Форма решателя */
.solver-form {
  max-width: 750px;
  width: 100%
  margin: 0 auto;
  padding: 2rem;
  background: #f9fafb;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Ряды формы */
.form-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
}

.form-row label {
  font-weight: 600;
  color: #444;
}

/* Поля */
.form-row input,
.form-row select,
.form-row textarea {
  padding: 0.7rem 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border 0.2s, box-shadow 0.2s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: #0077ff;
  box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.15);
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Динамические текстовые поля */
#text-fields input {
  display: block;
  margin-bottom: 0.6rem;
}

/* Кнопки */
.btn {
  align-self: flex-start;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  background: #1d4ed8;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  background: #0f3fbf;
  transform: translateY(-2px);
}

.btn-orange {
  background: #f97316;
  margin-top: 0.5rem;
}

.btn-orange:hover {
  background: #ea580c;
}

/* Блок решения */
.solution {
  max-width: 750px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.solution h3 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  color: #f97316;
}

.solution pre {
  white-space: pre-wrap;
  font-family: Consolas, monospace;
  font-size: 1rem;
  color: #333;
  background: #f4f4f4;
  padding: 1rem;
  border-radius: 8px;
}

.form-row label{
    flex: 0 0 0px;
}

.text-fields{
width: 100%;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 40%;
}


.cipher-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.cipher-table th,
.cipher-table td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: center;
}

.cipher-table input {
  width: 90%;
  padding: 0.4rem;
  text-align: center;
}


/* Общий стиль форм */
.solver-form {
  max-width: 750px;
  width: 100%;
  margin: 1.5rem auto;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Ряды формы */
.solver-form label {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.3rem;
  display: block;
}

.solver-form input,
.solver-form select,
.solver-form textarea {
  width: 40%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border 0.2s, box-shadow 0.2s;
}

.solver-form input:focus,
.solver-form select:focus,
.solver-form textarea:focus {
  border-color: #0077ff;
  box-shadow: 0 0 0 2px rgba(0, 119, 255, 0.15);
  outline: none;
}

.solver-form textarea {
  resize: vertical;
  min-height: 100px;
}

/* Кнопки */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #0077ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn:hover {
  background: #005fcc;
}

.btn:active {
  transform: scale(0.98);
}

.btn-orange {
  background: #ff7b2f;
}

.btn-orange:hover {
  background: #e8691f;
}

/* Блок выбора задания */
.form-row {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
}

/* Таблица для задания 2 */
.cipher-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.8rem;
}

.cipher-table th,
.cipher-table td {
  border: 1px solid #ddd;
  padding: 0.5rem;
  text-align: center;
}

.cipher-table th {
  background: #f1f3f5;
  font-weight: 600;
}

.cipher-table input {
  width: 90%;
  padding: 0.4rem;
  text-align: center;
}

/* Блок решения */
.solution {
  max-width: 750px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #f0f9ff;
  border-left: 6px solid #0077ff;
  border-radius: 8px;
}

.solution h3 {
  margin-top: 0;
}

.solution ol {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.solution pre {
  background: #f8f9fa;
  padding: 0.8rem;
  border-radius: 6px;
}

input{
width: 80%;
}
