* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top, #1b2152, #0b0f2b 55%, #05060f);
  color: #f5f6ff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 16px 48px;
}

.page {
  width: min(1100px, 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero {
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 40px rgba(8, 12, 36, 0.45);
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(86, 120, 255, 0.2);
  color: #c8d2ff;
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(26px, 4vw, 42px);
  margin-bottom: 10px;
}

.hero p {
  font-size: clamp(14px, 2.2vw, 18px);
  color: rgba(230, 235, 255, 0.8);
}

.card {
  padding: 24px;
  border-radius: 22px;
  background: rgba(14, 18, 46, 0.75);
  box-shadow: 0 18px 50px rgba(5, 8, 24, 0.6);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: #dbe2ff;
}

.field input,
.field select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 14px;
  color: #f5f6ff;
  font-size: 15px;
  outline: none;
}

.field select:hover,
.field select:focus {
  background: rgba(255, 255, 255, 0.92);
  color: #101525;
}

.field select option {
  color: #101525;
  background-color: #ffffff;
}

.field input[type="file"] {
  padding: 10px 12px;
  cursor: pointer;
}

#gif-input::file-selector-button {
  margin-right: 12px;
  padding: 10px 14px;
  border: none;
  border-radius: 12px;
  color: #101525;
  background: linear-gradient(135deg, #7bd3ff, #6e7bff, #b676ff);
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#gif-input::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(87, 114, 255, 0.35);
}

.field input::placeholder {
  color: rgba(219, 226, 255, 0.6);
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.range {
  position: relative;
}

.range-value {
  font-size: 13px;
  color: rgba(219, 226, 255, 0.8);
  margin-top: -4px;
}

.hint {
  font-size: 12px;
  color: rgba(219, 226, 255, 0.6);
}

button {
  border: none;
  border-radius: 16px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #101525;
  background: linear-gradient(135deg, #7bd3ff, #6e7bff, #b676ff);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(87, 114, 255, 0.35);
}

.preview {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.preview-card {
  background: rgba(11, 14, 36, 0.8);
  border-radius: 18px;
  padding: 18px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.preview-card h2 {
  font-size: 16px;
  color: rgba(219, 226, 255, 0.9);
}

.preview-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.preview-body img {
  max-width: 100%;
  max-height: 220px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  display: none;
}

.status {
  font-size: 14px;
  color: rgba(219, 226, 255, 0.75);
  text-align: center;
}

.download {
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  background: rgba(123, 211, 255, 0.18);
  color: #cfe8ff;
  transition: background 0.2s ease;
}

.download:hover {
  background: rgba(123, 211, 255, 0.35);
}

.download.disabled {
  pointer-events: none;
  opacity: 0.5;
}

@media (max-width: 720px) {
  body {
    padding: 16px;
  }

  .card {
    padding: 18px;
  }

  button {
    width: 100%;
  }
}
