@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;800&display=swap');

:root {
  --ft-bg: #f5f7fb;
  --ft-bg-2: #edf2ff;
  --ft-surface: rgba(255, 255, 255, 0.82);
  --ft-surface-strong: #ffffff;
  --ft-text: #0f172a;
  --ft-muted: #64748b;
  --ft-line: rgba(15, 23, 42, 0.08);
  --ft-line-strong: rgba(15, 23, 42, 0.14);
  --ft-primary: #0f766e;
  --ft-primary-2: #16a34a;
  --ft-accent: #f97316;
  --ft-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  --ft-shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.06);
  --ft-radius-xl: 30px;
  --ft-radius-lg: 22px;
  --ft-radius-md: 16px;
  --ft-radius-sm: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ft-text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.10), transparent 32%),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, #f5f7fb 100%);
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.08));
  opacity: 0.65;
  z-index: 0;
}

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

.container {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.ft-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  margin: 0 auto 1.25rem;
  width: min(1180px, 100%);
  background: var(--ft-surface);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 22px;
  box-shadow: var(--ft-shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.ft-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--ft-text);
}

.ft-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #0f766e 0%, #16a34a 60%, #f97316 120%);
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
}

.ft-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.ft-brand-copy strong {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.ft-brand-copy span,
.ft-brand-copy small {
  font-size: 0.78rem;
  color: var(--ft-muted);
}

.ft-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ft-lang-btn {
  border: 0;
  background: transparent;
  color: var(--ft-muted);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  margin: 0;
  box-shadow: none;
}

.ft-lang-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--ft-text);
  transform: none;
}

.ft-lang-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--ft-primary), #0b4b45);
}

.header {
  margin-bottom: 1.4rem;
}

.title-section {
  padding: 1.8rem 1.6rem 1.5rem;
  background: var(--ft-surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--ft-radius-xl);
  box-shadow: var(--ft-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.title-section h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: var(--ft-text);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.1;
  margin-bottom: 0.45rem;
  font-weight: 800;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: currentColor !important;
}

.title-section h1 a {
  text-decoration: none;
}

.title-section h1 .brand-mark,
.title-section h1 .brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f766e, #16a34a 60%, #f97316);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(15, 118, 110, 0.25);
}

.title-section p {
  color: var(--ft-muted);
  font-size: 0.96rem;
}

.current-tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.10);
  color: var(--ft-primary);
  font-size: 0.8rem;
  font-weight: 700;
}

.tool-panel,
.result-area,
.preview-card,
.tool-card,
.qrcode-box,
.slider-group {
  background: var(--ft-surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--ft-shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.tool-panel {
  border-radius: var(--ft-radius-xl);
  padding: clamp(1.1rem, 2vw, 1.8rem);
  margin-bottom: 1.6rem;
}

.tool-title {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.tool-desc {
  color: var(--ft-muted);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-bottom: 1.3rem;
}

.input-group,
.control-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  color: #1f2937;
  font-size: 0.82rem;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ft-text);
  padding: 0.8rem 1rem;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

button {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ft-text);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.05);
  margin-right: 0.55rem;
  margin-bottom: 0.5rem;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.22);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
}

button.primary,
.download-img-btn,
.upload-btn {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--ft-primary), #0b4b45);
}

button.primary:hover,
.download-img-btn:hover,
.upload-btn:hover {
  background: linear-gradient(135deg, #0b5f58, #083833);
}

button.pressed {
  transform: scale(0.97);
}

.action-group,
.compress-controls,
.ip-input-wrapper,
.range-wrapper,
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.compress-controls,
.ip-input-wrapper,
.range-wrapper {
  align-items: center;
}

.slider-group {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 18px;
}

.slider-group span {
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
}

.slider-group input[type="range"] {
  flex: 1;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.qrcode-box,
.image-preview-area,
.result-area,
.save-qr-area,
.save-tip,
.weixin-tip,
.file-info,
.stat-grid {
  border-radius: var(--ft-radius-lg);
}

.result-area,
.preview-card {
  padding: 1rem 1.05rem;
}

.result-area {
  margin-top: 1rem;
  word-break: break-word;
}

.result-label,
.preview-title,
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 0.85rem;
}

.section-label {
  margin-bottom: 1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.9rem;
}

.tool-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 72px;
  padding: 1rem 1rem;
  border-radius: 18px;
  color: var(--ft-text);
  text-decoration: none;
}

.tool-card:hover {
  transform: translateY(-2px);
}

.tool-card-name {
  font-weight: 800;
  font-size: 0.96rem;
}

.footer {
  text-align: center;
  color: var(--ft-muted);
  font-size: 0.78rem;
  padding: 0.7rem 0 0.2rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.stat-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.65rem 0.85rem;
  border-radius: 16px;
  background: rgba(15, 118, 110, 0.08);
  color: #134e4a;
  font-weight: 700;
  font-size: 0.88rem;
}

.qrcode-box {
  padding: 1rem;
  justify-content: center;
  align-items: center;
  min-height: 220px;
  background: rgba(255, 255, 255, 0.72);
}

.image-preview-area {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.preview-card {
  flex: 1 1 260px;
  text-align: center;
}

.preview-img {
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.preview-img img,
.preview-img canvas {
  max-width: 100%;
  display: block;
}

.save-tip,
.weixin-tip {
  color: #c2410c;
  font-size: 0.78rem;
  margin-top: 0.45rem;
}

.save-tip {
  text-align: center;
}

.gray-placeholder {
  color: #94a3b8 !important;
}

.ft-hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .ft-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ft-brand {
    justify-content: flex-start;
  }

  .ft-lang-switch {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .container,
  .ft-toolbar {
    width: min(100%, calc(100% - 1.2rem));
  }

  .title-section {
    padding: 1.35rem 1rem 1.15rem;
  }

  .tool-panel {
    border-radius: 24px;
  }

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

  button {
    width: auto;
  }
}

