/* ============================================
   选项页基础布局
   ============================================ */
.options-page-content {
  width: 100%;
  max-width: 480px;  /* 对齐聚焦页内容区 .tools-home-content */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* 账号信息卡片 */
.account-info-card {
  width: 100%;
  max-width: 400px;  /* 对齐聚焦页卡片 */
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, background 0.3s;
}

.account-info-card.hidden {
  display: none;
}

.account-info-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.account-info-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.account-info-icon i {
  font-size: 20px;
  color: var(--text);
}

.account-info-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.account-info-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-info-subtitle {
  font-size: 13px;
  color: var(--subtext);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-info-subtitle.logged-in {
  color: #4CAF50;
}

.account-info-subtitle.expired {
  color: #ff4757;
}

.account-info-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.account-info-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--text-light);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.account-info-btn:hover {
  background: var(--glass);
  transform: scale(1.05);
}

.account-info-btn:active {
  transform: scale(0.95);
}

.account-info-btn.login-btn {
  width: auto;
  padding: 0 16px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 500;
  gap: 6px;
}

/* 版本更新卡片（仅APP环境显示） */
.version-update-card {
  width: 100%;
  max-width: 400px;  /* 对齐聚焦页卡片 */
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: pointer;
}

.version-update-card.hidden {
  display: none;
}

.version-update-card.has-update {
  border-color: #6BA3FF;
  background: linear-gradient(135deg, rgba(107, 163, 255, 0.1) 0%, var(--glass) 100%);
}

.version-update-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.version-update-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.version-update-left i {
  font-size: 20px;
  color: var(--text);
  width: 24px;
  text-align: center;
}

.version-update-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.version-update-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.version-update-title.has-update {
  color: #6BA3FF;
}

.version-update-subtitle {
  font-size: 12px;
  color: var(--subtext);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.version-update-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.version-update-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--text-light);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.version-update-btn:hover {
  background: var(--glass);
  transform: scale(1.05);
}

.version-update-btn:active {
  transform: scale(0.95);
}

.version-update-btn.download-btn {
  background: #6BA3FF;
  border-color: #6BA3FF;
  color: white;
}

.version-update-btn.download-btn:hover {
  background: #5a90e8;
}

.version-update-changelog {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 12px;
}

.version-update-changelog.expanded {
  max-height: 300px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 12px;
}

.version-update-changelog-content {
  font-size: 13px;
  color: var(--subtext);
  line-height: 1.6;
  white-space: pre-wrap;
}

.version-update-changelog-content h1,
.version-update-changelog-content h2,
.version-update-changelog-content h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 8px 0 4px 0;
}

.version-update-changelog-content ul,
.version-update-changelog-content ol {
  margin: 4px 0;
  padding-left: 16px;
}

.version-update-changelog-content li {
  margin: 2px 0;
}

/* 快捷栏编辑和标记设置卡片 */
.options-shortcut-card {
  width: 100%;
  max-width: 400px;  /* 对齐聚焦页卡片 */
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

.options-shortcut-card:active {
  transform: scale(0.98);
}

.options-shortcut-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.options-shortcut-left i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.options-shortcut-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.options-shortcut-preview {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--text-light);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  pointer-events: none;
  border: 1px solid var(--border);
}

.options-shortcut-preview i {
  font-size: 12px;
}

/* 地图显示设置卡片（标记设置） */
.options-map-settings-card {
  width: 100%;
  max-width: 400px;  /* 对齐聚焦页卡片 */
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}

.options-map-settings-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.options-map-settings-header i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.options-map-settings-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  opacity: 0.6;
}

.options-map-settings-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.options-map-setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
}

.options-map-setting-label {
  font-size: 14px;
  color: var(--subtext);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.options-map-setting-label i {
  font-size: 14px;
  width: 18px;
  text-align: center;
  color: var(--text);
  opacity: 0.8;
}

/* ============================================
   标记设置 & 通知设置 开关按钮样式（修复）
   ============================================ */
.options-map-settings-card .store-map-toggle-btn,
.options-notification-settings-card .store-map-toggle-btn {
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  border: none;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  padding: 0;
  flex-shrink: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.options-map-settings-card .store-map-toggle-btn.active,
.options-notification-settings-card .store-map-toggle-btn.active {
  background: var(--text);
}

.options-map-settings-card .store-map-toggle-btn .toggle-thumb,
.options-notification-settings-card .store-map-toggle-btn .toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
  display: block;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.options-map-settings-card .store-map-toggle-btn.active .toggle-thumb,
.options-notification-settings-card .store-map-toggle-btn.active .toggle-thumb {
  transform: translateX(20px);
}

/* 快捷操作卡片 */
.options-actions-card {
  width: 100%;
  max-width: 400px;  /* 对齐聚焦页卡片 */
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.options-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  transition: transform 0.2s;
}

.options-action-item:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.options-action-item:active {
  transform: scale(0.98);
}

.options-action-item i {
  font-size: 18px;
  color: var(--text);
  width: 24px;
  text-align: center;
}

.options-action-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
}

.options-action-arrow {
  font-size: 14px;
  color: var(--subtext);
  opacity: 0.6;
}

/* 分享展开区域 */
.options-share-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  display: flex;
  flex-direction: column;   /* 纵向排列：文本在上，二维码在下 */
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.options-share-expand.expanded {
  max-height: 280px;        /* 适当增高以容纳文本 */
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* 新增：分享文本样式 */
.options-share-text {
  text-align: center;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.options-share-text p {
  margin: 0;
}

.options-share-text strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}

.options-share-qrcode {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  object-fit: contain;
}

/* 意见反馈展开区域 */
.options-feedback-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.options-feedback-expand.expanded {
  max-height: 200px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.feedback-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-label {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  min-width: 48px;
  flex-shrink: 0;
}

.feedback-value {
  font-size: 14px;
  color: var(--subtext);
  flex: 1;
  text-align: left;
  word-break: break-all;
}

.feedback-copy-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  flex-shrink: 0;
}

.feedback-copy-btn:hover {
  background: var(--text-light);
}

.feedback-copy-btn:active {
  transform: scale(0.95);
}

/* 关于页面样式 - 复用选项页内容样式 */
#about-page .options-page-content {
  width: 100%;
  max-width: 480px;  /* 对齐聚焦页内容区 */
}

/* 作者卡片 */
.about-author-card {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow);
}

.about-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-author-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-author-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.about-author-desc {
  font-size: 13px;
  color: var(--subtext);
  line-height: 1.5;
  word-break: break-word;
}

/* 鸣谢卡片 */
.about-thanks-card {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.about-thanks-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.about-thanks-header i {
  font-size: 18px;
  color: var(--text);
}

.about-thanks-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.about-thanks-sub {
  font-size: 11px;
  color: var(--subtext);
  opacity: 0.7;
  font-weight: 400;
  margin-left: 4px;
}

.about-thanks-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 12px;
  opacity: 0.6;
}

.about-thanks-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.about-thanks-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.about-thanks-item:last-child {
  border-bottom: none;
}

.about-thanks-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about-thanks-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.about-thanks-item-desc {
  font-size: 12px;
  color: var(--subtext);
  line-height: 1.4;
}

.about-thanks-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-thanks-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 统计卡片 —— 单列布局，每个卡片单行显示 */
.about-stats-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.about-stat-card {
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
}

.about-stat-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-stat-header i {
  font-size: 18px;
  color: var(--text);
  opacity: 0.8;
}

.about-stat-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.about-stat-platform {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--subtext);
}

.about-stat-platform span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.about-stat-progress {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
  display: flex;
}

.about-stat-progress-fill {
  height: 100%;
  background: var(--text);
  transition: width 0.5s ease;
  flex-shrink: 0;
}

.about-stat-progress-fill:first-child {
  border-radius: 2px 0 0 2px;
}

.about-stat-progress-fill:last-child {
  border-radius: 0 2px 2px 0;
}

/* APP 段：主文本色（正常） */
.about-stat-progress-fill.app {
  background: var(--text);
  opacity: 1;
}

/* IOS 段：比主文本色淡一点 */
.about-stat-progress-fill.ios {
  background: var(--text);
  opacity: 0.55;
}

/* WEB 段：更淡 */
.about-stat-progress-fill.web {
  background: var(--text);
  opacity: 0.25;
}

/* 备案信息 */
.options-beian {
  width: 100%;
  max-width: 400px;  /* 对齐聚焦页卡片 */
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 8px;
}

.options-beian a {
  color: var(--subtext);
  text-decoration: none;
  display: block;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  .account-info-icon {
    background: rgba(168, 224, 99, 0.15);
  }

  .account-info-btn {
    background: rgba(168, 224, 99, 0.15);
    border-color: rgba(255, 255, 255, 0.15);
  }

  .version-update-card.has-update {
    background: linear-gradient(135deg, rgba(107, 163, 255, 0.15) 0%, rgba(60, 60, 60, 0.4) 100%);
  }

  .version-update-changelog.expanded {
    background: rgba(255, 255, 255, 0.05);
  }

  .options-shortcut-preview {
    background: rgba(168, 224, 99, 0.15);
    border-color: rgba(255, 255, 255, 0.15);
  }

  .about-stat-progress {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* 通知设置卡片 */
.options-notification-settings-card {
  width: 100%;
  max-width: 400px;
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}

.options-notification-settings-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.options-notification-settings-header i {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.options-notification-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.options-notification-title-wrap > span:first-child {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.options-notification-subtitle {
  font-size: 11px;
  color: var(--subtext);
  opacity: 0.7;
  font-weight: 400;
}

/* 暗色模式适配 */
@media (prefers-color-scheme: dark) {
  .options-notification-subtitle {
    opacity: 0.6;
  }
}

/* 响应式适配 */
@media (max-width: 380px) {
  .options-page-content {
    padding: 12px;
  }

  .account-info-card,
  .version-update-card,
  .options-shortcut-card,
  .options-map-settings-card,
  .options-actions-card,
  .about-author-card,
  .about-thanks-card,
  .about-stat-card {
    padding: 12px 14px;
  }
}

/* 功能使用统计 */
.about-feature-stats-card {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
}

.about-feature-stats-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.about-feature-stats-header i {
  font-size: 18px;
  color: var(--text);
}

.about-feature-stats-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about-feature-stats-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.about-feature-stats-sub {
  font-size: 11px;
  color: var(--subtext);
  opacity: 0.7;
  font-weight: 400;
}

.about-feature-stats-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  opacity: 0.6;
}

.about-feature-stats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-feature-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.about-feature-stat-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.about-feature-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.about-feature-stat-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.about-feature-stat-icon i {
  font-size: 16px;
  color: var(--text);
}

.about-feature-stat-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.about-feature-stat-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  max-width: 120px;
}

.about-feature-stat-bar {
  height: 100%;
  background: var(--text);
  border-radius: 3px;
  transition: width 0.5s ease;
  opacity: 0.8;
}

.about-feature-stat-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (prefers-color-scheme: dark) {
  .about-feature-stat-bar {
    opacity: 0.9;
  }
}
