﻿:root {
  color: #172033;
  background: #f4f7fb;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(244, 247, 251, 0.96), rgba(250, 252, 255, 0.96)),
    repeating-linear-gradient(90deg, rgba(40, 111, 255, 0.045) 0 1px, transparent 1px 82px),
    repeating-linear-gradient(0deg, rgba(31, 184, 166, 0.045) 0 1px, transparent 1px 76px);
}

button,
select,
input {
  font: inherit;
}

button,
label {
  touch-action: manipulation;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.shell {
  width: min(1120px, calc(100vw - 24px));
  margin: 0 auto;
  padding: clamp(14px, 4vw, 34px) 0;
}

.workspace {
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 8px;
  padding: clamp(16px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 56px rgba(23, 32, 51, 0.1);
}

.topbar,
.actionbar,
.image-card,
.image-card nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #286fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(30px, 6vw, 50px);
  line-height: 1;
  letter-spacing: 0;
}

.privacy {
  flex: 0 0 auto;
  border: 1px solid rgba(31, 184, 166, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(31, 184, 166, 0.1);
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}

.dropzone {
  position: relative;
  display: grid;
  min-height: 150px;
  place-items: center;
  border: 2px dashed rgba(40, 111, 255, 0.28);
  border-radius: 8px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(40, 111, 255, 0.07), rgba(31, 184, 166, 0.07));
  color: #172033;
  text-align: center;
  cursor: pointer;
}

.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.dropzone strong,
.dropzone span {
  pointer-events: none;
}

.dropzone strong {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 28px;
  background: #286fff;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.dropzone span {
  color: #526071;
  font-size: 14px;
}

.dropzone.is-dragging {
  border-color: #1fb8a6;
  background: rgba(31, 184, 166, 0.14);
}

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.controls label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.controls span {
  color: #526071;
  font-size: 13px;
  font-weight: 800;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: 14px;
  margin-top: 14px;
}

.settings-panel {
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.settings-panel h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
}

.watermark-panel {
  display: grid;
  gap: 12px;
}

select,
input[type="text"],
input[type="number"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: #172033;
}

input[type="text"]::placeholder {
  color: #8a96a8;
}

input[type="color"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 8px;
  padding: 4px;
  background: #ffffff;
}

.check-control {
  min-height: 69px;
  align-content: start;
}

.check-control input {
  width: 28px;
  height: 28px;
  margin: 8px 0 0;
  accent-color: #286fff;
}

.color-control input:disabled,
input[type="text"]:disabled,
input[type="number"]:disabled,
input[type="range"]:disabled {
  opacity: 0.52;
}

.range-control {
  grid-template-columns: minmax(0, 1fr) 86px;
}

.wide-control {
  grid-column: 1 / -1;
}

.range-control span {
  grid-column: 1 / -1;
}

.range-control input[type="range"] {
  width: 100%;
  min-height: 44px;
  accent-color: #286fff;
}

.range-control input[type="number"] {
  padding: 0 8px;
}

.watermark-preview {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.watermark-preview span {
  color: #526071;
  font-size: 13px;
  font-weight: 800;
}

.watermark-preview canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(23, 32, 51, 0.09);
  border-radius: 8px;
  background: #ffffff;
  object-fit: contain;
}

.actionbar {
  position: sticky;
  top: 0;
  z-index: 2;
  justify-content: flex-end;
  margin: 14px 0;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

.actionbar div {
  margin-right: auto;
  color: #526071;
  font-weight: 800;
}

.primary,
.ghost,
.wechat,
.image-card button,
.message {
  border-radius: 8px;
  font-weight: 900;
}

.primary,
.ghost,
.wechat {
  min-height: 46px;
  padding: 0 18px;
}

.primary {
  background: #286fff;
  color: #ffffff;
}

.ghost,
.image-card button {
  background: rgba(23, 32, 51, 0.07);
  color: #172033;
}

.wechat {
  background: #07c160;
  color: #ffffff;
}

.image-list {
  display: grid;
  gap: 10px;
}

.image-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  border: 1px solid rgba(23, 32, 51, 0.09);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.image-card img {
  width: 88px;
  height: 88px;
  border-radius: 6px;
  object-fit: cover;
  background: #edf2f7;
}

.image-card strong {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #e7efff;
  color: #286fff;
}

.image-card span,
.image-card small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #526071;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-card span {
  color: #172033;
  font-weight: 900;
}

.image-card nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.image-card button {
  min-height: 38px;
  padding: 0 12px;
}

.message {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 12px 16px;
  background: #172033;
  color: #ffffff;
  box-shadow: 0 12px 36px rgba(23, 32, 51, 0.24);
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 16px, 1120px);
    padding: 10px 0 16px;
  }

  .workspace {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  .privacy {
    margin-top: 4px;
  }

  .dropzone {
    min-height: 150px;
  }

  .controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .actionbar {
    bottom: 0;
    top: auto;
    margin-bottom: 10px;
  }

  .primary,
  .ghost,
  .wechat {
    flex: 1 1 auto;
  }

  .image-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .image-card img {
    width: 72px;
    height: 72px;
  }

  .image-card nav {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .image-card button {
    flex: 1 1 0;
  }
}

@media (max-width: 480px) {
  .controls {
    grid-template-columns: 1fr;
  }

  .range-control {
    grid-template-columns: minmax(0, 1fr) 78px;
  }

  .topbar {
    gap: 8px;
  }
}
