/* ===== Mikufans 移动端适配（保持原有风格） ===== */
/* 仅做宽度适配和功能添加，不改变原有视觉风格 */

/* ---------- 修复登录区域空白问题 ---------- */
.usercenter { position: relative; z-index: 10; }
.usercenter .tbox { overflow: visible !important; }
.usercenter .tbox dd { overflow: visible !important; height: auto !important; }
.usercenter .tbox dd#loading { display: none !important; }
.usercenter .tbox dd#uc_digg { display: none !important; }
.usercenter .tbox dd#uc_comment { display: none !important; }
.usercenter .tbox dd#uc_member { display: block !important; padding: 5px !important; }

/* 登录表单 */
.userlogin { width: 100% !important; float: none !important; padding: 0 !important; }
.userlogin .fb { display: block !important; margin: 4px 0 !important; padding: 0 !important; height: auto !important; }
.userlogin .fb span { display: inline-block; width: 55px; font-size: 12px; }
.userlogin .fb input { width: 140px; font-size: 12px; }
.userlogin .submit { margin-top: 6px !important; padding: 0 !important; text-align: left !important; }

/* 最近登录会员 */
.latestlogin { padding-top: 8px !important; margin: 0 !important; }
.latestlogin strong { font-size: 12px; color: #666; margin-bottom: 5px; display: block; }
.latestlogin ul { width: 100% !important; border-top: none !important; padding-top: 5px !important; margin: 0 !important; }
.latestlogin ul li { display: inline-block; width: auto; margin: 2px; }
.latestlogin ul li a { display: block; text-align: center; font-size: 11px; }
.latestlogin ul li img { width: 32px; height: 32px; display: block; margin: 0 auto 2px; }

/* ---------- 底部导航栏（新增功能，风格贴近原站） ---------- */
.mkf-tabbar {
  display: none;
}
@media (max-width: 768px) {
  .mkf-tabbar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: #fff;
    border-top: 2px solid #5c8a3e;
    z-index: 9999;
  }
  .mkf-tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    font-size: 11px;
    gap: 2px;
  }
  .mkf-tabbar a.active { color: #5c8a3e; font-weight: bold; }
  .mkf-tabbar a svg { width: 20px; height: 20px; }
  .mkf-tabbar a span { line-height: 1; }
  body { padding-bottom: 50px; }
}

/* ---------- 移动端宽度适配（保持原布局，仅缩放） ---------- */
@media (max-width: 768px) {
  .w960 { width: 100%; }
  .center { margin: 0 auto; }

  /* 顶部 */
  .header .top { text-align: center; }
  .header .title { float: none; margin: 0 auto; display: inline-block; }
  .header .title h1 a { width: 180px; height: 54px; background-size: contain; background-position: center; }
  .header .rlink { display: none; }
  .header .banner { display: none; }

  /* 导航：横向滚动 */
  .header .nav { height: auto; overflow-x: auto; overflow-y: hidden; }
  .header .nav ul { height: auto; white-space: nowrap; padding: 0; }
  .header .nav ul li { float: none; display: inline-block; margin: 0; }
  .header .nav ul li a { padding: 6px 12px; height: auto; float: none; display: inline-block; white-space: nowrap; }

  /* 搜索栏 */
  .header .search .tags { display: none; }
  .header .search .form { float: none; text-align: center; padding: 6px 0; }
  .header .search .form input.search-keyword { width: 140px; font-size: 13px; }
  .header .search .form select.search-option { display: none; }

  /* 左右栏合并 */
  .pleft, .pright { width: 100%; float: none; }
  .pright { margin-top: 10px; }

  /* 首页缩略图：2列，保持原有样式 */
  .picnews ul.e1 li { width: 50%; }
  .picnews ul.e1 li a img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }

  /* 焦点轮播 */
  .mkf-featured { height: 170px; }

  /* 分类页 */
  .mkf-catlist li { width: 48%; margin: 0 1% 12px 1%; }

  /* 详情页 */
  .viewbox, .content { width: 100%; }
  .mkf-player { max-width: 100%; }
  h2 { padding: 0 8px; }
  .mkf-meta { padding: 0 8px; }
  .mkf-tip { padding: 0 8px; }
  .intro { padding: 0 8px; }

  /* 右侧栏最近更新 */
  .e2 li a.preview { width: 90px; }
  .e2 li a.preview img { width: 90px; height: 68px; }

  /* 底部 */
  .footer { height: auto; padding: 10px 0; text-align: center; }
}

@media (max-width: 380px) {
  .picnews ul.e1 li { width: 100%; }
  .picnews ul.e1 li a img { aspect-ratio: 16/9; }
  .mkf-catlist li { width: 100%; margin: 0 0 12px; }
  .mkf-featured { height: 150px; }
}

/* ---------- "我的"页面（保持原站绿色风格） ---------- */
.mkf-my-page {
  max-width: 960px;
  margin: 0 auto;
}
.mkf-my-header {
  background: #5c8a3e;
  color: #fff;
  padding: 20px;
  text-align: center;
}
.mkf-my-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #8ab66b;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 2px solid #fff;
}
.mkf-my-name {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 4px;
}
.mkf-my-desc {
  font-size: 13px;
  opacity: .9;
}
.mkf-my-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 16px;
}
.mkf-my-stats .stat { text-align: center; }
.mkf-my-stats .num { font-size: 20px; font-weight: bold; }
.mkf-my-stats .label { font-size: 12px; }

.mkf-my-section {
  border: 1px solid #cfe2b5;
  margin: 10px;
}
.mkf-my-section h3 {
  background: linear-gradient(to right, #5c8a3e, #8ab66b);
  color: #fff;
  padding: 6px 12px;
  font-size: 14px;
  margin: 0;
}
.mkf-my-section h3 small { float: right; }
.mkf-my-section h3 small a { color: #fff; text-decoration: none; font-weight: normal; font-size: 12px; }

.mkf-my-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mkf-my-list li {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
}
.mkf-my-list li:last-child { border-bottom: none; }
.mkf-my-list .thumb {
  width: 60px;
  height: 45px;
  object-fit: cover;
  margin-right: 10px;
  flex-shrink: 0;
  border: 1px solid #ddd;
}
.mkf-my-list .info { flex: 1; min-width: 0; }
.mkf-my-list .title {
  font-size: 13px;
  color: #333;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.mkf-my-list .meta { font-size: 11px; color: #999; margin-top: 2px; }
.mkf-my-list .del {
  color: #999;
  font-size: 20px;
  padding: 0 6px;
  cursor: pointer;
  text-decoration: none;
}
.mkf-my-empty {
  text-align: center;
  color: #999;
  font-size: 13px;
  padding: 20px 0;
}

.mkf-my-menu { list-style: none; padding: 0; margin: 0; }
.mkf-my-menu li {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}
.mkf-my-menu li:last-child { border-bottom: none; }
.mkf-my-menu .icon {
  width: 28px;
  text-align: center;
  margin-right: 12px;
  font-size: 16px;
}
.mkf-my-menu .text { flex: 1; font-size: 14px; color: #333; }
.mkf-my-menu .arrow { color: #ccc; font-size: 18px; }

/* 收藏按钮 - 使用原站 btn-1 风格 */
.mkf-fav-btn {
  display: inline-block;
  padding: 4px 14px;
  background: #5c8a3e;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
  margin: 8px 0;
}
.mkf-fav-btn.active { background: #8ab66b; }
.mkf-fav-btn:active { opacity: .8; }

/* Toast */
.mkf-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.75);
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
  z-index: 10000;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.mkf-toast.show { opacity: 1; }

@media (max-width: 768px) {
  .mkf-my-header { padding: 16px; }
  .mkf-my-stats { gap: 30px; }
}
