.edit-mode-section {
  margin-top: 1.5rem;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.radio-option input {
  margin-top: 0.15rem;
}

:root {
  color-scheme: light;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --bg-soft: #f5f7fb;
  --bg-hero: linear-gradient(135deg, #eef4ff, #fff6f2);
  --card-bg: #ffffff;
  --border-color: #e6e9f2;
  --text-primary: #1d2233;
  --text-secondary: #5c6279;
  --accent: #2f6bff;
  --accent-soft: rgba(47, 107, 255, 0.08);
  --danger: #d64545;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-soft);
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 4vw;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.text-danger {
  color: var(--danger) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-nav a {
  margin-left: 1.5rem;
  font-weight: 500;
}

main {
  padding: 0 4vw 4vw;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 4rem;
  margin: 2rem 0;
  background: var(--bg-hero);
  border-radius: 32px;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  margin: 1rem 0;
}

.hero p {
  color: var(--text-secondary);
  max-width: 36rem;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  border: none;
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.2);
}

.btn-primary:hover {
  background: #1e5ae6;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled,
.btn-primary.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.btn-secondary:disabled,
.btn-secondary.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.highlight-card {
  background: rgba(255, 255, 255, 0.6);
  padding: 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.category-section {
  margin-top: 4rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.subcategory {
  margin-top: 2rem;
}

.tool-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.tool-card {
  background: var(--card-bg);
  padding: 1.6rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 220px;
  transition: all 0.2s ease;
}

.tool-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.1);
}

.tool-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
  line-height: 1;
}

.tool-card h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.tool-card p {
  color: var(--text-secondary);
  flex: 1;
  margin: 0;
  line-height: 1.6;
}

.tool-card a {
  font-weight: 600;
  margin-top: auto;
}

/* Why Page Styles - 简约大方 */
.why-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 4vw;
}

.why-page .why-header {
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.why-page .why-header a {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.why-page .why-header a:hover {
  color: var(--accent);
}

.why-page .why-header h1 {
  font-size: 2.2rem;
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-weight: 600;
}

.why-page .why-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
}

.why-content {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.why-block {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.why-block h2 {
  font-size: 1.6rem;
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.why-block>p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

.problem-list,
.advantage-list,
.security-list,
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.problem-item,
.advantage-item,
.security-item,
.feature-item {
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.problem-item h3,
.advantage-item h3,
.security-item h3,
.feature-item h3 {
  font-size: 1.1rem;
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  font-weight: 600;
}

.problem-item p,
.advantage-item p,
.security-item p,
.feature-item p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.security-block {
  background: var(--accent-soft);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.security-block h2 {
  border-bottom-color: var(--accent);
}

.why-footer {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

/* 移除重复的 .btn-primary 定义，使用上面的统一样式 */

.tool-page {
  margin: 3rem auto;
  max-width: 900px;
}

.tool-page header {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 28px;
  border: 1px solid var(--border-color);
}

.tool-page header h1 {
  margin: 1rem 0 0.5rem 0;
}

/* 面包屑导航样式 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.breadcrumb-item {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item:hover {
  color: #1f4fb8;
  text-decoration: underline;
}

.breadcrumb-item.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
  cursor: default;
}

.breadcrumb-item.breadcrumb-current:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.breadcrumb-separator {
  color: var(--text-secondary);
  margin: 0 0.25rem;
}

.tool-form {
  margin-top: 2rem;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 28px;
  border: 1px solid var(--border-color);
}

.tool-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.tool-form input[type="file"] {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  background: #fafbff;
  font-size: 0.95rem;
  transition: border-color 0.2s, background 0.2s;
}

.tool-form input[type="file"]:hover {
  border-color: var(--accent);
  background: #f0f4ff;
}

.tool-form button {
  margin-top: 1.2rem;
  width: auto;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.tool-form button:hover {
  background: #1e5ae6;
}

.tool-form button:active {
  transform: scale(0.98);
}

.form-hint {
  margin-top: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.edit-mode-section {
  margin-top: 1.5rem;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.radio-option input {
  margin-top: 0.15rem;
}

.form-error {
  margin-top: 1rem;
  color: var(--danger);
  font-weight: 600;
}

.param-section {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #fafbff;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

.param-section label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
  flex-wrap: wrap;
}

#quality_value {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 3ch;
}

.quality-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: normal;
}

.quality-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--border-color);
  outline: none;
  -webkit-appearance: none;
  margin: 1rem 0 0.5rem 0;
  cursor: pointer;
}

.quality-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(47, 107, 255, 0.3);
  transition: all 0.2s;
}

.quality-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(47, 107, 255, 0.4);
}

.quality-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(47, 107, 255, 0.3);
  transition: all 0.2s;
}

.quality-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(47, 107, 255, 0.4);
}

.quality-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
}

.quality-label-left,
.quality-label-right {
  font-size: 0.8rem;
}

.split-mode-select,
.tool-form select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  margin-top: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c6279' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.split-mode-select:hover,
.tool-form select:hover {
  border-color: var(--accent);
}

.split-mode-select:focus,
.tool-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.page-ranges-input,
.tool-form input[type="text"],
.tool-form input[type="number"],
.tool-form textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-top: 0.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.page-ranges-input {
  font-family: 'Courier New', monospace;
}

.page-ranges-input:hover,
.tool-form input[type="text"]:hover,
.tool-form input[type="number"]:hover,
.tool-form textarea:hover {
  border-color: var(--accent);
}

.page-ranges-input:focus,
.tool-form input[type="text"]:focus,
.tool-form input[type="number"]:focus,
.tool-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.page-ranges-input::placeholder,
.tool-form input::placeholder,
.tool-form textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.param-section code {
  background: var(--accent-soft);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--accent);
}

/* 水印参数紧凑布局 */
.watermark-params-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.watermark-params {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.param-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-color);
}

.param-group:first-of-type {
  border-top: none;
  padding-top: 0;
}

.param-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.8rem;
  align-items: center;
}

.param-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.param-value {
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  min-width: 3ch;
}

.param-select,
.param-input {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.param-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c6279' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.param-select:hover,
.param-input:hover {
  border-color: var(--accent);
}

.param-select:focus,
.param-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.param-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.param-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(47, 107, 255, 0.3);
}

.param-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(47, 107, 255, 0.3);
}

.param-color {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  padding: 2px;
  background: var(--card-bg);
}

.form-hint-small {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* 预览区域 */
.watermark-preview {
  display: flex;
  flex-direction: column;
}

.preview-container {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#watermark_preview {
  max-width: 100%;
  height: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #f9f9f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 960px) {
  .watermark-params-container {
    grid-template-columns: 1fr;
  }
}

/* 工具详细介绍区域 */
.tool-info {
  margin-top: 2rem;
}

.info-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  background: linear-gradient(to bottom, #ffffff, #fafbff);
}

.info-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.info-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.info-section h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
}

.info-icon {
  font-size: 1.4rem;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.info-section p {
  color: var(--text-secondary);
  line-height: 1.9;
  margin: 0;
  font-size: 1rem;
}

.use-cases {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}

.use-cases li {
  padding: 0.9rem 1rem 0.9rem 2.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.use-cases li:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--accent);
  transform: translateX(4px);
}

.use-cases li::before {
  content: "✓";
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--accent-soft);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tips-section {
  background: linear-gradient(135deg, var(--accent-soft), rgba(47, 107, 255, 0.05));
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(47, 107, 255, 0.1);
}

.tips-section h3 {
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.tips-section p {
  color: var(--text-primary);
  font-weight: 500;
  margin: 0;
}

@media (max-width: 720px) {
  .info-card {
    padding: 1.5rem;
  }

  .info-section h3 {
    font-size: 1.1rem;
  }
}

.site-footer {
  text-align: center;
  padding: 2rem 1rem 4rem;
  color: var(--text-secondary);
}

.conversion-result {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 32px;
  padding: 3rem;
  max-width: 560px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(20, 33, 73, 0.08);
}

.loader {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 1.5rem auto;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

.conversion-result.done .loader {
  border-color: var(--accent-soft);
  border-top-color: var(--accent-soft);
  background: var(--accent);
  animation: none;
  position: relative;
}

.conversion-result.done .loader::after {
  content: "✓";
  position: absolute;
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
}

.conversion-result.error .loader {
  border-color: rgba(214, 69, 69, 0.2);
  border-top-color: rgba(214, 69, 69, 0.2);
  background: #d64545;
  animation: none;
  position: relative;
}

.conversion-result.error .loader::after {
  content: "×";
  position: absolute;
  color: #fff;
  font-weight: 700;
  font-size: 1.8rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    gap: 1rem;
  }

  .hero {
    padding: 2rem;
  }

  .tool-form button {
    font-size: 0.9rem;
    padding: 0.7rem 1.2rem;
  }

  .why-page {
    padding: 2rem 4vw;
  }

  .why-page .why-header h1 {
    font-size: 1.8rem;
  }

  .why-content {
    gap: 3rem;
  }

  .why-block h2 {
    font-size: 1.4rem;
  }

  .security-block {
    padding: 1.5rem;
  }
}

/* 认证页面样式 */
.auth-page {
  max-width: 500px;
  margin: 3rem auto;
  padding: 0 20px;
}

.auth-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.auth-container h1 {
  margin: 0 0 2rem 0;
  font-size: 1.8rem;
  text-align: center;
  color: var(--text-primary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--card-bg);
}

.form-group input:hover {
  border-color: var(--accent);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group small {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.form-group input[type="checkbox"] {
  margin-right: 0.5rem;
}

.captcha-container {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.captcha-container input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.captcha-image {
  width: 120px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.captcha-image:hover {
  opacity: 0.8;
}

/* btn-primary 样式已在上面统一定义，此处不再重复 */

.auth-link {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-link a {
  color: var(--accent);
  font-weight: 500;
}

.auth-link a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .auth-page {
    margin: 2rem auto;
    padding: 0 15px;
  }

  .auth-container {
    padding: 2rem 1.5rem;
  }

  .captcha-container {
    flex-direction: column;
  }

  .captcha-image {
    width: 100%;
    height: auto;
    min-height: 40px;
  }
}

/* PDF编辑器样式 */
.pdf-editor-section {
  margin-top: 1.5rem;
}

.editor-operations-list {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

#operations-container {
  min-height: 60px;
  margin-bottom: 1rem;
}

.operation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.operation-name {
  font-weight: 500;
  color: var(--text-primary);
}

.btn-delete-operation {
  background: var(--danger);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.btn-delete-operation:hover {
  background: #c03a3a;
}

.editor-actions {
  margin-top: 1rem;
}

.btn-add-operation {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-add-operation:hover {
  background: #2560e6;
}

.operation-form-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.operation-form {
  margin-top: 1rem;
}

.operation-form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: flex-end;
}

.btn-cancel,
.btn-confirm {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-cancel {
  background: var(--bg-soft);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-cancel:hover {
  background: #e8ebf0;
}

.btn-confirm {
  background: var(--accent);
  color: white;
}

.btn-confirm:hover {
  background: #2560e6;
}

/* PDF脱敏工具样式 */
.redact-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.redact-hint {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.redact-actions-inline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.redact-pages {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.redact-page {
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.2rem;
  background: var(--card-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.redact-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.redact-page-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.redact-count-badge {
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.clear-page-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.2rem 0.4rem;
}

.clear-page-btn:hover {
  text-decoration: underline;
}

.redact-canvas {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.redact-canvas img {
  width: 100%;
  display: block;
  user-select: none;
  position: relative;
  z-index: 1;
}

.selection-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  z-index: 2;
  user-select: none;
}

.redact-rect {
  position: absolute;
  border: 2px solid rgba(32, 85, 255, 0.8);
  background: rgba(47, 107, 255, 0.2);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(33, 72, 185, 0.25);
  pointer-events: auto;
}

.redact-rect.drafting {
  border-style: dashed;
  background: rgba(47, 107, 255, 0.1);
}

.rect-remove-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  border: none;
  background: #fff;
  width: 22px !important;
  height: 22px !important;
  padding: 0 !important;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: var(--text-primary);
}

.rect-remove-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
}

.redact-submit {
  margin-top: 2rem;
  text-align: center;
}

@media (max-width: 720px) {
  .redact-controls {
    flex-direction: column;
  }

  .redact-page {
    padding: 1rem;
  }
}

/* 用户协议页面样式 */
.terms-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 4vw;
}

.terms-page .terms-header {
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.terms-page .terms-header a {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.terms-page .terms-header a:hover {
  color: var(--accent);
}

.terms-page .terms-header h1 {
  font-size: 2.2rem;
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-weight: 600;
}

.terms-page .terms-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem 0;
  line-height: 1.8;
}

.terms-page .terms-update {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  font-style: italic;
}

.terms-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.terms-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.terms-section h2 {
  font-size: 1.6rem;
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.terms-section>p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

.terms-section ul {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.terms-section li {
  margin-bottom: 0.75rem;
}

.terms-section li:last-child {
  margin-bottom: 0;
}

.terms-section li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.terms-section.terms-highlight {
  background: var(--accent-soft);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.terms-section.terms-highlight h2 {
  border-bottom-color: var(--accent);
}

.terms-footer {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.terms-footer>p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.terms-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .terms-page {
    padding: 2rem 4vw;
  }

  .terms-page .terms-header h1 {
    font-size: 1.8rem;
  }

  .terms-section h2 {
    font-size: 1.4rem;
  }

  .terms-section.terms-highlight {
    padding: 1.5rem;
  }

  .terms-actions {
    flex-direction: column;
  }

  .terms-actions .btn-primary,
  .terms-actions .btn-secondary {
    width: 100%;
  }
}

/* 用户反馈页面样式 */
.feedback-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 4vw;
}

.feedback-page .feedback-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.feedback-page .feedback-header a {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.feedback-page .feedback-header a:hover {
  color: var(--accent);
}

.feedback-page .feedback-header h1 {
  font-size: 2.2rem;
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-weight: 600;
}

.feedback-page .feedback-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.8;
}

.feedback-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.feedback-success,
.feedback-error {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
}

.feedback-success h3 {
  font-size: 1.5rem;
  color: #28a745;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.feedback-success p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0 0 1.5rem 0;
}

.feedback-error {
  border-color: var(--danger);
  background: rgba(214, 69, 69, 0.05);
}

.feedback-error h3 {
  font-size: 1.5rem;
  color: var(--danger);
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.feedback-error p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin: 0;
}

.feedback-form {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group .required {
  color: var(--danger);
  margin-left: 0.25rem;
}

.form-group select,
.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--card-bg);
  transition: border-color 0.2s;
}

.form-group select:focus,
.form-group input[type="text"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* 反馈页面验证码样式 */
.feedback-form .captcha-container {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.feedback-form .captcha-container input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: monospace;
}

.feedback-form .captcha-container input:focus {
  outline: none;
  border-color: var(--accent);
}

.feedback-form .captcha-image {
  width: 120px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.feedback-form .captcha-image:hover {
  opacity: 0.8;
}

.form-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.user-badge {
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.user-name {
  color: var(--text-primary);
  font-weight: 500;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.feedback-form .form-actions button {
  flex: 1;
}

.feedback-tips {
  background: var(--accent-soft);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
}

.feedback-tips h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.feedback-tips ul {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.feedback-tips li {
  margin-bottom: 0.75rem;
}

.feedback-tips li:last-child {
  margin-bottom: 0;
}

.feedback-tips li strong {
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 720px) {
  .feedback-page {
    padding: 2rem 4vw;
  }

  .feedback-page .feedback-header h1 {
    font-size: 1.8rem;
  }

  .feedback-form {
    padding: 1.5rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  .captcha-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .captcha-image {
    width: 100%;
    margin-left: 0;
  }
}

/* 文件预览容器样式 */
.file-preview-container {
  margin: 1.5rem 0 1rem 0;
  padding: 1.5rem;
  background: var(--bg-soft);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.file-preview-container:hover {
  border-color: var(--accent);
  background: rgba(47, 107, 255, 0.02);
}

.file-preview-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
}

.file-preview-image {
  width: 200px;
  height: 280px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.file-preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.file-preview-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.4;
}

.file-preview-size {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.file-preview-size::before {
  content: "📦";
  font-size: 1.1rem;
}

/* 多文件缩略图网格（用于 image-to-pdf） */
.multi-previews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  width: 100%;
}

.multi-preview-card,
.file-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.file-card:hover,
.multi-preview-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.multi-preview-thumb {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #f6f7fb;
  -webkit-user-drag: none;
  /* 禁止浏览器拖拽图片生成大预览 */
  user-select: none;
  pointer-events: none;
  /* 避免与拖拽命中冲突，按钮仍可点击 */
}

.multi-preview-meta {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.multi-preview-name {
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.multi-preview-size {
  font-size: 11px;
  color: var(--text-secondary);
}

/* 多文件预览卡片功能按钮 */
.multi-preview-card {
  position: relative;
  user-select: none;
  cursor: grab;
}

.multi-preview-card.dragging {
  opacity: 0.7;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 拖拽放置指示线 */
.multi-preview-card.drop-before::before,
.multi-preview-card.drop-after::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: #4a90e2;
  border-radius: 2px;
  z-index: 20;
}

.multi-preview-card.drop-before::before {
  left: 2px;
}

.multi-preview-card.drop-after::after {
  right: 2px;
}

.multi-preview-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.18s ease;
  background: rgba(185, 185, 185, 0.186);
  padding: 4px;
  border-radius: 8px;
  z-index: 10;
}

.multi-preview-card:hover .multi-preview-actions {
  opacity: 1;
}

.action-btn {
  flex: 1;

  border: none;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  font-size: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
  margin: 0 .2rem !important;
  padding: .2rem !important;
  line-height: 1;
  flex-shrink: 0;
}

.action-btn svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.action-btn:active {
  background: rgba(255, 255, 255, 0.28);
}

.rotate-btn:hover {
  color: #4a90e2;
}

.delete-btn:hover {
  color: #e74c3c;
}

.zoom-btn:hover {
  color: #27ae60;
}

/* 图片放大预览模态框 */
.image-zoom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.image-zoom-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.image-zoom-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  animation: zoomIn 0.3s ease;
}

.image-zoom-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.image-zoom-close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.image-zoom-name {
  color: #fff;
  font-size: 14px;
  text-align: center;
  max-width: 90vw;
  word-break: break-all;
  margin-top: 8px;
}

/* 动画 */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 响应式设计 */
@media (max-width: 720px) {
  .file-preview-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .file-preview-image {
    width: 160px;
    height: 224px;
  }

  .file-preview-info {
    width: 100%;
  }

  .file-preview-name {
    font-size: 1rem;
  }
}

/* 上传进度条 */
.upload-progress {
  margin-top: 1rem;
  background: var(--bg-soft);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.8rem 1rem;
}

.upload-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  margin-bottom: .6rem;
}

.upload-progress-bar-wrap {
  width: 100%;
  height: 10px;
  background: #e9edf5;
  border-radius: 999px;
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 12px;
  line-height: 10px;
  transition: width .2s ease;
}

.upload-cancel-btn {
  padding: .35rem .8rem;
  font-size: .85rem;
  border-radius: 8px;
  width: auto !important;
  background-color: var(--danger) !important;
}