* {
  box-sizing: border-box;
}

:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  background: #f3f5f7;
}

body {
  margin: 0;
  padding: 32px 16px;
}

.container {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: 28px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
}

h2 {
  margin: 0 0 20px;
  font-size: 21px;
  font-weight: 650;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.sender-section {
  padding-right: 24px;
  border-right: 2px solid #ddd;
}

.recipient-section,
.sender-section,
.payment-section {
  min-width: 0;
}

.image-preview {
  height: 205px;
  width: 100%;
  margin-bottom: 10px;
  border: 2px solid #b7bdc5;
  border-radius: 6px;
  background: #f7f9fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #707782;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-preview img[hidden],
#previewPlaceholder[hidden] {
  display: none;
}

.file-label,
.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
}

input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #aeb5be;
  border-radius: 5px;
  background: #fff;
  font: inherit;
  font-size: 14px;
}

input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: 13px;
}

textarea {
  resize: vertical;
  min-height: 95px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #85b8f3;
  outline-offset: 1px;
  border-color: #397bc5;
}

.two-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.field {
  min-width: 0;
  margin-bottom: 16px;
}

.hint,
small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: #69717b;
}

.notify-options {
  border: 0;
  padding: 0;
  margin: 18px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.notify-options legend {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}

.notify-options label,
.terms {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}

.notify-options input,
.terms input {
  accent-color: #397bc5;
}

.payment-section {
  max-width: 550px;
  margin: 40px auto 0;
}

.payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0 14px;
}

.card-number-field {
  grid-column: span 2;
}

.terms {
  margin-top: 8px;
  line-height: 1.5;
}

.terms a {
  color: #245d9a;
}

.send-button {
  display: block;
  width: min(100%, 420px);
  margin: 28px auto 0;
  padding: 14px 24px;
  border: 1px solid #5e9454;
  border-radius: 6px;
  background: #b8dcae;
  color: #172516;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.send-button:hover {
  background: #a4d198;
}

.send-button:active {
  transform: translateY(1px);
}

.error-list {
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid #d99b9b;
  border-radius: 6px;
  background: #fff0f0;
  color: #8d2020;
  font-size: 14px;
}

.error-list ul {
  margin-bottom: 0;
  padding-left: 22px;
}

.result-card {
  max-width: 650px;
  margin: 0 auto;
  padding: 32px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
}

.result-card h1 {
  margin-top: 0;
}

.result-image {
  display: block;
  max-width: 240px;
  max-height: 240px;
  object-fit: contain;
  margin: 20px 0;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.result-link {
  display: inline-block;
  margin-top: 16px;
  padding: 12px 18px;
  border-radius: 6px;
  background: #b8dcae;
  color: #172516;
  text-decoration: none;
  font-weight: bold;
}
