:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #f7fbff;
  background: #071b31;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 32px);
  overflow-x: hidden;
  overflow-y: auto;
  background: #071b31 url("/assets/Background.webp") center / cover no-repeat;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgb(4 18 42 / 76%),
    rgb(10 59 91 / 38%) 55%,
    rgb(3 20 38 / 72%)
  );
}

.card {
  position: relative;
  z-index: 1;
  width: min(500px, 100%);
  margin: auto;
  padding: clamp(24px, 6vw, 42px);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 24px;
  background: rgb(7 25 51 / 78%);
  box-shadow: 0 24px 80px rgb(1 14 30 / 40%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgb(255 255 255 / 13%), transparent 36%);
}

h1 {
  position: relative;
  margin: 0 0 12px;
  font-size: clamp(2rem, 8vw, 3rem);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

p {
  position: relative;
  color: rgb(239 248 255 / 78%);
  line-height: 1.65;
}

.button,
button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 12px;
  padding: 13px 18px;
  background: linear-gradient(135deg, #6b8cff, #4165da);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px rgb(55 94 219 / 30%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.button:hover,
button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 14px 30px rgb(55 94 219 / 40%);
}

.button:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgb(166 186 255 / 80%);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.link {
  justify-self: start;
  border: 0;
  padding: 8px 0;
  background: none;
  color: #c8d5ff;
  box-shadow: none;
  font-weight: 600;
}

.link:hover {
  background: none;
  box-shadow: none;
}

.status {
  min-height: 1.5em;
  margin-top: 20px;
  color: #e1edff;
}

form {
  position: relative;
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 7px;
  color: #e8f1ff;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 10px;
  padding: 12px;
  background: rgb(2 16 38 / 72%);
  color: #fff;
  font: inherit;
}

option {
  color: #111;
}

label small {
  display: block;
  margin-top: 1px;
  color: rgb(225 237 255 / 68%);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
}

/* The invisible file input remains clickable across desktop and mobile browsers. */
input[type="file"] {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  display: none;
}

.file-dropzone {
  position: relative;
  display: grid;
  gap: 5px;
  overflow: hidden;
  border: 1px dashed rgb(157 181 255 / 65%);
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgb(25 57 101 / 72%), rgb(8 29 57 / 72%));
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.file-dropzone:hover,
.file-dropzone.is-dragging {
  border-color: #a6baff;
  background: linear-gradient(135deg, rgb(48 82 145 / 80%), rgb(13 42 76 / 82%));
  transform: translateY(-1px);
}

.file-dropzone-title,
.file-dropzone-action,
.file-dropzone-name,
.file-dropzone small {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.file-dropzone-title {
  color: #f5f8ff;
  font-size: 1rem;
  font-weight: 800;
}

.file-dropzone-action {
  color: #cbd9ff;
  font-size: 0.8rem;
  font-weight: 700;
}

.file-dropzone-name {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview {
  position: relative;
  z-index: 2;
  width: 100%;
  max-height: 128px;
  object-fit: cover;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 11px;
  box-shadow: 0 10px 24px rgb(0 0 0 / 20%);
}

.image-remove {
  z-index: 3;
  justify-self: start;
  min-height: 36px;
  border: 1px solid rgb(255 150 170 / 42%);
  border-radius: 8px;
  padding: 6px 10px;
  background: rgb(129 39 67 / 62%);
  color: #ffe8ed;
  font-size: 0.78rem;
  box-shadow: none;
}

.image-remove:hover {
  background: rgb(163 48 82 / 80%);
  box-shadow: none;
}

@media (max-width: 520px) {
  body {
    place-items: start center;
    background-attachment: scroll;
  }

  .card {
    width: 100%;
    margin: 0;
    border-radius: 20px;
  }
}

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