/* 皮卡丘官网主题 - 主色蓝白、卡片式 */
@import url('square-corners.css');
@import url('theme-unify.css');

:root {
  --primary: #1890ff;
  --primary-hover: #40a9ff;
  --primary-light: #e6f7ff;
  --text: #333;
  --text-secondary: #666;
  --text-placeholder: #bfbfbf;
  --border: #d9d9d9;
  --bg: #fff;
  --bg-page: #fff;
  --bg-card: #fff;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --radius: 4px;
  --radius-lg: 8px;
  --header-height: 81px;
  --form-control-height: 48px;
  --form-control-font-size: 16px;
  --content-area-height: 23.4em;
  --title-row-height: 34px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 跨浏览器一致：表单与按钮在 Edge/Chrome/Firefox 中表现统一 */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.5;
  margin: 0;
}
button,
input:not([type="radio"]):not([type="checkbox"]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  overflow: visible;
}
button,
select {
  text-transform: none;
}
select {
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  appearance: menulist;
}
textarea {
  overflow: auto;
  resize: vertical;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: #333;
  color: var(--text);
  background: #fff;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 通用隐藏：如登录表单的短信验证码行（不需要短信时） */
.hidden {
  display: none !important;
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background: #fff;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 28px 32px;
  max-width: 480px;
  width: 90%;
  border: 1px solid var(--border);
}

.modal-title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.03em;
  line-height: 1.4;
}

/* 重要提示弹窗 */
#noticeModal .modal-box {
  border-top: 4px solid #ff4d4f;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(255, 77, 79, 0.08);
}

#noticeModal .modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #cf1322;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(255, 77, 79, 0.2);
}

#noticeModal .modal-desc {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

#noticeModal .modal-list {
  margin: 0 0 24px;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-secondary);
}

#noticeModal .modal-list li {
  margin-bottom: 10px;
}

#noticeModal .modal-list li::marker {
  color: #ff7875;
}

#noticeModal .modal-confirm {
  width: 100%;
  min-height: 48px;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}

#noticeModal .modal-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.25);
}

.modal-desc {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.modal-list {
  margin: 0 0 20px;
  padding-left: 20px;
  color: var(--text-secondary);
}

.modal-list li {
  margin-bottom: 6px;
}

.modal-confirm {
  width: 100%;
  height: 44px;
  min-height: 44px;
  font-size: 16px;
}

/* 登录/注册模态框 - 大气友好风格 */
.login-modal-box {
  position: relative;
  max-width: 440px;
  padding: 40px 44px;
  border-radius: 18px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12), 0 4px 20px rgba(24, 144, 255, 0.08);
  border: 1px solid rgba(24, 144, 255, 0.15);
  overflow: hidden;
}

.login-modal-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.95;
}

.login-modal-box .modal-title {
  margin-bottom: 28px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  line-height: 1.35;
}

.login-form .form-row {
  margin-bottom: 20px;
}

.login-form .form-label {
  display: block;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}

.login-form .form-input {
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  color: var(--text);
  background: var(--bg-card);
  box-sizing: border-box;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.login-form .form-input::placeholder {
  color: var(--text-placeholder);
}

.login-form .form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.12);
}

/* 用 margin 控制间距，与 Edge 及其它浏览器显示一致（不依赖 gap） */
.captcha-row {
  display: flex;
  align-items: center;
}
.captcha-row .captcha-input {
  margin-right: 12px;
  flex: 1;
  min-width: 0;
}

.captcha-img {
  flex-shrink: 0;
  width: 120px;
  height: 48px;
  min-width: 120px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  display: block;
  object-fit: contain;
  object-position: center;
  background: var(--bg);
  box-sizing: border-box;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.captcha-img:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.12);
}

/* 用 margin 控制间距，与 Edge 及其它浏览器显示一致（不依赖 gap） */
.sms-row {
  display: flex;
  align-items: center;
}
.sms-row .sms-input {
  margin-right: 12px;
  flex: 1;
  min-width: 0;
}

.btn-sms {
  flex-shrink: 0;
  min-width: 110px;
  height: 48px;
  min-height: 48px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.btn-sms:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.12);
}

.btn-block {
  width: 100%;
  margin-top: 8px;
}

.login-form .btn-block {
  height: 48px;
  min-height: 48px;
  font-size: var(--form-control-font-size);
  font-weight: 600;
  border-radius: 10px;
  padding: 12px 32px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.login-form .btn-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.25);
}

.login-modal-box .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 12px;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}

.login-modal-box .modal-close:hover {
  background: rgba(24, 144, 255, 0.1);
  color: var(--primary);
  transform: scale(1.05);
}

/* 头部 */
.header {
  height: 81px;
  height: var(--header-height);
  background: #fff;
  background: var(--bg-card);
  border-bottom: 1px solid #d9d9d9;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: #1890ff;
  color: var(--primary);
  text-decoration: none;
}
.logo .logo-text {
  margin-left: 10px;
}
@supports (gap: 10px) {
  .logo .logo-text {
    margin-left: 0;
  }
}
.logo-img {
  display: block;
  height: 40px;
  width: auto;
  object-fit: contain;
}
.logo-text {
  display: inline-block;
}
.logo .logo-img[src=""],
.logo img:not([src]) {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  margin-left: 24px;
  gap: 4px;
}
.nav .nav-link + .nav-link,
.nav .nav-link + .menu-logout-wrap,
.nav .menu-logout-wrap + .nav-link {
  margin-left: 20px;
}
@supports (gap: 8px) {
  .nav .nav-link + .nav-link,
  .nav .nav-link + .menu-logout-wrap,
  .nav .menu-logout-wrap + .nav-link {
    margin-left: 0;
  }
  .nav {
    gap: 8px;
  }
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 10px 16px 10px 16px;
  border-radius: 10px;
  border-bottom: none;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(24, 144, 255, 0.08);
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.08);
}

.nav-link.active {
  color: var(--primary);
  font-weight: 600;
  padding-left: 20px;
  background: linear-gradient(135deg, rgba(24, 144, 255, 0.14) 0%, rgba(24, 144, 255, 0.06) 100%);
  box-shadow: 0 2px 12px rgba(24, 144, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(24, 144, 255, 0.2);
  position: relative;
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  min-height: 14px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

/* 导航「火」角标：菜单项加 class="hot" 即可显示 */
.nav-link.hot {
  position: relative;
  padding-right: 30px;
  /*color: #e8470a;*/
  /*font-weight: 600;*/
}
.nav-link.hot::after {
  content: '热';
  position: absolute;
  top: 4px;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  color: #fff;
  background: linear-gradient(145deg, #ff9a3c 0%, #ff4d4f 45%, #f5222d 100%);
  border-radius: 6px 6px 6px 2px;
  box-shadow: 0 2px 8px rgba(245, 34, 45, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  animation: nav-hot-bounce 1.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes nav-hot-bounce {
  0%, 100% { transform: scale(1) translateY(0); }
  30% { transform: scale(1.12) translateY(-1px); }
  60% { transform: scale(1) translateY(0); }
}
.nav-link.hot:hover {
  /*color: #f5222d;*/
  /*background: rgba(255, 77, 79, 0.1);*/
  /*box-shadow: 0 2px 10px rgba(255, 77, 79, 0.15);*/
}
.nav-link.hot.active {
  /*color: #f5222d;*/
  /*background: linear-gradient(135deg, rgba(255, 77, 79, 0.16) 0%, rgba(255, 154, 60, 0.08) 100%);*/
  /*border-color: rgba(255, 77, 79, 0.28);*/
  /*box-shadow: 0 2px 14px rgba(255, 77, 79, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);*/
}
.nav-link.hot.active::before {
  /*background: linear-gradient(180deg, #ff9a3c, #f5222d);*/
}

/* 桌面端：下拉容器仅为包裹，保持横向布局 */
.header-dropdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  margin-left: 24px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  margin-left: 24px;
}

.header-guest .btn-login {
  min-width: 72px;
  height: 44px;
  padding: 0 16px;
  font-size: 16px;
}

.header-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  font-size: 14px;
}

.header-user.hidden {
  display: none;
}

.header-user-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 12px;
  background: linear-gradient(165deg, rgba(24, 144, 255, 0.08) 0%, rgba(24, 144, 255, 0.02) 100%);
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}

.header-user-link:hover {
  background: linear-gradient(165deg, rgba(24, 144, 255, 0.12) 0%, rgba(24, 144, 255, 0.04) 100%);
  box-shadow: 0 4px 14px rgba(24, 144, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.header-guest.hidden {
  display: none;
}

.header-phone {
  color: var(--primary);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(24, 144, 255, 0.15) 0%, rgba(24, 144, 255, 0.08) 100%);
  border: none;
  line-height: 1.35;
  box-shadow: 0 1px 3px rgba(24, 144, 255, 0.1);
}

.header-balance {
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  line-height: 1.4;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.header-balance em {
  font-style: normal;
  font-weight: 800;
  font-size: 16px;
  color: var(--primary);
  letter-spacing: 0.02em;
  margin: 0;
}

.header-logout-btn {
  height: 44px;
  min-height: 44px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  margin-left: 16px;
  letter-spacing: 0.06em;
  color: #c41d7f;
  background: linear-gradient(135deg, rgba(196, 29, 127, 0.08) 0%, rgba(196, 29, 127, 0.02) 100%);
  border: 1px solid rgba(196, 29, 127, 0.4);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(196, 29, 127, 0.12);
  transition: color 0.25s, background 0.25s, border-color 0.25s, transform 0.2s, box-shadow 0.25s;
}

.header-logout-btn:hover {
  color: #b01a6f;
  background: linear-gradient(135deg, rgba(196, 29, 127, 0.14) 0%, rgba(196, 29, 127, 0.06) 100%);
  border-color: rgba(196, 29, 127, 0.65);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196, 29, 127, 0.22);
}

.header-logout-btn.hidden {
  display: none;
}

/* 三条杠菜单按钮（仅移动端显示） */
.header-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
}
.header-menu-btn:hover {
  background: var(--border);
  color: var(--text);
}
.menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
}
.menu-icon span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* 主内容 */
.main {
  flex: 1;
  padding: 24px 0;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  margin-bottom: 24px;
}

.page-header .page-back-wrap {
  margin-bottom: 0;
  margin-right: 24px;
  flex-shrink: 0;
}

.page-header .page-title {
  margin-bottom: 0;
  margin-left: auto;
  flex: 1;
  min-width: 0;
  text-align: right;
}

.page-back-wrap {
  margin-bottom: 16px;
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid rgba(24, 144, 255, 0.35);
  background: rgba(24, 144, 255, 0.04);
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.page-back-link:hover {
  background: rgba(24, 144, 255, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.section-title {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

/* 服务卡片 */
.service-cards {
  display: flex;
  flex-wrap: wrap;
  margin: -8px;
  margin-bottom: 28px;
}

/* 首页工具栏：服务标签 + 文本语言 + 检测平台同一行 */
.rewrite-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #fafcff 0%, #fff 100%);
  border: 1px solid rgba(24, 144, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.rewrite-toolbar .service-cards {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
  flex-shrink: 0;
}

/* 改写模式 3D 切换 */
.toolbar-filter-mode {
  flex-shrink: 0;
}

.mode-toggle-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.mode-toggle-3d {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  padding: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f5f0ff 0%, #ede8ff 100%);
  border: 1px solid rgba(89, 126, 247, 0.22);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.95), inset 0 -2px 6px rgba(89, 126, 247, 0.08), 0 3px 10px rgba(89, 126, 247, 0.12);
}

.mode-toggle-btn {
  position: relative;
  z-index: 2;
  min-width: 64px;
  height: 34px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.25s;
}

.mode-toggle-btn.active {
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.mode-toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(180deg, #85a5ff 0%, #597ef7 55%, #2f54eb 100%);
  box-shadow: 0 4px 10px rgba(47, 84, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), background 0.28s;
  pointer-events: none;
  z-index: 1;
}

.mode-toggle-3d.is-jiangchong .mode-toggle-slider {
  transform: translateX(100%);
  background: linear-gradient(180deg, #ffc069 0%, #fa8c16 55%, #d46b08 100%);
  box-shadow: 0 4px 10px rgba(250, 140, 22, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.mode-price-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  padding-left: 4px;
  white-space: nowrap;
}

.rewrite-toolbar .service-card {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 8px 14px;
  border-radius: 8px;
}

.rewrite-toolbar .service-card-title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.rewrite-toolbar .service-card-desc {
  display: none;
}

.rewrite-toolbar .service-price {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: left;
  margin-top: 0;
}

.rewrite-toolbar .service-card.active .service-price {
  color: #1890ff;
}

.rewrite-toolbar .service-card-badge {
  top: 4px;
  right: 4px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 6px;
}

.toolbar-divider {
  width: 1px;
  height: 32px;
  background: rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.rewrite-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  flex: 1;
  min-width: 0;
}

.toolbar-filter-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.toolbar-filter-platform {
  flex: 1;
  min-width: 160px;
}

.toolbar-filter-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0;
}

.rewrite-toolbar .toolbar-option-group {
  margin-bottom: 0;
}

/* 检测平台 3D 按钮组 */
.platform-toggle-3d {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8faff 0%, #eef4ff 100%);
  border: 1px solid rgba(24, 144, 255, 0.16);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.92), inset 0 -1px 4px rgba(24, 144, 255, 0.06), 0 2px 8px rgba(24, 144, 255, 0.08);
}

.platform-toggle-btn {
  position: relative;
  height: 34px;
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(24, 144, 255, 0.14);
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f0f5ff 100%);
  box-shadow: 0 3px 0 rgba(24, 144, 255, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, color 0.2s, border-color 0.2s;
}

.platform-toggle-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 144, 255, 0.28);
  box-shadow: 0 4px 0 rgba(24, 144, 255, 0.18), 0 4px 10px rgba(24, 144, 255, 0.1);
  color: var(--primary);
}

.platform-toggle-btn.active {
  background: linear-gradient(180deg, #69b1ff 0%, #1677ff 52%, #0958d9 100%);
  border-color: #0958d9;
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 0 #004fc4, 0 4px 14px rgba(22, 119, 255, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.32);
  transform: translateY(1px);
}

.platform-toggle-btn.active:hover {
  color: #fff;
  transform: translateY(1px);
}

.rewrite-toolbar .option-btn {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.rewrite-toolbar .form-option-group-wrap .option-btn {
  margin-bottom: 6px;
}

.rewrite-toolbar .platform-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.rewrite-toolbar .platform-select-wrap {
  display: none;
  flex: 1;
  min-width: 0;
}

.header-vip-badge {
  font-size: 13px;
  font-weight: 500;
  margin-left: 4px;
}

/* 文本语言 3D 一体切换 */
.toolbar-filter-lang {
  flex-shrink: 0;
}

.lang-toggle-3d {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  padding: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f0f5ff 0%, #e6f0ff 100%);
  border: 1px solid rgba(24, 144, 255, 0.2);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.9), inset 0 -2px 6px rgba(24, 144, 255, 0.08), 0 2px 8px rgba(24, 144, 255, 0.12);
}

.lang-toggle-btn {
  position: relative;
  z-index: 2;
  min-width: 52px;
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.25s;
}

.lang-toggle-btn.active {
  color: #fff;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.lang-toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: linear-gradient(180deg, #69b1ff 0%, #1677ff 55%, #0958d9 100%);
  box-shadow: 0 3px 8px rgba(22, 119, 255, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.lang-toggle-3d.is-english .lang-toggle-slider {
  transform: translateX(100%);
}

/* 前台记录列表隔行淡色背景 */
.rewrite-table tbody tr:nth-child(even),
.balance-records-table tbody tr:nth-child(even),
.promote-records-table tbody tr:nth-child(even),
.recharge-records-table tbody tr:nth-child(even),
.redeem-records-table tbody tr:nth-child(even) {
  background: rgba(24, 144, 255, 0.035);
}

.rewrite-table tbody tr:hover,
.balance-records-table tbody tr:hover,
.promote-records-table tbody tr:hover,
.recharge-records-table tbody tr:hover,
.redeem-records-table tbody tr:hover {
  background: rgba(24, 144, 255, 0.07) !important;
}

/* 首页金币 + VIP 倒计时 3D */
.balance-hint-row-3d {
  align-items: center;
}

.balance-left-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.balance-display-3d {
  display: inline-flex;
  align-items: baseline;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(145deg, #ffffff 0%, #f0f7ff 100%);
  border: 1px solid rgba(24, 144, 255, 0.18);
  box-shadow: 0 3px 0 rgba(24, 144, 255, 0.12), 0 4px 12px rgba(24, 144, 255, 0.08);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.balance-display-3d em {
  font-style: normal;
  font-weight: 800;
  font-size: 20px;
  color: var(--primary);
  margin-left: 2px;
}

.balance-display-3d.balance-display-vip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: calc(1.5em + 20px + 2px); /* 与 mode-desc-hint 同高：line + padding + border */
  padding: 10px 16px 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffe9a8;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.55),
    0 0 12px rgba(255, 215, 120, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 236, 179, 0.22) 0%, transparent 42%),
    linear-gradient(145deg, #3a2a12 0%, #1a1208 38%, #0d0a06 72%, #2a1c0c 100%);
  border: 1px solid rgba(232, 190, 98, 0.75);
  box-shadow:
    0 1px 0 rgba(255, 236, 180, 0.35) inset,
    0 -2px 0 rgba(0, 0, 0, 0.35) inset,
    0 4px 0 #5c4214,
    0 8px 18px rgba(92, 66, 20, 0.45),
    0 0 0 1px rgba(255, 215, 128, 0.12);
  white-space: nowrap;
  overflow: hidden;
}

.balance-display-3d.balance-display-vip::before {
  content: "VIP";
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #3b2308;
  background: linear-gradient(180deg, #ffe9a3 0%, #f0c14b 45%, #c9921a 100%);
  border: 1px solid rgba(255, 236, 170, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 2px 4px rgba(0, 0, 0, 0.35),
    0 0 10px rgba(240, 193, 75, 0.45);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.balance-display-3d.balance-display-vip::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 35%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 245, 200, 0.18), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}

.balance-display-3d.hidden,
.balance-display-vip.hidden {
  display: none !important;
}

.balance-hint-row .mode-desc-hint {
  flex: 1 1 200px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  color: #1e3a5f;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid rgba(37, 99, 235, 0.35);
  box-shadow: 0 2px 0 rgba(37, 99, 235, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.balance-hint-row .mode-desc-hint::before {
  content: "💡";
  flex-shrink: 0;
  font-size: 16px;
}

.vip-countdown-3d {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #ad6800;
  background: linear-gradient(145deg, #fffbe6 0%, #fff1b8 100%);
  border: 1px solid rgba(250, 173, 20, 0.35);
  box-shadow: 0 3px 0 rgba(250, 173, 20, 0.15), 0 3px 10px rgba(250, 173, 20, 0.12);
  white-space: nowrap;
}

.vip-countdown-3d.hidden {
  display: none !important;
}

/* 导航栏用户区 */
.header-user-meta {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
}

.header-vip-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(145deg, #ffc53d 0%, #fa8c16 50%, #d48806 100%);
  box-shadow: 0 2px 0 #ad6800, 0 3px 8px rgba(250, 140, 22, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.header-coin-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: linear-gradient(145deg, #fff 0%, #f5f9ff 100%);
  border: 1px solid rgba(24, 144, 255, 0.15);
  box-shadow: 0 2px 0 rgba(24, 144, 255, 0.08);
}

.header-coin-tag em {
  font-style: normal;
  font-weight: 700;
  color: var(--primary);
  margin-left: 2px;
}

.header-vip-tag.hidden,
.header-coin-tag.hidden {
  display: none !important;
}

.service-card-placeholder {
  width: 100%;
  text-align: center;
  font-size: 14px;
}

@supports (display: grid) {
  .service-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0 0 28px 0;
  }
}

.service-card {
  flex: 1 1 calc(25% - 16px);
  box-sizing: border-box;
  margin: 8px;
  max-width: calc(25% - 16px);
}

@supports (display: grid) {
  .service-card {
    margin: 0;
    flex: none;
    max-width: none;
  }
}

@media (max-width: 900px) {
  .service-card {
    flex: 1 1 calc(50% - 16px);
    max-width: calc(50% - 16px);
  }
  @supports (display: grid) {
    .service-cards {
      grid-template-columns: repeat(2, 1fr);
    }
    .service-card {
      flex: none;
      max-width: none;
    }
  }
}

@media (max-width: 500px) {
  .service-card {
    flex: 1 1 100%;
    max-width: none;
  }
  @supports (display: grid) {
    .service-cards {
      grid-template-columns: 1fr;
    }
  }
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.service-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.service-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 2px 12px rgba(24, 144, 255, 0.15), 0 1px 2px rgba(0, 0, 0, 0.04);
}
/* 选中项提示（可选择的提示样式） */
.service-card.active::after {
  display: none;
}

.service-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 500;
}

.vip-badge {
  color: #d46b08;
  font-size: 14px;
  margin-left: 12px;
}

.rewrite-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  border-radius: 8px;
}

.rewrite-overlay-inner {
  text-align: center;
  padding: 24px;
}

.rewrite-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border: 4px solid rgba(24, 144, 255, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: rewrite-spin 0.9s linear infinite;
}

@keyframes rewrite-spin {
  to { transform: rotate(360deg); }
}

.rewrite-overlay-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.rewrite-overlay-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.result-body {
  position: relative;
  min-height: 280px;
}

.result-body.is-rewriting .result-content,
.result-body.is-rewriting .result-placeholder {
  opacity: 0.3;
  pointer-events: none;
}

.service-card-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.service-card-desc {
  flex: 1;
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.service-price {
  margin-top: auto;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  text-align: right;
}

/* 表单 */
.form-section {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.form-section:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* 用户余额与计费提示（form-section 与 content-result-row 之间） */
.balance-hint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(24, 144, 255, 0.05) 0%, var(--bg-page) 100%);
  border-radius: 12px;
  border: 1px solid rgba(24, 144, 255, 0.15);
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.balance-hint-row .charge-hint {
    margin-left: 12px;
    font-size: 14px;
    color: rgb(146, 64, 14);
    background-color: rgb(254, 243, 199);
    padding: 6px 12px;
    border-radius: 10px;
}
@supports (gap: 12px) {
  .balance-hint-row {
    gap: 12px;
  }
  .balance-hint-row .charge-hint {
    margin-left: 0;
  }
}
.balance-display {
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.balance-display em {
  font-style: normal;
  font-weight: 800;
  font-size: 22px;
  color: var(--primary);
  letter-spacing: 0.03em;
  margin: 0 2px;
}
.charge-hint {
  color: rgb(146, 64, 14);
  background-color: rgb(254, 243, 199);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 14px;
}

.form-row {
  margin-bottom: 22px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-row-inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 24px;
}

.form-inline-item {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  white-space: nowrap;
}

.form-inline-item .form-label {
  margin-bottom: 0;
  flex-shrink: 0;
}

.form-inline-item .form-option-group {
  margin-bottom: 0;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.form-select-wrap,
.input-group,
.input-text-group {
  width: 100%;
}

.input-text-group {
  position: relative;
}

.text-input-html-view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-card, #fff);
  z-index: 2;
  cursor: text;
}

.text-input-html-view.hidden {
  display: none;
}

.original-diff-html span,
#textInputHtml span {
  color: #e11d48 !important;
  text-decoration: line-through;
}

#resultContent span {
  color: inherit;
}

/* 横向选项按钮组 */
.form-option-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}

/* 用 margin 统一间距，兼容 Edge（不依赖 gap） */
.form-option-group .option-btn,
.form-option-group .btn {
  margin-right: 12px;
  margin-bottom: 0;
}
.form-option-group .option-btn:last-child,
.form-option-group .btn:last-child {
  margin-right: 0;
}

.form-option-group-wrap {
  flex-wrap: wrap;
}
.form-option-group-wrap .option-btn,
.form-option-group-wrap .btn {
  margin-bottom: 12px;
}

.option-btn {
  height: var(--form-control-height);
  min-height: var(--form-control-height);
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: var(--form-control-font-size);
  color: var(--text);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.option-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.option-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* 首页文本语言按钮已选样式 */
#textLangGroup .option-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.25);
}

#textLangGroup .option-btn.active:hover {
  background: var(--primary-hover, #1890ff);
  border-color: var(--primary-hover, #1890ff);
  color: #fff;
}

/* 首页检测平台按钮已选样式 */
#platformGroup .option-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.25);
}

#platformGroup .option-btn.active:hover {
  background: var(--primary-hover, #1890ff);
  border-color: var(--primary-hover, #1890ff);
  color: #fff;
}

/* 检测平台为 form-option-group-wrap，间距已由上方统一 margin 控制 */

.option-btn.hidden {
  display: none;
}

.platform-hint {
  margin-top: 8px;
  font-size: var(--form-control-font-size);
  color: var(--text-secondary);
}

.platform-hint.hidden {
  display: none;
}

/* 检测平台：PC 端用按钮组，移动端用下拉，此处默认隐藏下拉 */
.platform-select-wrap {
  display: none;
}

.form-select {
  width: 100%;
  height: var(--form-control-height);
  min-height: var(--form-control-height);
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: var(--form-control-font-size);
  color: var(--text);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.12);
}

.form-select-wrap-auto {
  width: auto;
}

.form-select-auto {
  width: auto;
  min-width: 8em;
  height: var(--form-control-height);
  min-height: var(--form-control-height);
  font-size: var(--form-control-font-size);
}

.form-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: var(--form-control-font-size);
  font-family: inherit;
  color: var(--text);
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-textarea::placeholder {
  color: var(--text-placeholder);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.15);
}

/* 改写内容区文本框：与 result-body 同高，PC 端改写内容与改写结果高度一致 */
.form-textarea-no-border {
  min-height: 0;
  height: 23.4em;
  height: var(--content-area-height);
  line-height: 1.5;
  padding: 0;
  border: none;
  border-radius: 0;
  resize: none;
  overflow-y: auto;
  box-sizing: border-box;
}

.form-textarea-no-border:focus {
  border: none;
  outline: none;
}

/* 文本框、结果区：细线滚动条 */
.form-textarea-no-border::-webkit-scrollbar,
.content-col-right .result-body::-webkit-scrollbar {
  width: 4px;
}

.form-textarea-no-border::-webkit-scrollbar-track,
.content-col-right .result-body::-webkit-scrollbar-track {
  background: transparent;
}

.form-textarea-no-border::-webkit-scrollbar-thumb,
.content-col-right .result-body::-webkit-scrollbar-thumb {
  background: #d9d9d9;
  background: var(--border);
  border-radius: 2px;
}

.form-textarea-no-border::-webkit-scrollbar-thumb:hover,
.content-col-right .result-body::-webkit-scrollbar-thumb:hover {
  background: #bfbfbf;
  background: var(--text-placeholder);
}

.form-textarea-no-border,
.content-col-right .result-body {
  scrollbar-width: thin;
  scrollbar-color: #d9d9d9 transparent;
  scrollbar-color: var(--border) transparent;
}

.file-upload-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 文件上传区：高度与文本输入区一致，file 控件固定高度 */
.input-mode-file .file-upload-wrap-fixed {
  height: 23.4em;
  min-height: 23.4em;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
}

.input-mode-file .file-input-fixed {
  height: var(--form-control-height);
  min-height: var(--form-control-height);
  font-size: var(--form-control-font-size);
  cursor: pointer;
}

/* 文件拖拽上传区：仅支持 Word */
.file-drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 23.4em;
  min-height: 23.4em;
  box-sizing: border-box;
  border: 2px dashed var(--border);
  border-radius: 10px;
  background: var(--bg-page);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.file-drop-zone:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-drop-zone .file-input-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
}

.file-drop-zone .file-drop-text {
  font-size: 14px;
  color: var(--text-secondary);
  pointer-events: none;
}

.file-drop-zone .file-drop-name {
  margin-top: 8px;
  font-size: 13px;
  color: var(--primary);
}

.file-drop-zone .file-drop-name.hidden {
  display: none;
}

.file-input {
  font-size: 14px;
}

.file-hint {
  color: var(--text-secondary);
  font-size: 13px;
}

/* PC 端：改写内容与改写结果左右布局（仅移动端在下方 @media 中改为上下布局） */
.content-result-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  margin-bottom: 24px;
  align-items: stretch;
}
.content-result-row .content-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.content-result-row .content-col:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}
/* 两列中间留空：用 margin 控制，Edge 也生效 */
.content-result-row .content-col-left {
  margin-right: 12px;
}
.content-result-row .content-col-right {
  margin-left: 12px;
}

@media (min-width: 769px) {
  .content-result-row {
    flex-direction: row;
    flex-wrap: nowrap;
  }
  .content-result-row .content-col-left,
  .content-result-row .content-col-right {
    display: flex;
    flex: 1 1 0%;
    min-width: 0;
  }
}


.content-col-left .input-mode-switch {
  flex-shrink: 0;
}

.content-col-left .input-mode-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.content-col-left .action-inline {
  flex-shrink: 0;
  margin-top: auto;
}

.content-col-title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.content-col-left .content-col-title:not(.content-col-title-tab) {
  display: none;
}

/* 改写结果：与段落改写/文件改写同一水平线（同款样式、等高、下划线对齐） */
.content-col-title-tab {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 10px;
  margin: 0 0 12px;
  border: none;
  border-bottom: 3px solid var(--primary);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary);
  letter-spacing: 0.02em;
  background: transparent;
  min-width: 5.5em;
  box-sizing: border-box;
  box-shadow: 0 2px 0 0 rgba(24, 144, 255, 0.15);
}

.content-col-title-text {
  flex-shrink: 0;
}

.predict-ai-rate {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #666);
  white-space: nowrap;
  letter-spacing: 0;
}

.predict-ai-rate-value {
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
  margin: 0 2px;
}

.predict-ai-rate-error {
  font-size: 11px;
  font-weight: 400;
  color: #999;
}

.predict-ai-rate-value.ai-rate-green {
  color: #52c41a;
}

.predict-ai-rate-value.ai-rate-yellow {
  color: #faad14;
}

.predict-ai-rate-value.ai-rate-purple {
  color: #722ed1;
}

.predict-ai-rate-value.ai-rate-red {
  color: #f5222d;
}

.predict-ai-rate-value.predict-ai-rate-zero {
  color: #52c41a;
}

@media (max-width: 768px) {
  .predict-ai-rate {
    font-size: 12px;
  }
  .predict-ai-rate-value {
    font-size: 13px;
  }
}

@media (min-width: 769px) {
  /* 左右第一行等高，文字与下划线同一水平线 */
  .content-col-left .content-col-title-tab,
  .content-col-right .content-col-title-tab {
    height: 34px;
    min-height: 34px;
    min-height: var(--title-row-height);
    margin-bottom: 12px;
    display: flex;
    align-items: flex-end;
    box-sizing: border-box;
  }
  .content-col-title-tab {
    padding: 0 4px 10px;
  }
  /* 左侧重置/一键改写 与 右侧复制结果/下载 按钮区底对齐 */
  .content-col-right .result-actions {
    margin-top: auto;
  }
}

.input-mode-switch {
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  box-sizing: border-box;
}

.input-mode-switch .form-option-group {
  margin-bottom: 0;
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 0;
}

/* 文本输入/文件上传：下划线 tab 样式，选中显示下划线+主题色 */
.input-mode-switch .option-btn {
  height: auto;
  padding: 0 4px 10px;
  margin: 0;
  min-width: 5.5em;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  border-bottom: 3px solid transparent;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.25s, border-color 0.25s, background 0.2s;
}

.input-mode-switch .option-btn:hover {
  color: var(--primary);
  border-bottom-color: transparent;
  background: rgba(24, 144, 255, 0.04);
}

.input-mode-switch .option-btn.active {
  color: var(--primary);
  font-weight: 600;
  background: transparent;
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 2px 0 0 rgba(24, 144, 255, 0.15);
}

.input-mode-panel.hidden {
  display: none;
}

.content-col-left .form-row {
  margin-bottom: 16px;
}

.content-col-left .form-row:last-of-type {
  margin-bottom: 0;
}

.action-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.action-inline .char-count {
  display: inline;
  color: var(--text-secondary);
  font-size: 14px;
}

.action-inline .char-count.hidden {
  display: none !important;
}

.action-inline .char-count span {
  color: var(--primary);
  font-weight: 500;
}

.action-inline .action-buttons {
  margin-left: auto;
  display: flex;
}
.action-inline .action-buttons .btn + .btn {
  margin-left: 12px;
}

.content-col-right .result-section {
  flex: 1;
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.content-col-right .result-actions {
  flex-shrink: 0;
}

.content-col-right .result-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 23.4em;
  height: var(--content-area-height);
  min-height: 23.4em;
  min-height: var(--content-area-height);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  box-sizing: border-box;
  line-height: 1.5;
  font-size: var(--form-control-font-size);
  border: none;
}

.char-count {
  color: var(--text-secondary);
  font-size: 14px;
}

.char-count span {
  color: var(--primary);
  font-weight: 500;
}

.action-buttons {
  display: flex;
}
.action-buttons .btn + .btn {
  margin-left: 12px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--form-control-height);
  min-height: var(--form-control-height);
  padding: 0 18px;
  border-radius: 10px;
  font-size: var(--form-control-font-size);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-default {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-default:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid transparent;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.25);
}

.btn:disabled,
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-generate {
  min-width: 100px;
}

/* 结果区 */
.result-section {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 24px;
  border: 1px solid var(--border);
  min-height: 180px;
}

.result-placeholder {
  flex: 1;
  color: var(--text-placeholder);
  text-align: center;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.result-content {
  padding: 0;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  min-height: 0;
}

.result-content.hidden {
  display: none;
}

.result-placeholder.hidden {
  display: none;
}

.result-progress {
  padding: 16px 0;
}
.result-progress.hidden {
  display: none;
}
.result-progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}
.result-progress-inner {
  display: block;
  height: 100%;
  width: 0;
  max-width: 100%;
  background: rgb(24, 144, 255);
  border-radius: 4px;
  transition: width 0.2s ease;
}
.result-progress-text {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.result-actions {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.result-actions-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.result-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.btn-regen {
  background-color: #22a06b;
  border-color: #22a06b;
  color: #fff;
}
.btn-regen:hover:not(:disabled) {
  background-color: #1b8a5a;
  border-color: #1b8a5a;
  color: #fff;
}
.btn-regen:disabled {
  opacity: 0.65;
}
.result-actions .btn + .btn {
  margin-left: 0;
}

.result-actions .btn.hidden {
  display: none;
}

.result-copy-tip {
  font-size: 12px;
  color: #52c41a;
  align-self: center;
  margin-left: 10px;
}
.result-copy-tip.hidden {
  display: none;
}

.result-char-count {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* 页脚 */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-inner a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--primary);
}

.divider {
  margin: 0 8px;
  color: var(--border);
}

.copyright,
.icp {
  margin: 8px 0 0;
}

.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* 处理中：全局不可操作模态（兼容 Edge 居中显示） */
.loading-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-overlay.hidden {
  display: none;
}

.loading-overlay-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 32px;
  background: #fff;
  background: var(--bg-card);
  border-radius: 8px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid #d9d9d9;
  border: 1px solid var(--border);
}
.loading-overlay-content .loading-overlay-spinner + .loading-overlay-text {
  margin-top: 16px;
}
@supports (gap: 16px) {
  .loading-overlay-content {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    gap: 16px;
  }
  .loading-overlay-content .loading-overlay-spinner + .loading-overlay-text {
    margin-top: 0;
  }
}

.loading-overlay-spinner {
  display: block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: toast-spin 0.8s linear infinite;
}

.loading-overlay-text {
  font-size: 15px;
  color: var(--text);
}

@keyframes toast-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 消息提示框：成功 / 失败 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 300px;
  max-width: 90vw;
  padding: 18px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  pointer-events: none;
  animation: toast-in 0.3s ease-out;
}

.toast.hidden {
  display: none;
}

.toast .toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  border-radius: 50%;
  font-weight: 700;
}

.toast-success {
  background: linear-gradient(135deg, #f6ffed 0%, #edfbe8 100%);
  border: 2px solid #95de64;
  color: #389e0d;
}

.toast-success .toast-icon {
  background: rgba(82, 196, 26, 0.2);
  color: #52c41a;
}

.toast-success .toast-icon::before {
  content: "✓";
}

.toast-error {
  background: linear-gradient(135deg, #fff2f0 0%, #ffebe8 100%);
  border: 2px solid #ffa39e;
  color: #cf1322;
}

.toast-error .toast-icon {
  background: rgba(255, 77, 79, 0.15);
  color: #ff4d4f;
}

.toast-error .toast-icon::before {
  content: "✕";
}

.toast-msg {
  flex: 1;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }
}

/* 右下角固定：扫码添加老师微信（默认显示，可关闭） */
.fixed-contact {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
}

.fixed-contact-qr {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 216px;
  padding: 24px;
  padding-top: 44px;
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
  border-top: 3px solid #07c160;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s, box-shadow 0.2s;
}

.fixed-contact-qr:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(7, 193, 96, 0.12);
}

.fixed-contact.qr-closed .fixed-contact-qr {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
}

.fixed-contact-qr-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  background: var(--bg-page);
  color: var(--text-secondary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.fixed-contact-qr-close:hover {
  background: rgba(7, 193, 96, 0.1);
  color: #07c160;
  transform: scale(1.05);
}

.fixed-contact-qr-title {
  display: block;
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.02em;
}

.fixed-contact-qr-img-wrap {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 0 auto;
}

.fixed-contact-qr-img {
  display: block;
  width: 168px;
  height: 168px;
  margin: 0 auto;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  box-sizing: border-box;
  border: 1px solid var(--border);
}

.fixed-contact-wechat-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 8px;
  background: #07c160;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(7, 193, 96, 0.35);
  border: 2px solid #fff;
  pointer-events: none;
}

.fixed-contact-qr-placeholder {
  width: 168px;
  height: 168px;
  margin: 0 auto;
  background: var(--bg-page);
  border: 2px dashed var(--border);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-placeholder);
  text-align: center;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

/* ========== 手机版 / 平板自适应 ========== */
@media (max-width: 768px) {
  /* 检测平台：移动端用下拉，隐藏按钮组 */
  .platform-row .platform-btns {
    display: none;
  }
  .platform-row .platform-select-wrap {
    display: block;
    flex: 1;
    min-width: 0;
    width: auto;
  }

  .rewrite-toolbar .toolbar-filter-platform {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
  }

  .rewrite-toolbar .toolbar-filter-platform .toolbar-filter-label {
    width: auto;
    flex-shrink: 0;
    font-size: 13px;
  }

.rewrite-toolbar .platform-select-wrap .form-select {
    height: 34px;
    min-height: 34px;
    padding: 0 28px 0 12px;
    font-size: 13px;
    border-radius: 9px;
    border: 1px solid rgba(24, 144, 255, 0.2);
    background: linear-gradient(180deg, #fff 0%, #f0f5ff 100%);
    box-shadow: 0 3px 0 rgba(24, 144, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  }

  /* 移动端模式选择宽度不超过检测平台下拉框（同宽） */
  .form-row .form-select-wrap-auto {
    width: 100%;
    max-width: 100%;
  }
  #modeSelect.form-select-auto {
    width: 100%;
    max-width: 100%;
  }

  :root {
    --header-height: 72px;
  }

  .header {
    border-bottom: 1px solid rgba(24, 144, 255, 0.12);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  .header-inner {
    position: relative;
    padding: 0 18px;
    flex-wrap: nowrap;
    gap: 0;
    min-height: var(--header-height);
    height: var(--header-height);
    padding-top: 0;
    padding-bottom: 0;
  }

  .logo {
    font-size: 19px;
    font-weight: 700;
    order: 1;
    gap: 10px;
    letter-spacing: 0.02em;
    color: var(--primary);
  }
  .logo:active {
    opacity: 0.9;
  }
  .logo-img {
    height: 38px;
    width: auto;
  }
  .logo-text {
    letter-spacing: 0.03em;
  }

  /* 右上角三条杠：大气触控区与图标 */
  .header-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
    margin-left: auto;
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    padding: 0;
    border: none;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(24, 144, 255, 0.06) 0%, rgba(24, 144, 255, 0.02) 100%);
    color: var(--primary);
    cursor: pointer;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.08);
  }
  .header-menu-btn:hover {
    background: linear-gradient(180deg, rgba(24, 144, 255, 0.12) 0%, rgba(24, 144, 255, 0.05) 100%);
    color: var(--primary);
    box-shadow: 0 4px 14px rgba(24, 144, 255, 0.15);
  }
  .header-menu-btn:active {
    transform: scale(0.96);
  }
  .header-menu-btn .menu-icon {
    width: 26px;
    height: 20px;
    justify-content: space-between;
  }
  .header-menu-btn .menu-icon span {
    height: 3px;
    border-radius: 2px;
    background: currentColor;
    opacity: 0.95;
  }

  /* 下拉菜单容器：默认收起，高端风格 */
  .header-dropdown {
    display: block;
    flex: none;
    margin-left: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(24, 144, 255, 0.06);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
  }
  .header-dropdown.open {
    max-height: 80vh;
    overflow-y: auto;
    opacity: 1;
  }

  .header-dropdown .nav {
    flex-direction: column;
    width: 100%;
    gap: 6px;
    margin: 0;
    padding: 16px 20px 20px;
    border-top: none;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(24, 144, 255, 0.02) 0%, transparent 100%);
  }
  .header-dropdown .nav-link {
    display: block;
    padding: 14px 16px 14px 20px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 12px;
    border-bottom: none;
    border-left: 4px solid transparent;
    transition: background 0.2s, color 0.2s, border-left-color 0.2s;
  }
  .header-dropdown .nav-link:hover {
    background: rgba(24, 144, 255, 0.08);
    border-left-color: rgba(24, 144, 255, 0.4);
  }
  .header-dropdown .nav-link.active {
    font-weight: 600;
    color: var(--primary);
    background: linear-gradient(90deg, rgba(24, 144, 255, 0.14) 0%, rgba(24, 144, 255, 0.05) 100%);
    border-left-color: var(--primary);
    border-left-width: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  .header-dropdown .nav-link.hot {
    /*color: #f5222d;*/
    padding-right: 36px;
  }
  .header-dropdown .nav-link.hot::after {
    top: 12px;
    right: 12px;
    min-width: 22px;
    height: 22px;
    font-size: 12px;
  }
  .header-dropdown .nav-link.hot.active {
    /*color: #f5222d;*/
    background: linear-gradient(90deg, rgba(255, 77, 79, 0.14) 0%, rgba(255, 154, 60, 0.06) 100%);
    /*border-left-color: #ff4d4f;*/
  }
  .header-dropdown .nav-link:last-child {
    border-bottom: none;
  }
  .header-dropdown .nav .nav-link + .nav-link,
  .header-dropdown .nav .nav-link + .menu-logout-wrap,
  .header-dropdown .nav .menu-logout-wrap + .nav-link {
    margin-left: 0;
  }

  .header-dropdown .header-right {
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    margin: 0;
    font-size: 14px;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .header-dropdown .header-user {
    align-items: center;
    width: 100%;
  }
  .header-dropdown .header-user-link {
    align-items: center;
    width: 100%;
    max-width: 280px;
    padding: 12px 18px;
  }
  .header-dropdown .header-phone {
    font-size: 15px;
    padding: 5px 14px;
  }
  .header-dropdown .header-balance em {
    font-size: 17px;
  }
  .header-dropdown .btn-login,
  .header-dropdown .header-logout-btn {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    justify-content: center;
  }

  .main {
    padding: 16px 0;
  }

  .container {
    padding: 0 16px;
  }

  .section-title {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .service-cards {
    gap: 12px;
    margin-bottom: 20px;
  }

  .rewrite-toolbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 12px;
    gap: 8px 10px;
  }

  .toolbar-filter-mode {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .toolbar-filter-mode .toolbar-filter-label {
    flex-shrink: 0;
    font-size: 12px;
    white-space: nowrap;
  }

  .mode-toggle-wrap {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  .mode-toggle-3d {
    width: 100%;
    max-width: 100%;
  }

  .mode-toggle-btn {
    flex: 1;
    min-width: 0;
    min-width: 48px;
    height: 30px;
    padding: 0 10px;
    font-size: 13px;
  }

  .mode-toggle-slider {
    height: calc(100% - 8px);
  }

  .toolbar-divider {
    display: none;
  }

  .rewrite-toolbar-filters {
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .toolbar-filter-item {
    width: 100%;
  }

  .service-card {
    padding: 14px;
  }

  .service-card-title {
    font-size: 16px;
  }

  .service-card-desc {
    font-size: 16px;
  }

  .content-result-row {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
  }
  .content-result-row .content-col + .content-col {
    margin-top: 16px;
  }
  @supports (gap: 16px) {
    .content-result-row .content-col + .content-col {
      margin-top: 0;
    }
  }
  /* 移动端两列去掉左右外边距，同宽、居中对齐 */
  .content-result-row .content-col-left,
  .content-result-row .content-col-right {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .content-col {
    padding: 16px;
  }

  .content-col-title {
    margin-bottom: 12px;
    font-size: 15px;
  }

  /* 文本输入、改写结果内的 form-row 去掉外边距 */
  .content-col-left .form-row,
  .content-col-right .form-row {
    margin-bottom: 0;
  }

  .form-section {
    padding: 16px;
    margin-bottom: 16px;
  }

  .balance-hint-row {
    margin-bottom: 16px;
    padding: 12px 16px;
    font-size: 15px;
  }
  .balance-left-group {
    width: 100%;
  }
  .balance-display-3d.balance-display-vip {
    font-size: 12px;
    padding: 10px 12px 10px 10px;
    letter-spacing: 0.02em;
  }
  .balance-display-3d.balance-display-vip::before {
    min-width: 30px;
    height: 20px;
    font-size: 10px;
  }
  .vip-countdown-3d {
    font-size: 12px;
    padding: 6px 10px;
  }
  .lang-toggle-btn {
    min-width: 46px;
    padding: 0 10px;
    font-size: 12px;
  }
  .balance-display {
    font-size: 15px;
  }
  .balance-display em {
    font-size: 20px;
  }

  .form-row {
    margin-bottom: 16px;
  }

  .form-select {
    height: 44px;
    font-size: 16px; /* 防止 iOS 缩放 */
  }

  .form-textarea {
    min-height: 100px;
    padding: 12px;
    font-size: 16px;
  }

  /* 文本输入区高度与改写结果区一致 */
  .content-col-right .result-body {
    height: 180px;
    min-height: 180px;
  }
  .content-col-left .input-mode-text .form-textarea-no-border {
    height: 180px;
    min-height: 180px;
  }
  .content-col-left .input-mode-file .file-upload-wrap-fixed {
    height: 180px;
    min-height: 180px;
  }

  .option-btn {
    min-height: 44px;
    height: 44px;
  }

  .file-upload-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .action-inline {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
  }

  .action-inline .action-buttons {
    margin-left: 0;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .btn {
    min-height: 44px;
    height: 44px;
    padding: 0 20px;
  }

  .result-section {
    padding: 16px;
    min-height: 140px;
  }

  .result-placeholder {
    padding: 32px 0;
  }

  .result-actions {
    flex-wrap: wrap;
  }

  /* 移动端：不展示原文 diff HTML，始终显示 textarea */
  #textInputHtml {
    display: none !important;
  }
  .input-text-group #textInput.hidden {
    display: block !important;
  }

  /* 隐藏「（一段段“降”最佳）」与「（免费）」 */
  .content-col-title-tip,
  .btn-regen-free-tip {
    display: none;
  }

  /* 字符统计单独一行靠左 */
  .result-actions-right {
    flex-wrap: wrap;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  .result-actions-right .result-char-count {
    flex: 0 0 100%;
    width: 100%;
    text-align: left;
    margin-top: 4px;
  }

  .footer {
    padding: 20px 16px;
  }

  .footer-inner {
    font-size: 12px;
  }

  .footer-inner .divider {
    margin: 0 6px;
  }

  .modal-box {
    margin: 16px;
    padding: 20px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }

  .modal-title {
    font-size: 16px;
  }

  .modal-confirm {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0 14px;
  }
  .logo {
    font-size: 18px;
  }
  .logo-img {
    height: 36px;
  }

  .nav {
    gap: 8px;
  }

  .nav-link {
    font-size: 12px;
  }

  .container {
    padding: 0 12px;
  }

  .service-cards {
    gap: 10px;
    margin-bottom: 16px;
  }

  .service-card {
    padding: 12px;
  }

  .form-section {
    padding: 12px;
  }

  .content-col {
    padding: 12px;
  }

  .content-col-title {
    font-size: 15px;
  }

  .char-count {
    font-size: 13px;
  }

  .action-buttons .btn + .btn {
    margin-left: 8px;
  }

  .action-buttons .btn {
    flex: 1;
    min-width: 0;
  }

  .btn-generate {
    min-width: 0;
  }

  .result-section {
    padding: 12px;
  }

  .result-actions .btn {
    flex: 1;
    min-width: 0;
  }

  .footer-inner a,
  .footer-inner .divider {
    display: inline-block;
  }

  .footer-inner .divider {
    display: none;
  }

  .footer-inner a::after {
    content: " | ";
    color: var(--border);
    margin: 0 2px;
  }

  .footer-inner a:last-of-type::after {
    content: none;
  }

  .modal-box {
    margin: 12px;
    padding: 16px;
    width: calc(100% - 24px);
  }
}
