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

body {
  width: 100%;
  height: 100%;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #111;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

button {
  border: 0;
  outline: 0;
}

.container {
  margin: 40px 0;
  width: 460px;
  padding: 22px 26px;
  background: #fbfcfd;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
}
.container h2.title {
  font-size: 1.4rem;
  margin: 6px 0 20px 0;
  color: #111827;
  font-weight: 700;
}

.result {
  position: relative;
  width: 100%;
  height: 65px;
  overflow: hidden;
}
.result__info {
  position: absolute;
  bottom: 6px;
  color: #6b7280;
  font-size: 0.8rem;
  transition: all 150ms ease-in-out;
  transform: translateY(200%);
  opacity: 0;
}
.result__info.right {
  right: 8px;
}
.result__info.left {
  left: 8px;
}
.result__viewbox {
  width: 100%;
  height: 72px;
  background: #f7f8f9;
  border-radius: 8px;
  color: #111827;
  text-align: center;
  line-height: 72px;
  border: 1px solid #e6e6e6;
  font-size: 1.05rem;
  letter-spacing: 0.6px;
}
.result #copy-btn {
  display: none;
}

.field-title {
  position: absolute;
  top: -10px;
  left: 8px;
  transform: translateY(-50%);
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  font-size: 0.65rem;
  pointer-events: none;
  user-select: none;
}

.options {
  width: 100%;
  height: auto;
  margin: 50px 0;
}

.range__slider {
  position: relative;
  width: 100%;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  margin: 18px 0;
}
.range__slider::before, .range__slider::after {
  display: none;
}
.range__slider::before {
  content: attr(data-min);
  left: 10px;
}
.range__slider::after {
  content: attr(data-max);
  right: 10px;
}
.range__slider .length__title::after {
  content: attr(data-length);
  position: absolute;
  right: -16px;
  font-variant-numeric: tabular-nums;
  color: #111827;
}

.length__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #111827;
  margin-top: 16px;
  margin-bottom: 28px;
}

#slider {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: calc(100% - 40px);
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  outline: none;
  padding: 0;
  margin: 12px 0 0 0;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(16,24,40,0.04);
}
#slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 6px 14px rgba(16,24,40,0.10);
}
#slider::-webkit-slider-thumb:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 24px rgba(16,24,40,0.16);
}
#slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 1.5px solid #cbd5e1;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 6px 14px rgba(16,24,40,0.10);
}
#slider::-moz-range-thumb:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 24px rgba(16,24,40,0.16);
}

.settings {
  position: relative;
  height: auto;
  widows: 100%;
  display: flex;
  flex-direction: column;
}
.settings .setting {
  position: relative;
  width: 100%;
  height: 48px;
  background: transparent;
  display: flex;
  align-items: center;
  padding: 6px 0;
  color: #111827;
  margin-bottom: 6px;
}
.settings .setting input {
  opacity: 0;
  position: absolute;
}
.settings .setting input + label {
  user-select: none;
}
.settings .setting input + label::before, .settings .setting input + label::after {
  content: "";
  position: absolute;
  transition: 150ms cubic-bezier(0.24, 0, 0.5, 1);
  transform: translateY(-50%);
  top: 50%;
  right: 10px;
  cursor: pointer;
}
.settings .setting input + label::before {
  height: 22px;
  width: 40px;
  border-radius: 30px;
  background: #e5e7eb;
}
.settings .setting input + label::after {
  height: 18px;
  width: 18px;
  border-radius: 60px;
  right: 28px;
  background: #f3f4f6;
}
.settings .setting input:checked + label:before {
  background: #5d68e2;
  transition: all 150ms cubic-bezier(0, 0, 0, 0.1);
}
.settings .setting input:checked + label:after {
  right: 14px;
}
.settings .setting input:focus + label:before {
  box-shadow: 0 0 0 3px rgba(16,24,40,0.06);
}

.btn.generate {
  display: none;
}

.support {
  position: fixed;
  right: 10px;
  bottom: 10px;
  padding: 10px;
  display: flex;
}

.top-links {
  position: fixed;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 40;
}
.top-links a {
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  background: transparent;
  padding: 6px 10px;
  border-radius: 6px;
}
.top-links a:hover {
  background: rgba(16,24,40,0.04);
}

a {
  margin: 0 12px;
  color: #111827;
  font-size: 1.1rem;
  transition: color 200ms ease;
}

a:hover {
  color: #374151;
}

/* 页脚备案信息样式 */
.site-footer {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 12px 0;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  z-index: 50;
}
.beian-row {
  max-width: 980px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: center;
}

/* 给页面主体留出底部空间，避免被固定 footer 遮挡 */
.container {
  padding-bottom: 86px;
}
.beian-row .notice {
  font-size: 0.95rem;
}
.beian-row .red {
  color: #dc2626; /* 红色 */
  font-weight: 600;
}
.beian-link {
  color: #111827;
  text-decoration: none;
  font-size: 0.95rem;
}
.beian-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

/* 保证桌面端在同一水平线上显示（不换行） */
@media (min-width: 720px) {
  .beian-row {
    flex-wrap: nowrap;
  }
}

/* 手机端自动换行为三行显示 */
@media (max-width: 719px) {
  .beian-row {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  .beian-row .notice, .beian-row .beian-link {
    display: block;
  }
}

/* 手机端调整：让主容器在小屏上更宽且内边距更大 */
@media (max-width: 600px) {
  /* 手机端：主内容居中，适度靠上，控件宽度与间距更协调 */
  body {
    justify-content: flex-start;
    align-items: center;
    padding-top: 14px;
  }
  .container {
    width: 400px;
    max-width: calc(100% - 32px);
    padding: 12px 16px;
    margin: 6px auto 12px auto;
    border-radius: 10px;
  }
  .container h2.title {
    font-size: 1.05rem;
  }
  .result__viewbox {
    height: 60px;
    line-height:60px;
    font-size: 0.98rem;
  }
  /* 让设置项更紧凑，文字字号略微增大以便触控 */
  .settings .setting {
    height: 44px;
    padding: 6px 10px;
  }
  .settings .setting input + label {
    font-size: 1rem;
  }
  /* 页脚红字居中且紧贴底部 */
  .site-footer {
    padding: 8px 0;
  }
  .beian-row .notice {
    text-align: center;
    display: block;
  }

  /* 手机端整体放大 200% 显示（以卡片顶部居中为基准） */
  .scale-200 {
    transform: scale(2);
    transform-origin: top center;
    -webkit-transform: scale(2);
    -webkit-transform-origin: top center;
  }

  /* 由于缩放会改变视觉尺寸，增大底部留白以避免遮挡 */
  .container {
    margin-bottom: 8px;
  }
}