/* Base */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #111;

  /* BACKGROUND IMAGE */
  background-image: url("background.jpg"); /* <- положи сюда картинку фона и назови background.jpg */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Slight overlay for readability */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  padding: 18px 22px;
}

.pill {
  border: 2px solid #222;
  background: #e6e6e6;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
}
.pill.active {
  background: #cfcfcf;
}

.page {
  position: relative;
  z-index: 1;
}

.grid {
  max-width: 1200px;
  margin: 40px auto 0;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: 1fr 0.9fr 1fr;
  gap: 44px;
  align-items: start;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dropzone {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #d9d9d9;
  border: 3px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.card:first-child .dropzone {
  border-color: #002fff;
}
.card:last-child .dropzone {
  border-color: #ff0000;
}

.zoneHint {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  font-weight: 700;
  font-size: 16px;
  text-align: left;
  color: #111;
  opacity: 0.85;
}

#picturePreview {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.textPreview {
  width: 100%;
  height: 100%;
  padding: 56px 16px 16px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  white-space: pre-wrap;
  word-break: break-word;
  color: #111;
}

.action {
  width: 100%;
  padding: 14px 16px;
  font-weight: 900;
  border: none;
  cursor: pointer;
  color: #fff;
  letter-spacing: 0.6px;
  border-radius: 0;
}

.action.blue {
  background: #002fff;
}
.action.red {
  background: #ff0000;
}
.action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.help {
  margin: 0;
  font-size: 13px;
  opacity: 0.8;
}

.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 0px;
}

.title {
  translate: 0px -80px;
  margin: 0;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 900;
  text-align: center; /* <- ровно по центру */
}

.subtitle {
  translate: 0px 250px;
  margin: 0;
  max-width: 320px;
  font-size: 14px;
  opacity: 0.85;
}

.footnote {
  margin-top: 34px;
  font-size: 12px;
  opacity: 0.75;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  z-index: 20;
  padding: 18px;
}
.modal.open {
  display: flex;
}

.modalCard {
  width: min(560px, 100%);
  background: #fff;
  border: 2px solid #111;
  border-radius: 14px;
  padding: 16px;
}

.modalCard h2 {
  margin: 0 0 6px 0;
}

.modalHint {
  margin: 0 0 12px 0;
  opacity: 0.8;
  font-size: 13px;
}

textarea {
  width: 100%;
  resize: vertical;
  padding: 12px;
  border: 2px solid #222;
  border-radius: 10px;
  font-size: 16px;
  line-height: 1.35;
  outline: none;
}

.modalRow {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.error {
  color: #c40000;
  font-size: 13px;
  font-weight: 700;
  min-height: 18px;
}
.authBox {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.authName {
  font-weight: 800;
  background: rgba(255,255,255,0.65);
  border: 2px solid rgba(0,0,0,0.25);
  padding: 8px 12px;
  border-radius: 999px;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .center {
    translate: 0px 0px;
    height: 100px;
    margin-top: 0;
    flex-direction: row;
  }
  .title{
    translate: 0px 0px;
    font-size: 30px;
  }
}
