:root {
  color-scheme: light;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgb(15 118 110 / 8%), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
  color: #18212f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input {
  font: inherit;
}

button {
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    box-shadow 140ms ease;
}

button:hover {
  transform: translateY(-1px);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 178px;
  align-items: end;
  gap: 28px;
  border-bottom: 1px solid #d7e0eb;
  padding-bottom: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #08746f;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  color: #101828;
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.92;
}

h2 {
  margin-bottom: 0;
  color: #18212f;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.subtitle {
  margin-bottom: 0;
  color: #5f6b7a;
  font-size: 1.05rem;
  font-weight: 650;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status,
.lang-toggle {
  min-height: 42px;
  border: 1px solid #cbd6e4;
  border-radius: 8px;
  background: rgb(255 255 255 / 86%);
  color: #536071;
  box-shadow: 0 10px 26px rgb(17 24 39 / 6%);
}

.status {
  min-width: 132px;
  padding: 10px 14px;
  text-align: center;
}

.lang-toggle {
  min-width: 58px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 50px;
  gap: 14px;
  margin-top: 26px;
  padding: 18px;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: rgb(255 255 255 / 78%);
  box-shadow: 0 18px 44px rgb(17 24 39 / 7%);
}

.field {
  display: grid;
  gap: 8px;
  color: #596675;
  font-size: 0.86rem;
  font-weight: 850;
}

.field input {
  min-height: 48px;
  width: 100%;
  border: 1px solid #cbd6e4;
  border-radius: 8px;
  background: #ffffff;
  color: #18212f;
  padding: 0 14px;
  outline: none;
  font-weight: 650;
}

.field input::placeholder {
  color: #8a97a8;
}

.field input:focus {
  border-color: #0b7a75;
  box-shadow: 0 0 0 3px rgb(11 122 117 / 14%);
}

.icon-button,
.text-button,
.copy-button,
.webp-button,
.delete-button {
  min-height: 40px;
  border: 1px solid #cbd6e4;
  border-radius: 8px;
  background: #ffffff;
  color: #18212f;
  cursor: pointer;
  font-weight: 800;
}

.icon-button {
  align-self: end;
  width: 50px;
  min-height: 48px;
  color: #0b7a75;
  font-size: 1.25rem;
}

.icon-button:hover,
.text-button:hover,
.copy-button:hover,
.webp-button:hover,
.lang-toggle:hover {
  border-color: #0b7a75;
  background: #f1fbf9;
  box-shadow: 0 8px 18px rgb(11 122 117 / 11%);
}

.text-button,
.copy-button,
.webp-button {
  padding: 0 12px;
}

.delete-button {
  border-color: #f1b7b0;
  color: #b42318;
  padding: 0 12px;
}

.delete-button:hover {
  background: #fff4f2;
  box-shadow: 0 8px 18px rgb(180 35 24 / 10%);
}

.uploader {
  position: relative;
  display: grid;
  min-height: 220px;
  margin-top: 22px;
  place-items: center;
  border: 2px dashed #9eb2c9;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 92%), rgb(255 255 255 / 78%)),
    repeating-linear-gradient(45deg, transparent 0 13px, rgb(11 122 117 / 4%) 13px 14px);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 80%);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.uploader.is-dragging {
  border-color: #0b7a75;
  background: #e8f6f4;
  box-shadow: 0 20px 45px rgb(11 122 117 / 10%);
}

.uploader input {
  position: absolute;
  inset: 0;
  cursor: pointer;
  opacity: 0;
}

.upload-copy {
  display: grid;
  gap: 10px;
  padding: 28px;
  text-align: center;
}

.upload-copy strong {
  color: #18212f;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.upload-copy span,
.details,
.empty-state {
  color: #5f6b7a;
}

.gallery {
  margin-top: 34px;
}

.gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.image-card {
  overflow: hidden;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgb(17 24 39 / 7%);
}

.thumb-link {
  display: block;
  aspect-ratio: 4 / 3;
  background: #e6edf5;
}

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

.meta {
  display: grid;
  gap: 5px;
  padding: 13px;
}

.filename {
  overflow: hidden;
  color: #18212f;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr 72px;
  gap: 8px;
  padding: 0 13px 13px;
}

.empty-state {
  border: 1px dashed #c5d2e2;
  border-radius: 8px;
  background: rgb(255 255 255 / 62%);
  padding: 36px 0;
  text-align: center;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 1180px);
    padding-top: 24px;
  }

  .hero,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 150px;
  }

  .hero-actions {
    width: 100%;
    justify-content: space-between;
  }

  .status {
    flex: 1;
  }

  .icon-button {
    width: 100%;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.6rem);
  }
}
