* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f5f2ee;
  color: #292725;
}

button,
input {
  font: inherit;
}

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 28px auto;
}

.hero {
  min-height: 310px;
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(110deg, rgba(248,246,243,.98) 0%, rgba(248,246,243,.92) 48%, rgba(196,183,169,.45) 100%);
  box-shadow: 0 18px 60px rgba(40,32,25,.10);
  display: flex;
  align-items: center;
}

.smallHero {
  min-height: 230px;
}

.cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.heroText {
  position: relative;
  z-index: 2;
  width: 52%;
  padding: 52px;
  background: linear-gradient(90deg, rgba(248,246,243,.96), rgba(248,246,243,.78), transparent);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: .28em;
  color: #a77e4e;
  margin-bottom: 12px;
  font-weight: 700;
}

.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(44px, 7vw, 74px);
  line-height: .95;
  margin: 0 0 18px;
  font-weight: 500;
}

.hero p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  max-width: 430px;
}

.card {
  margin: 26px auto 0;
  background: white;
  border-radius: 24px;
  padding: 34px;
  box-shadow: 0 16px 50px rgba(40,32,25,.08);
}

.dropZone {
  min-height: 330px;
  border: 2px dashed #c8b39a;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 35px;
  transition: .2s;
}

.dropZone.drag {
  background: #faf6f1;
  border-color: #8b6945;
  transform: scale(1.005);
}

.uploadIcon,
.successIcon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #f0e7dd;
  display: grid;
  place-items: center;
  font-size: 32px;
  margin-bottom: 14px;
  color: #876543;
}

.dropZone h2,
.result h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
  font-size: 30px;
  margin: 7px 0;
}

.dropZone p {
  color: #777;
  margin: 7px;
}

button,
.buttonLink {
  border: 0;
  border-radius: 11px;
  padding: 13px 22px;
  cursor: pointer;
  text-decoration: none;
  transition: .15s;
}

#selectButton,
.primary {
  background: #282624;
  color: white;
}

#selectButton:hover,
.primary:hover {
  opacity: .88;
}

.secondary {
  background: #eee8e1;
  color: #39342f;
}

.limits {
  margin-top: 20px;
  font-size: 13px;
  color: #837b73;
}

.fileSection {
  margin-top: 26px;
}

.fileItem,
.downloadItem {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 15px 4px;
  border-bottom: 1px solid #eee9e4;
}

.fileName {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.fileSize {
  color: #8b837b;
  white-space: nowrap;
  font-size: 13px;
}

#uploadButton {
  width: 100%;
  margin-top: 24px;
  font-weight: 700;
  font-size: 16px;
}

.hidden {
  display: none !important;
}

.progressTrack {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #eee8e1;
  margin-top: 20px;
}

.progressBar {
  width: 0;
  height: 100%;
  background: #292725;
  transition: width .2s;
}

.progressText {
  margin-top: 10px;
  text-align: center;
  color: #716a64;
}

.result {
  text-align: center;
  padding: 25px 0 10px;
}

.result .successIcon {
  margin: 0 auto 18px;
}

.linkBox {
  margin: 25px auto 15px;
  display: flex;
  max-width: 760px;
  gap: 8px;
}

.linkBox input {
  flex: 1;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dcd4cc;
  border-radius: 10px;
  background: #faf9f7;
}

.linkBox button {
  background: #282624;
  color: white;
}

.expiry {
  color: #837b73;
  font-size: 14px;
}

.error {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #fff0ef;
  color: #8b2b25;
  border: 1px solid #f0c8c5;
}

.downloadHeader {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  margin-bottom: 20px;
}

.downloadHeader h2 {
  margin-bottom: 5px;
}

.downloadHeader p {
  color: #81786f;
  margin: 0;
}

.downloadItem a {
  color: #292725;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

footer {
  padding: 25px 10px 10px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  color: #8a8179;
}

.centerPage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 25px;
}

.messageCard {
  width: min(520px, 100%);
  background: white;
  border-radius: 22px;
  padding: 45px;
  text-align: center;
  box-shadow: 0 16px 50px rgba(40,32,25,.1);
}

.messageCard h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 38px;
}

.messageCard a {
  display: inline-block;
  margin-top: 15px;
  color: white;
  background: #292725;
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
}

@media (max-width: 700px) {
  .page {
    width: min(100% - 18px, 1080px);
    margin-top: 9px;
  }

  .hero {
    min-height: 260px;
  }

  .heroText {
    width: 85%;
    padding: 30px;
  }

  .card {
    padding: 18px;
  }

  .dropZone {
    min-height: 290px;
  }

  .downloadHeader {
    align-items: stretch;
    flex-direction: column;
  }

  footer {
    flex-direction: column;
    gap: 5px;
  }
}

/* ===== MINIATURY PLIKOW ===== */

.downloadList {
  display: grid;
  gap: 12px;
}

.downloadItem {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eee8e2;
  border-radius: 15px;
  background: #fcfbfa;
}

.filePreview {
  width: 116px;
  height: 82px;
  border-radius: 11px;
  overflow: hidden;
  background: #eee9e3;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.filePreview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fileTypeBadge {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: #ded5cb;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  color: #50483f;
}

.downloadFileInfo {
  min-width: 0;
}

.downloadSingle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #292725;
  color: white !important;
  padding: 11px 17px;
  border-radius: 10px;
  text-decoration: none;
}

.downloadSingle:hover {
  opacity: .87;
}

@media (max-width: 620px) {
  .downloadItem {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .filePreview {
    width: 86px;
    height: 70px;
  }

  .downloadSingle {
    grid-column: 1 / -1;
    width: 100%;
  }
}
