/* ========== 全局 ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f5f7fa;
  color: #2c3e50;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: #409eff; text-decoration: none; }
a:hover { color: #66b1ff; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* ========== 头部 ========== */
.site-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 18px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.site-title { font-size: 22px; font-weight: 600; }
.header-nav { display: flex; gap: 16px; }
.header-nav .nav-link {
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  transition: background .2s;
}
.header-nav .nav-link:hover { background: rgba(255,255,255,.2); }

/* ========== 按钮 ========== */
.btn {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all .2s;
  background: #fff;
  color: #2c3e50;
  line-height: 1.4;
}
.btn:hover { opacity: .85; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: #409eff; color: #fff; border-color: #409eff; }
.btn-primary:hover { background: #66b1ff; border-color: #66b1ff; }
.btn-success { background: #67c23a; color: #fff; border-color: #67c23a; }
.btn-warning { background: #e6a23c; color: #fff; border-color: #e6a23c; }
.btn-danger { background: #f56c6c; color: #fff; border-color: #f56c6c; }
.btn-ghost { background: transparent; border-color: #dcdfe6; color: #606266; }
.btn-ghost:hover { color: #409eff; border-color: #409eff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ========== 主体 ========== */
.main-content { padding: 24px 20px 60px; }

.search-bar {
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.search-input {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
  font-family: inherit;
}
.search-input:focus { border-color: #409eff; }

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
}

/* ========== 侧栏 ========== */
.sidebar {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  height: fit-content;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  position: sticky;
  top: 90px;
}
.sidebar-title {
  font-size: 14px;
  color: #909399;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ebeef5;
  font-weight: 600;
}
.category-list { list-style: none; }
.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 2px;
}
.category-item:hover { background: #f5f7fa; }
.category-item.active { background: #409eff; color: #fff; }
.category-item.active .category-count { color: #fff; background: rgba(255,255,255,.3); }
.category-name { font-size: 14px; }
.category-count {
  font-size: 12px;
  color: #909399;
  background: #f0f2f5;
  padding: 1px 8px;
  border-radius: 10px;
}

/* ========== 文章列表（首页只显示标题） ========== */
.content-area { min-width: 0; }
.content-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.result-info { color: #909399; font-size: 13px; }

.article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.article-card {
  background: #fff;
  border-radius: 8px;
  padding: 18px 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: all .2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-left: 4px solid transparent;
}
.article-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  border-left-color: #409eff;
  transform: translateX(2px);
}
.article-card-main { flex: 1; min-width: 0; }
.article-card-title {
  font-size: 17px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.article-card-title .article-count-badge {
  font-size: 11px;
  color: #909399;
  background: #f0f2f5;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: normal;
}

/* 类型标签（文章/刷机包） */
.type-badge {
  display: inline-block;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 3px;
  font-weight: 500;
  margin-right: 6px;
  vertical-align: middle;
}
.type-badge.type-article {
  background: #ecf5ff;
  color: #409eff;
  border: 1px solid #d9ecff;
}
.type-badge.type-download {
  background: #f0f9eb;
  color: #67c23a;
  border: 1px solid #e1f3d8;
}
.dl-meta {
  color: #67c23a;
  font-size: 12px;
}

/* 详情页类型标签 */
.detail-type-badge { margin-bottom: 8px; }

/* 刷机包信息表 */
.dl-info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.dl-info-table th {
  text-align: left;
  width: 120px;
  padding: 8px 12px;
  color: #909399;
  background: #fafafa;
  border-bottom: 1px solid #ebeef5;
  font-weight: 500;
}
.dl-info-table td {
  padding: 8px 12px;
  color: #303133;
  border-bottom: 1px solid #ebeef5;
}

/* 下载区域 */
.dl-download-area {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #ebeef5;
}
.dl-download-info {
  margin-top: 16px;
  padding: 16px 20px;
  background: #f5f7fa;
  border-radius: 8px;
  border: 1px solid #ebeef5;
  text-align: center;
}
.dl-download-info-title {
  font-size: 13px;
  color: #909399;
  margin-bottom: 8px;
}
.dl-download-link {
  display: inline-block;
  font-size: 14px;
  color: #409eff;
  word-break: break-all;
  padding: 6px 14px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid #d9ecff;
  max-width: 100%;
}
.dl-download-link:hover { background: #ecf5ff; }
.btn-lg {
  padding: 12px 32px;
  font-size: 15px;
}
.article-card-summary {
  color: #606266;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.article-card-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: #909399;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tag {
  background: #ecf5ff;
  color: #409eff;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
.article-card-arrow { color: #c0c4cc; font-size: 18px; }

.loading, .empty {
  text-align: center;
  padding: 60px 20px;
  color: #909399;
  background: #fff;
  border-radius: 8px;
}

/* ========== 分页 ========== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #dcdfe6;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all .2s;
}
.page-btn:hover:not(:disabled):not(.active) { color: #409eff; border-color: #409eff; }
.page-btn.active { background: #409eff; color: #fff; border-color: #409eff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-ellipsis { line-height: 34px; color: #909399; }

/* ========== 文章详情页 ========== */
.article-detail-page { max-width: 880px; }
.article-detail {
  background: #fff;
  border-radius: 8px;
  padding: 36px 40px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.article-detail-title {
  font-size: 26px;
  font-weight: 700;
  color: #303133;
  margin-bottom: 14px;
  line-height: 1.4;
}
.article-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #909399;
  font-size: 13px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid #ebeef5;
}
.article-detail-content {
  font-size: 15px;
  line-height: 1.85;
  color: #303133;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 30px;
}
/* 富文本正文中的元素样式 */
.article-detail-content h2 { font-size: 20px; font-weight: 600; margin: 18px 0 10px; }
.article-detail-content h3 { font-size: 17px; font-weight: 600; margin: 14px 0 8px; }
.article-detail-content p { margin: 8px 0; }
.article-detail-content blockquote {
  border-left: 4px solid #409eff;
  padding: 8px 14px;
  margin: 12px 0;
  background: #f5f7fa;
  color: #606266;
  border-radius: 0 4px 4px 0;
}
.article-detail-content ul, .article-detail-content ol { padding-left: 24px; margin: 8px 0; }
.article-detail-content a { color: #409eff; }
.article-detail-content img { max-width: 100%; border-radius: 6px; }
.article-detail-content video {
  display: block;
  max-width: 100%;
  margin: 12px auto;
  border-radius: 8px;
  background: #000;
}

/* 编辑器中视频块样式（可选中删除） */
.video-block {
  position: relative;
  display: block;
  margin: 12px 0;
  padding: 4px;
  border: 2px dashed transparent;
  border-radius: 8px;
  transition: border-color .2s;
}
.video-block:hover { border-color: #c0c4cc; }
.video-block:empty { display: none; }
.video-block video {
  display: block;
  max-width: 100%;
  border-radius: 6px;
}
.video-del-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(245, 108, 108, .9);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.video-del-btn:hover { background: #f56c6c; }
/* 视频块上移/下移按钮 */
.video-move-btn {
  position: absolute;
  top: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(64, 158, 255, .85);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, opacity .2s;
}
.video-move-btn:hover { background: #409eff; }
.video-move-btn:disabled {
  background: #c0c4cc;
  cursor: not-allowed;
  opacity: .6;
}
.video-move-up { right: 72px; }
.video-move-down { right: 40px; }
.video-caption {
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px dashed #c0c4cc;
  border-radius: 6px;
  font-size: 13px;
  color: #606266;
  min-height: 20px;
  outline: none;
  cursor: text;
  background: #fafafa;
  transition: border-color .2s;
}
.video-caption:focus { border-color: #409eff; background: #fff; }
.video-caption:empty::before {
  content: attr(data-placeholder);
  color: #c0c4cc;
}
/* 前台详情页视频标题 */
.article-detail-content .video-caption {
  border-style: solid;
  border-color: #ebeef5;
  background: #f5f7fa;
  text-align: center;
  font-weight: 500;
  color: #303133;
}

/* 视频按钮特殊样式 */
.rt-video-btn {
  font-size: 12px !important;
  color: #e6a23c !important;
  border-color: #f5dab1 !important;
  background: #fdf6ec !important;
}
.rt-video-btn:hover {
  background: #faecd8 !important;
  border-color: #e6a23c !important;
  color: #cf9236 !important;
}
.article-detail-images-title {
  font-size: 16px;
  font-weight: 600;
  color: #303133;
  margin: 28px 0 14px;
  padding-top: 18px;
  border-top: 1px dashed #ebeef5;
}
.article-detail-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.article-image-item {
  background: #f5f7fa;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s;
}
.article-image-item:hover { transform: translateY(-2px); }
.article-image-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: #fff;
}
.article-image-caption {
  padding: 8px 12px;
  font-size: 12px;
  color: #606266;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.article-nav { margin-top: 24px; text-align: center; }

/* ========== Lightbox ========== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.9); }
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  background: #000;
  display: block;
}
.lightbox-info {
  margin-top: 12px;
  text-align: center;
  color: #fff;
}
.lightbox-info p { font-size: 14px; margin-bottom: 8px; }
.lightbox-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 22px;
  border-radius: 50%;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }

/* ========== Footer ========== */
.site-footer {
  background: #2c3e50;
  color: #b0b8c4;
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  margin-top: 40px;
  border-top: 3px solid #3d5775;
}
.site-footer .footer-copyright {
  margin-bottom: 8px;
  color: #8a94a6;
  font-size: 13px;
}
.site-footer .footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  line-height: 1.8;
}
.site-footer .footer-link {
  color: #b0b8c4;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
}
.site-footer .footer-link:not(:last-child)::after {
  content: '·';
  margin-left: 14px;
  color: #5a6577;
}
.site-footer .footer-link:hover {
  color: #4fc3f7;
}
.site-footer p { margin: 4px 0; }

/* 手机端 footer 优化 */
@media (max-width: 768px) {
  .site-footer {
    padding: 20px 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    margin-top: 30px;
  }
  .site-footer .footer-copyright {
    font-size: 12px;
    margin-bottom: 10px;
  }
  .site-footer .footer-links {
    flex-direction: column;
    gap: 8px;
  }
  .site-footer .footer-link {
    font-size: 12px;
  }
  .site-footer .footer-link:not(:last-child)::after {
    content: '';
    margin-left: 0;
  }
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translate(-50%, -10px);
  background: #2c3e50;
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  z-index: 2000;
  opacity: 0;
  transition: all .25s;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-success { background: #67c23a; }
.toast-error { background: #f56c6c; }
.toast-warning { background: #e6a23c; }

/* ========== 免责声明（折叠式） ========== */
.dl-disclaimer {
  margin: 20px 0 8px;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  background: #fafbfc;
  overflow: hidden;
}
.dl-disclaimer-summary {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #e6a23c;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dl-disclaimer-summary::-webkit-details-marker { display: none; }
.dl-disclaimer-summary::before {
  content: '▶';
  font-size: 10px;
  transition: transform .2s;
}
.dl-disclaimer[open] .dl-disclaimer-summary::before {
  transform: rotate(90deg);
}
.dl-disclaimer-summary:hover { background: #f5f7fa; }
.dl-disclaimer-content {
  padding: 4px 18px 16px;
  border-top: 1px dashed #ebeef5;
}
.dl-disclaimer-list {
  margin: 10px 0 0;
  padding-left: 22px;
  color: #606266;
  font-size: 13px;
  line-height: 1.75;
}
.dl-disclaimer-list li {
  margin-bottom: 8px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .search-bar { flex-wrap: wrap; }
  .article-card { flex-direction: column; align-items: flex-start; }
  .article-card-meta { justify-content: flex-start; }
  .article-detail { padding: 20px; }
  .article-detail-title { font-size: 20px; }
}

/* ========== 评论区 ========== */
.comment-section {
  margin-top: 28px;
  background: #fff;
  border-radius: 8px;
  padding: 28px 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.comment-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ebeef5;
  display: flex;
  align-items: center;
  gap: 8px;
}
.comment-count-badge {
  font-size: 12px;
  color: #909399;
  background: #f0f2f5;
  padding: 1px 10px;
  border-radius: 10px;
  font-weight: normal;
}

/* 评论表单 */
.comment-form-wrap { margin-bottom: 24px; }
.comment-form-row { margin-bottom: 12px; position: relative; }
.comment-nickname { max-width: 240px; }
.comment-input-wrap { position: relative; }
.comment-textarea {
  width: 100%;
  padding: 10px 44px 10px 12px;
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  border-radius: 6px;
}
.comment-emoji-btn {
  position: absolute;
  right: 6px;
  bottom: 6px;
  font-size: 18px;
  padding: 2px 8px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  z-index: 2;
}
.comment-emoji-btn:hover { background: #f5f7fa; }
.comment-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.comment-tip { font-size: 12px; color: #909399; }
.comment-tip-success { color: #67c23a; }

/* 表情选择器 */
.emoji-picker {
  position: absolute;
  bottom: 42px;
  right: 0;
  width: 320px;
  max-height: 200px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
  gap: 2px;
}
.emoji-item {
  font-size: 20px;
  text-align: center;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background .15s;
  user-select: none;
}
.emoji-item:hover { background: #f0f2f5; }

/* 评论列表 */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.comment-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #409eff, #667eea);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.comment-nickname { font-weight: 500; color: #303133; font-size: 13px; }
.comment-date { color: #c0c4cc; font-size: 12px; }
.comment-text {
  color: #606266;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

/* ========== 用户认证页 ========== */
.auth-page { max-width: 440px; margin: 40px auto; }
.auth-form {
  background: #fff;
  padding: 32px 28px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
.auth-title { font-size: 22px; margin-bottom: 12px; text-align: center; font-weight: 600; color: #303133; }
.auth-tip {
  font-size: 13px;
  color: #909399;
  margin-bottom: 20px;
  text-align: center;
  background: #f4f4f5;
  padding: 8px;
  border-radius: 4px;
}
.auth-link { text-align: center; margin-top: 18px; font-size: 13px; color: #909399; }
.auth-link a { color: #409eff; }
.form-row-checkbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 16px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: #606266;
}
.checkbox-label input[type=checkbox] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #409eff;
}
.checkbox-tip {
  font-size: 12px;
  color: #c0c4cc;
}
.user-badge { color: #67c23a !important; font-weight: 500; }
.user-points-badge {
  color: #e6a23c !important;
  font-weight: 600;
  background: #fdf6ec;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.user-coins-badge {
  color: #b88230 !important;
  font-weight: 600;
  background: #fef0d8;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.tag-coin {
  background: #fef0d8;
  color: #b88230;
  font-weight: 600;
}

/* ===== 金币中心 ===== */
.coin-center {
  max-width: 880px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.coin-overview-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: linear-gradient(135deg, #fdf6ec 0%, #fef9f3 100%);
  border: 1px solid #f5dab1;
  border-radius: 8px;
  padding: 18px;
}
.coin-overview-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  padding: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: 6px;
}
.coin-overview-label {
  font-size: 12px;
  color: #909399;
}
.coin-overview-value {
  font-size: 22px;
  font-weight: 700;
  color: #b88230;
}
.coin-overview-amount {
  color: #f56c6c;
}
.coin-rules-card, .coin-card {
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 8px;
  padding: 18px;
}
.coin-rules-list {
  margin: 8px 0 0;
  padding-left: 20px;
  color: #606266;
  font-size: 14px;
  line-height: 1.9;
}
.alipay-upload-area {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.alipay-preview {
  width: 160px;
  height: 160px;
  border: 1px dashed #dcdfe6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fafafa;
}
.alipay-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.alipay-empty {
  color: #c0c4cc;
  font-size: 13px;
}
.alipay-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alipay-tip {
  font-size: 12px;
  color: #909399;
}
.withdraw-form {
  max-width: 480px;
}
.withdraw-tip {
  font-size: 12px;
  color: #909399;
  margin-top: 8px;
  line-height: 1.6;
}
.withdraw-log-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.withdraw-log-item {
  background: #fafafa;
  border: 1px solid #ebeef5;
  border-radius: 6px;
  padding: 12px 14px;
}
.withdraw-log-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.withdraw-log-date {
  color: #909399;
  font-size: 12px;
  margin-left: auto;
}
.withdraw-log-remark {
  margin-top: 6px;
  color: #606266;
  font-size: 13px;
}
.withdraw-log-reviewed {
  margin-top: 2px;
  color: #909399;
  font-size: 12px;
}

/* ===== 后台提现审核列表 ===== */
.admin-withdraw-qr {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.withdraw-qr-label {
  font-size: 13px;
  color: #606266;
}
.withdraw-qr-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid #ebeef5;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s;
}
.withdraw-qr-thumb:hover {
  transform: scale(1.05);
  border-color: #f56c6c;
}

@media (max-width: 768px) {
  .coin-overview-card {
    grid-template-columns: repeat(2, 1fr);
  }
}
.hidden { display: none !important; }

/* ========== 手机端全面优化（iPhone Safari 适配） ========== */
@media (max-width: 768px) {
  /* --- 全局优化 --- */
  html, body {
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    font-size: 14px;
  }
  * {
    -webkit-touch-callout: none;
  }
  /* input/textarea/select 字号 >= 16px 防止 iOS Safari 自动放大 */
  input, textarea, select {
    font-size: 16px !important;
  }
  /* 让所有滚动区域顺滑（iOS Safari） */
  .article-list, .comment-list, .tab-nav, .header-nav, .search-bar,
  .coin-center, .withdraw-log-list, .pagination {
    -webkit-overflow-scrolling: touch;
  }

  /* --- 容器与外边距 --- */
  .container {
    padding: 0 12px;
  }
  .main-content {
    padding: 12px 12px calc(80px + env(safe-area-inset-bottom));
  }

  /* --- 头部导航 --- */
  .site-header {
    padding: 10px 0;
    padding-top: calc(10px + env(safe-area-inset-top));
    position: sticky;
    top: 0;
  }
  .site-title {
    font-size: 17px;
    flex-shrink: 0;
  }
  .header-inner {
    gap: 8px;
  }
  .header-nav {
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .header-nav::-webkit-scrollbar {
    display: none;
  }
  .header-nav .nav-link {
    padding: 6px 8px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .user-badge, .user-points-badge, .user-coins-badge {
    font-size: 11px !important;
    padding: 2px 6px !important;
  }

  /* --- 搜索栏 --- */
  .search-bar {
    padding: 10px;
    gap: 6px;
    flex-wrap: wrap;
  }
  .search-input {
    padding: 10px 12px;
    min-width: 0;
  }
  .search-bar .btn {
    padding: 10px 14px;
    flex-shrink: 0;
  }

  /* --- 首页布局：侧栏移到顶部，单列 --- */
  .layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .sidebar {
    position: static;
    padding: 12px;
  }
  .sidebar-title {
    margin-bottom: 8px;
    padding-bottom: 6px;
  }
  /* 分类标签：等宽网格排列，每行4个，整齐对齐 */
  .category-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .category-item {
    padding: 7px 2px;
    margin-bottom: 0;
    justify-content: center;
    gap: 3px;
    border-radius: 4px;
    min-width: 0;
  }
  .category-name {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    text-align: center;
  }
  .category-count {
    font-size: 10px;
    padding: 0 5px;
    min-width: 16px;
    text-align: center;
  }

  /* --- 内容工具栏 --- */
  .content-toolbar {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
  }
  .result-info {
    font-size: 12px;
  }

  /* --- 文章列表卡片 --- */
  .article-list {
    gap: 8px;
  }
  .article-card {
    padding: 12px 14px;
    gap: 10px;
    flex-direction: column;
    align-items: stretch;
  }
  .article-card-main {
    width: 100%;
  }
  .article-card-title {
    font-size: 15px;
    line-height: 1.5;
  }
  .article-card-meta {
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    font-size: 12px;
  }
  .article-card-meta .tag {
    font-size: 11px;
    padding: 1px 6px;
  }

  /* --- 标签按钮通用 --- */
  .tag {
    font-size: 11px;
    padding: 1px 6px;
  }

  /* --- 分页按钮（增大触摸区域） --- */
  .pagination {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
  }
  .page-btn {
    min-width: 40px;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 14px;
  }

  /* --- 普通按钮（增大触摸区域） --- */
  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  .btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 32px;
  }

  /* --- 文章详情页 --- */
  .article-detail-page {
    max-width: 100%;
  }
  .article-detail {
    padding: 18px 14px;
    border-radius: 6px;
  }
  .article-detail-title {
    font-size: 19px;
    line-height: 1.4;
    margin-bottom: 10px;
  }
  .article-detail-meta {
    gap: 10px;
    font-size: 12px;
    padding-bottom: 12px;
    margin-bottom: 16px;
  }
  .article-detail-content {
    font-size: 15px;
    line-height: 1.75;
  }
  .article-detail-content h2 { font-size: 18px; }
  .article-detail-content h3 { font-size: 16px; }
  .article-detail-content img {
    border-radius: 4px;
  }
  .article-detail-content video {
    border-radius: 6px;
  }
  .article-detail-content blockquote {
    padding: 6px 10px;
    margin: 10px 0;
  }
  .article-detail-content ul, .article-detail-content ol {
    padding-left: 20px;
  }

  /* --- 评论区 --- */
  .comment-section {
    padding: 16px 14px;
    margin-top: 16px;
    border-radius: 6px;
  }
  .comment-section-title {
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
  .comment-form-row {
    margin-bottom: 8px;
  }
  .comment-nickname {
    max-width: 100%;
  }
  .comment-textarea {
    min-height: 70px;
    padding: 10px 12px;
  }
  .comment-submit-btn {
    width: 100%;
    padding: 10px;
  }
  .comment-list {
    gap: 10px;
  }
  .comment-item {
    padding: 10px 12px;
    gap: 8px;
  }
  .comment-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .comment-nickname-text {
    font-size: 13px;
  }
  .comment-content {
    font-size: 14px;
    line-height: 1.6;
  }
  .comment-meta {
    font-size: 11px;
  }

  /* --- 视频块按钮（增大触摸区域） --- */
  .video-del-btn,
  .video-move-btn {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  .video-move-up { right: 76px; }
  .video-move-down { right: 42px; }

  /* --- 登录/注册页 --- */
  .auth-page {
    max-width: 100%;
    margin: 16px auto;
    padding: 0 4px;
  }
  .auth-form {
    padding: 20px 18px;
    border-radius: 8px;
  }
  .auth-title {
    font-size: 20px;
  }
  .form-row {
    margin-bottom: 14px;
  }
  .form-label {
    font-size: 14px;
    margin-bottom: 6px;
  }
  .form-row-checkbox {
    margin: 0 0 16px;
  }

  /* --- 提示信息 --- */
  .loading, .empty {
    padding: 24px 12px;
    font-size: 13px;
    text-align: center;
    color: #909399;
  }

  /* --- toast 提示 --- */
  .toast {
    max-width: 90vw !important;
    font-size: 13px;
    padding: 10px 14px;
    left: 50% !important;
    transform: translateX(-50%);
    word-break: break-word;
  }

  /* --- 首页底部固定操作栏（如果有） --- */
  .fab-btn {
    width: 48px;
    height: 48px;
    bottom: calc(20px + env(safe-area-inset-bottom));
  }

  /* --- 表格响应式（如有） --- */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* --- 图片自适应 --- */
  img {
    max-width: 100%;
    height: auto;
  }
}

/* iPhone 横屏与小屏手机（< 375px）额外优化 */
@media (max-width: 374px) {
  .container { padding: 0 8px; }
  .article-detail-title { font-size: 17px; }
  .site-title { font-size: 15px; }
  .article-card { padding: 10px 12px; }
  .article-card-title { font-size: 14px; }
  .btn { padding: 8px 12px; font-size: 13px; }
  .header-nav .nav-link { padding: 4px 6px; font-size: 12px; }
  .coin-overview-card { grid-template-columns: 1fr; }
  .coin-overview-value { font-size: 18px; }
}

/* iPhone 横屏（高度小）优化 */
@media (max-width: 768px) and (max-height: 480px) and (orientation: landscape) {
  .site-header { padding: 6px 0; padding-top: calc(6px + env(safe-area-inset-top)); }
  .auth-page { margin: 8px auto; }
  .auth-form { padding: 14px 16px; }
  .auth-title { font-size: 18px; margin-bottom: 6px; }
  .auth-tip { margin-bottom: 12px; padding: 6px; }
}
