* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 40px 16px;
  font-family: Arial, sans-serif;
  background: #f4f5f7;
  color: #1f2937;
}

.back-button {
  position: fixed;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #ffffff;
  color: #1f2937;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
}

.back-button:hover {
  background: #f3f4f6;
}

.utm-app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

h1 {
  margin: 0 0 24px;
  font-size: 28px;
}

h2 {
  margin: 0 0 22px;
  font-size: 22px;
  font-weight: 400;
}

.main-label,
.field-group label {
  display: block;
  font-weight: 400;
}

.main-label {
  margin-bottom: 18px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
  background: #ffffff;
}

input,
textarea {
  padding: 10px 12px;
}

select {
  padding: 10px 12px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
}

input[readonly] {
  background: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

.url-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  margin-top: 8px;
}

.params-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 32px 0 24px;
}

.params-column {
  min-width: 0;
}

.field-group {
  margin-bottom: 26px;
}

.field-group label {
  margin-bottom: 6px;
  font-size: 15px;
}

.input-with-prefix {
  display: grid;
  grid-template-columns: 145px 1fr;
  width: 100%;
}

.input-with-prefix span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-right: none;
  border-radius: 4px 0 0 4px;
  background: #e5e7eb;
  font-size: 15px;
  white-space: nowrap;
}

.input-with-prefix input,
.input-with-prefix select {
  border-radius: 0 4px 4px 0;
}

.input-with-prefix select {
  margin: 0;
}

.is-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.input-with-prefix:has(.is-invalid) span {
  border-color: #dc2626;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 18px;
  font-weight: 400;
}

.checkbox input {
  width: auto;
  min-height: auto;
  margin: 0;
}

textarea {
  min-height: 120px;
  resize: vertical;
  margin-top: 8px;
}

button {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

.errors {
  margin-bottom: 16px;
  color: #dc2626;
  font-size: 14px;
  line-height: 1.5;
}

.copy-status {
  margin-top: 12px;
  color: #16a34a;
  font-size: 14px;
}

.features-block {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
}

.features-block h2 {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 700;
}

.features-block ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.features-block li {
  margin-bottom: 8px;
}

.features-block code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #e5e7eb;
  font-size: 14px;
}

.hidden {
  display: none;
}

@media (max-width: 760px) {
  body {
    padding: 56px 16px 40px;
  }

  .back-button {
    top: 12px;
    left: 12px;
    padding: 8px 12px;
    font-size: 14px;
  }

  .params-layout,
  .url-row {
    grid-template-columns: 1fr;
  }

  .input-with-prefix {
    grid-template-columns: 1fr;
  }

  .input-with-prefix span {
    justify-content: flex-start;
    border-right: 1px solid #d1d5db;
    border-radius: 4px 4px 0 0;
  }

  .input-with-prefix input,
  .input-with-prefix select {
    border-radius: 0 0 4px 4px;
  }

  .utm-app {
    padding: 20px;
  }
}
