:root {
  --bg-1: #002a73;
  --bg-2: #003c95;
  --bg-3: #0058cc;
  --panel: rgba(255,255,255,0.10);
  --panel-strong: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.18);
  --text: #f7fbff;
  --muted: rgba(239,245,255,0.76);
  --primary: #ffffff;
  --primary-text: #004aad;
  --accent: #8cc8ff;
  --shadow: 0 20px 60px rgba(0, 20, 66, 0.36);
  --danger: #ff7373;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.12), transparent 24%),
    radial-gradient(circle at left bottom, rgba(135,197,255,0.14), transparent 22%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2) 50%, var(--bg-3));
}
a { color: inherit; }
.page-shell {
  width: min(1040px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 36px;
}
.hero {
  text-align: center;
  padding: 6px 0 18px;
}
.hero--compact { padding-top: 0; }
.hero__topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.hero__logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.hero__logo {
  display: block;
  width: min(180px, 38vw);
  height: auto;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,0.28));
}
.hero__logo--small { width: min(88px, 20vw); }
.hero__title {
  margin: 12px 0 6px;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.03;
  letter-spacing: .01em;
}
.hero__title--sm {
  font-size: clamp(26px, 4vw, 38px);
}
.hero__lead {
  margin: 0 auto;
  max-width: 700px;
  color: var(--muted);
  font-size: 16px;
}
.hero__meta-chip {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.10);
  color: var(--muted);
  font-size: 13px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.uploader-card, .share-card, .legal-card { margin-top: 8px; }
.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.field span {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}
.field input,
.share-link-box input {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: 16px;
  padding: 15px 16px;
  outline: none;
}
.field input::placeholder,
.share-link-box input::placeholder { color: rgba(255,255,255,0.48); }
.dropzone {
  display: block;
  margin-top: 18px;
  border: 2px dashed rgba(255,255,255,0.26);
  border-radius: 24px;
  padding: 34px 18px;
  text-align: center;
  cursor: pointer;
  background: rgba(255,255,255,0.05);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.dropzone input { display: none; }
.dropzone:hover,
.dropzone.is-dragover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: rgba(255,255,255,0.09);
}
.dropzone__icon { font-size: 38px; margin-bottom: 10px; }
.dropzone__title { font-size: 22px; font-weight: 700; }
.dropzone__subtitle,
.dropzone__hint,
.muted { color: var(--muted); }
.dropzone__subtitle { margin-top: 8px; }
.dropzone__hint { margin-top: 10px; font-size: 14px; }
.selected-files { margin-top: 18px; }
.selected-files.is-empty {
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 18px;
  padding: 18px;
  color: var(--muted);
}
.file-pill,
.upload-row,
.share-item--card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
}
.file-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.file-pill__name,
.upload-row__name,
.share-item__name { font-weight: 700; word-break: break-word; }
.file-pill__meta,
.share-item__meta,
.upload-row__status,
.share-item__meta-grid { color: var(--muted); font-size: 14px; }
.actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.actions-row--tight { margin-top: 16px; }
.actions-row--legal { justify-content: center; margin-top: 26px; }
.btn {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .16s ease, background .16s ease, opacity .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--primary);
  color: var(--primary-text);
}
.btn--ghost {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid var(--border);
}
.status-panel, .result-panel { margin-top: 24px; }
.status-panel__top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.status-panel__top h2,
.result-panel h2,
.legal-block h2 { margin: 0; }
.progress {
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.10);
  border-radius: 999px;
  overflow: hidden;
}
.progress--global { margin-bottom: 16px; }
.progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7db8ff, #ffffff);
  border-radius: 999px;
  transition: width .18s ease;
}
.uploads-list { display: grid; gap: 12px; }
.upload-row { padding: 14px 16px; }
.upload-row__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.upload-row.is-error {
  border-color: rgba(255,115,115,0.38);
}
.result-panel {
  text-align: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 24px;
}
.result-panel__icon { font-size: 36px; }
.share-link-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}
.notice {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07);
}
.notice--warn {
  border-color: rgba(255,185,84,0.38);
  background: rgba(255,185,84,0.12);
}
.share-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.summary-pill {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}
.summary-pill span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}
.summary-pill strong {
  display: block;
  font-size: 16px;
}
.share-list {
  display: grid;
  gap: 14px;
}
.share-item--card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}
.share-item__meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}
.share-item__actions {
  flex: 0 0 auto;
}
.legal-block + .legal-block {
  margin-top: 22px;
}
.legal-block p {
  color: var(--muted);
  line-height: 1.6;
  margin: 10px 0 0;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 8px 2px 2px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer a { text-decoration: underline; }
.install-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  font-size: 30px;
  background: #ffffff;
  color: #004aad;
  box-shadow: 0 18px 38px rgba(0, 28, 90, 0.34);
  z-index: 50;
}
.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 10, 30, 0.65);
  backdrop-filter: blur(6px);
}
.modal__dialog {
  position: relative;
  width: min(460px, calc(100vw - 28px));
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.16);
  background: linear-gradient(180deg, rgba(0,74,173,0.98), rgba(0,48,122,0.98));
  box-shadow: var(--shadow);
  text-align: center;
}
.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.modal__logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 10px;
}
.modal__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .share-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-footer {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 680px) {
  .page-shell { width: min(100vw - 20px, 1000px); }
  .card { padding: 18px; border-radius: 22px; }
  .share-link-box { grid-template-columns: 1fr; }
  .status-panel__top,
  .upload-row__top,
  .share-item--card {
    flex-direction: column;
    align-items: stretch;
  }
  .share-summary {
    grid-template-columns: 1fr;
  }
}

.cookie-popup[hidden] { display:none !important; }
.cookie-popup {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.18);
  background: linear-gradient(180deg, rgba(11,79,190,0.98), rgba(7,50,122,0.98));
  box-shadow: 0 24px 60px rgba(0, 18, 60, 0.45);
  backdrop-filter: blur(14px);
}
.cookie-popup__text {
  color: var(--text);
  line-height: 1.45;
}
.cookie-popup__actions { flex: 0 0 auto; }

.share-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.08));
}
.share-actions { justify-content: center; }
.share-item__content { flex: 1 1 auto; }

@media (max-width: 680px) {
  .cookie-popup {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
  }
}
