/* 皮卡丘官网主题 - 主色蓝白、卡片式 */
: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 {
  -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;
}

/* 桌面端：下拉容器仅为包裹，保持横向布局 */
.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;
}

.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 {
  content: '已选';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 500;
}

.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 {
  width: 100%;
}

/* 横向选项按钮组 */
.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 {
  display: none;
}

/* 改写结果：与段落改写/文件改写同一水平线（同款样式、等高、下划线对齐） */
.content-col-title-tab {
  display: block;
  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);
}

@media (min-width: 769px) {
  /* 左右第一行等高，文字与下划线同一水平线 */
  .content-col-left .input-mode-switch,
  .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;
  gap: 12px;
}
.result-actions .btn + .btn {
  margin-left: 12px;
}

.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 {
  display: none;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* 页脚 */
.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 {
  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-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;
    width: 100%;
  }

  /* 移动端模式选择宽度不超过检测平台下拉框（同宽） */
  .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: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;
  }

  .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-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;
  }

  .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);
  }
}
