
/* Keep Jirafeau's functional styles, then override the visual layer. */
@import url("../courgette/style.css.php");

:root {
  --lw-text: #ffffff;
  --lw-text-muted: rgba(255, 255, 255, 0.76);
  --lw-glass: rgba(255, 255, 255, 0.16);
  --lw-glass-strong: rgba(255, 255, 255, 0.24);
  --lw-glass-border: rgba(255, 255, 255, 0.48);
  --lw-control: rgba(255, 255, 255, 0.88);
  --lw-black: #08090b;
  --lw-radius: 32px;
  --lw-control-radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #111820;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--lw-text);
  background: #111820;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "SF Pro Text", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Two layers alternate, giving a soft six-image crossfade. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -2%;
  z-index: 0;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.025);
  will-change: opacity, background-image;
}

body::before {
  background-image:
    linear-gradient(135deg, rgba(5, 10, 18, 0.42), rgba(7, 14, 24, 0.20)),
    url("backgrounds/a.webp");
  animation: lw-layer-a-image 60s steps(1, end) infinite,
             lw-layer-a-opacity 60s ease-in-out infinite;
}

body::after {
  background-image:
    linear-gradient(135deg, rgba(5, 10, 18, 0.42), rgba(7, 14, 24, 0.20)),
    url("backgrounds/b.webp");
  opacity: 0;
  animation: lw-layer-b-image 60s steps(1, end) infinite,
             lw-layer-b-opacity 60s ease-in-out infinite;
}

@keyframes lw-layer-a-image {
  0%, 30% {
    background-image:
      linear-gradient(135deg, rgba(5, 10, 18, 0.42), rgba(7, 14, 24, 0.20)),
      url("backgrounds/a.webp");
  }
  31%, 63% {
    background-image:
      linear-gradient(135deg, rgba(5, 10, 18, 0.42), rgba(7, 14, 24, 0.20)),
      url("backgrounds/c.webp");
  }
  64%, 96% {
    background-image:
      linear-gradient(135deg, rgba(5, 10, 18, 0.42), rgba(7, 14, 24, 0.20)),
      url("backgrounds/e.webp");
  }
  97%, 100% {
    background-image:
      linear-gradient(135deg, rgba(5, 10, 18, 0.42), rgba(7, 14, 24, 0.20)),
      url("backgrounds/a.webp");
  }
}

@keyframes lw-layer-b-image {
  0%, 46% {
    background-image:
      linear-gradient(135deg, rgba(5, 10, 18, 0.42), rgba(7, 14, 24, 0.20)),
      url("backgrounds/b.webp");
  }
  47%, 79% {
    background-image:
      linear-gradient(135deg, rgba(5, 10, 18, 0.42), rgba(7, 14, 24, 0.20)),
      url("backgrounds/d.webp");
  }
  80%, 100% {
    background-image:
      linear-gradient(135deg, rgba(5, 10, 18, 0.42), rgba(7, 14, 24, 0.20)),
      url("backgrounds/f.webp");
  }
}

@keyframes lw-layer-a-opacity {
  0%, 13% { opacity: 1; }
  18%, 30% { opacity: 0; }
  35%, 46% { opacity: 1; }
  51%, 63% { opacity: 0; }
  68%, 79% { opacity: 1; }
  84%, 96% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes lw-layer-b-opacity {
  0%, 13% { opacity: 0; }
  18%, 30% { opacity: 1; }
  35%, 46% { opacity: 0; }
  51%, 63% { opacity: 1; }
  68%, 79% { opacity: 0; }
  84%, 96% { opacity: 1; }
  100% { opacity: 0; }
}

#content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 24px 28px;
}

h1 {
  margin: 0 0 20px;
  text-align: center;
}

/* Temporary text logo. Replace later with an SVG if desired. */
h1 a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  left: auto;
  color: var(--lw-text);
  background: none;
  text-indent: 0;
  text-decoration: none;
  letter-spacing: -0.045em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.42);
}

h1 a {
  font-size: 0;
}

h1 a::before {
  content: "Lorentz Works";
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 650;
  line-height: 1;
}

h1 a::after {
  content: "File Transfer";
  margin-top: 8px;
  color: var(--lw-text-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h2,
h3,
legend {
  color: var(--lw-text);
  font-weight: 620;
  letter-spacing: -0.02em;
}

#upload {
  width: 100%;
}

#upload > form:not(.logout),
#content > form.form.login,
#password_form,
#download,
.message,
.info,
.error {
  position: relative;
  width: min(100%, 650px);
  margin-inline: auto;
  padding: clamp(22px, 5vw, 42px);
  overflow: hidden;
  color: var(--lw-text);
  background: var(--lw-glass);
  border: 1px solid var(--lw-glass-border);
  border-radius: var(--lw-radius);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  backdrop-filter: blur(26px) saturate(165%);
}

#upload > form:not(.logout)::after,
#content > form.form.login::after,
#password_form::after,
#download::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.27), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,.10), transparent 48%);
  box-shadow: inset -10px -8px 24px -18px rgba(255, 255, 255, 0.92);
}

#upload > form:not(.logout) > *,
#content > form.form.login > *,
#password_form > *,
#download > * {
  position: relative;
  z-index: 1;
}

/* Upload-password screen uses form.form.login in Jirafeau. */
#content > form.form.login {
  text-align: left;
}

#content > form.form.login fieldset,
#content > form.form.login table,
#content > form.form.login tbody,
#content > form.form.login tr,
#content > form.form.login td {
  display: block;
  width: 100%;
  height: auto;
}

#content > form.form.login table {
  border-collapse: collapse;
}

#content > form.form.login td {
  padding: 0;
}

#content > form.form.login td.label {
  margin-bottom: 9px;
  color: var(--lw-text);
  font-size: 15px;
  font-weight: 560;
}

#content > form.form.login tr.nav td:empty {
  display: none;
}

#content > form.form.login tr.nav td.nav.next {
  display: block !important;
}

#content > form.form.login tr.nav {
  margin-top: 14px;
}

#content > form.form.login input[type="submit"] {
  display: block !important;
  position: static !important;
  visibility: visible !important;
  width: 100%;
  margin: 0;
  opacity: 1 !important;
}

.form.logout {
  margin-top: 14px;
  text-align: center;
}

.form.logout input[type="submit"] {
  min-height: 40px;
  margin: 0;
  padding: 8px 17px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(8, 10, 14, 0.46);
  font-size: 13px;
  box-shadow: none;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

fieldset {
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 12px 0 0;
  color: var(--lw-text);
  background: transparent;
  border: 0;
  border-radius: 0;
}

legend {
  min-width: 0;
  margin: 0 auto 14px;
  padding: 0 12px;
  color: var(--lw-text);
  background: transparent;
  font-size: clamp(22px, 4vw, 30px);
  text-align: center;
}

#upload fieldset {
  background: none;
}

#upload fieldset:hover {
  border-color: transparent;
}

#upload:not(.file-selected) fieldset::before,
#upload:not(.file-selected) fieldset::after {
  position: absolute;
  left: 50%;
  z-index: 0;
  width: calc(100% - 48px);
  transform: translateX(-50%);
  pointer-events: none;
  text-align: center;
}

#upload:not(.file-selected) fieldset::before {
  content: "Przeciągnij plik tutaj";
  top: 47%;
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

#upload:not(.file-selected) fieldset::after {
  content: "lub kliknij, aby wybrać";
  top: calc(47% + 34px);
  color: var(--lw-text-muted);
  font-size: 14px;
}

#file_select {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 190px;
  cursor: pointer;
  opacity: 0;
}

#upload.file-selected #file_select {
  height: auto;
  min-height: 46px;
  padding: 7px;
  color: #111318;
  background: var(--lw-control);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--lw-control-radius);
  opacity: 1;
}

#file_select::file-selector-button {
  margin-right: 12px;
  padding: 10px 15px;
  color: #fff;
  background: var(--lw-black);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 620;
  cursor: pointer;
}

#option_table,
#options {
  width: 100%;
  color: var(--lw-text);
}

#option_table td {
  padding: 7px 5px;
}

select,
input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  color: #111318;
  background: var(--lw-control);
  border: 1px solid rgba(255, 255, 255, 0.70);
  border-radius: var(--lw-control-radius);
  outline: none;
  font: inherit;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}

select:focus,
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.20);
}

input[type="submit"],
button,
.button {
  min-height: 48px;
  margin: 12px 6px;
  padding: 12px 24px;
  color: #fff;
  background: var(--lw-black);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  transition: transform .18s ease, background-color .18s ease,
              box-shadow .18s ease;
}

input[type="submit"]:hover,
input[type="submit"]:focus,
button:hover,
button:focus,
.button:hover,
.button:focus {
  top: auto;
  margin-bottom: 12px;
  background: #202329;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 11px 30px rgba(0, 0, 0, 0.28);
}

a {
  color: #fff;
  text-underline-offset: 3px;
}

#upload_finished,
#uploading,
.message,
.info,
.error,
#uploaded_percentage,
#upload_finished a,
#uploading a {
  color: var(--lw-text);
}

#upload_finished,
#uploading {
  padding: 16px;
  text-align: center;
}

/* Finished-upload screen: one glass card with compact link rows. */
#upload_finished {
  position: relative;
  width: min(100%, 700px);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 36px);
  overflow: hidden;
  color: var(--lw-text);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid var(--lw-glass-border);
  border-radius: var(--lw-radius);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(255, 255, 255, 0.14);
  text-align: left;
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  backdrop-filter: blur(26px) saturate(165%);
}

#upload_finished::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.25), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,.10), transparent 48%);
  box-shadow: inset -10px -8px 24px -18px rgba(255, 255, 255, 0.92);
}

#upload_finished > * {
  position: relative;
  z-index: 1;
}

#upload_finished > p:first-child {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 680;
  letter-spacing: -0.03em;
  text-align: center;
}

#upload_finished > div {
  margin-top: 11px;
  padding: 14px;
  background: rgba(10, 14, 20, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
}

#upload_finished > div > p {
  margin: 0;
}

#upload_finished > div > p:first-child {
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#upload_finished_download_page > p:last-child,
#upload_finished_preview > p:last-child,
#upload_direct_download > p:last-child,
#upload_delete > p:last-child {
  display: flex;
  align-items: stretch;
  gap: 9px;
}

#upload_link,
#preview_link,
#direct_link,
#delete_link {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  min-height: 46px;
  padding: 10px 13px;
  overflow-wrap: anywhere;
  color: #111318 !important;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 13px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.04);
}

#upload_finished button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 108px;
  min-height: 46px;
  margin: 0;
  padding: 10px 15px;
  border-radius: 13px;
  font-size: 0;
}

#upload_finished button::before {
  content: "";
  width: 17px;
  height: 17px;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/%3E%3C/svg%3E");
}

#upload_finished button::after {
  content: "Kopiuj";
  font-size: 13px;
  font-weight: 680;
}

#upload_finished button:active::after {
  content: "Skopiowano";
}

#upload_delete {
  border-color: rgba(255, 190, 190, 0.25) !important;
}

#upload_validity {
  text-align: center;
}

#upload_validity > p:last-child {
  color: #fff;
  font-size: 14px;
  font-weight: 620;
}

#copyright {
  position: relative;
  z-index: 1;
  margin: 24px auto 0;
  padding: 8px 14px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(8, 12, 18, 0.18);
  border-radius: 999px;
  font-size: 12px;
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.48);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

#copyright a {
  color: rgba(255, 255, 255, 0.86);
}

textarea[readonly="readonly"] {
  color: var(--lw-text);
  background: rgba(0, 0, 0, 0.15);
  font-family: inherit;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #upload > form:not(.logout),
  #content > form.form.login,
  #password_form,
  #download,
  .message,
  .info,
  .error {
    background: rgba(20, 26, 35, 0.92);
  }
}

@media (max-width: 640px) {
  #content {
    justify-content: flex-start;
    padding: 28px 14px 20px;
  }

  h1 {
    margin-bottom: 16px;
  }

  #upload > form:not(.logout),
  #content > form.form.login,
  #password_form,
  #download,
  .message,
  .info,
  .error {
    padding: 22px 16px;
    border-radius: 24px;
  }

  #option_table td {
    display: block;
    width: 100%;
    padding: 4px 0;
  }

  #option_table tr {
    display: block;
    height: auto;
    margin-bottom: 10px;
  }

  #copyright {
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  body::before {
    animation: none;
  }

  body::after {
    display: none;
  }
}
