* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
html, body {
    height: 100%;
    overflow-x: hidden;
    background: #f6f7f9;
    font-size: 15px;
}
.main-page {
    height: 100%;
    overflow-y: auto;
    padding-bottom: 70px;
}
.sub-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f6f7f9;
    z-index: 20;
    display: none;
    overflow-y: auto;
    padding-bottom: 80px;
}
.sub-page.show {
    display: block;
}
.hide-page {
    display: none !important;
}

.nav-bar {
    height: 44px;
    background: #007aff;
    display: flex;
    align-items: center;
    color: #fff;
    padding: 0 15px;
    position: sticky;
    top: 0;
    z-index: 21;
}
.nav-back {
    font-size: 16px;
    width: 40px;
    cursor: pointer;
}
.nav-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
}

.notice-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px 10px;
}
.notice-head .title {
    font-size: 18px;
    font-weight: bold;
}
.notice-head .more {
    font-size: 14px;
    color: #007aff;
    cursor: pointer;
}
.notice-card {
    margin: 0 15px 15px;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
}
.notice-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}
.notice-item:last-child {
    border: none;
}
.tag {
    background: #e8f2ff;
    color: #007aff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 10px;
}

.cate-tab {
    display: flex;
    background: #fff;
    margin: 0 15px 15px;
    border-radius: 10px;
    overflow: hidden;
}
.cate-tab .tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
}
.cate-tab .tab.active {
    background: #007aff;
    color: #fff;
}

.article-list {
    padding: 0 15px;
}
.article-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.article-img {
    width: 80px;
    height: 80px;
    background: #eee;
    border-radius: 8px;
    flex-shrink: 0;
}
.article-info {
    flex: 1;
    margin-left: 12px;
}
.article-title {
    font-size: 16px;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.article-desc {
    font-size: 13px;
    color: #999;
}

.service-tab {
    display: flex;
    background: #fff;
    margin: 15px;
    border-radius: 10px;
    overflow: hidden;
}
.service-tab .tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
}
.service-tab .tab.active {
    background: #007aff;
    color: #fff;
}

.service-grid {
    display: flex;
    flex-wrap: wrap;
    padding: 0 10px;
}
.service-item {
    width: 33.333%;
    text-align: center;
    padding: 15px 0;
    cursor: pointer;
    flex-shrink: 0;
}
.service-icon {
    width: 60px;
    height: 60px;
    background: #e8f2ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 8px;
}
.service-name {
    color: #333;
    font-size: 14px;
}

.user-card {
    background: linear-gradient(135deg, #007aff, #0095ff);
    padding: 40px 20px 30px;
    color: #fff;
    display: flex;
    align-items: center;
}
.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}
.user-info {
    margin-left: 15px;
}
.nickname {
    font-size: 20px;
    margin-bottom: 6px;
}
.uid {
    font-size: 14px;
    opacity: 0.9;
}
.menu-list {
    margin: 15px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}
.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 15px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}
.menu-item:last-child {
    border: none;
}
.menu-item .right {
    color: #ccc;
}

.footer-tab {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    display: flex;
    border-top: 1px solid #eee;
    z-index: 10;
}
.footer-tab .tab {
    flex: 1;
    text-align: center;
    padding-top: 8px;
    color: #666;
    cursor: pointer;
    font-size: 12px;
}
.footer-tab .tab.active {
    color: #007aff !important;
}
.footer-tab .icon {
    font-size: 22px;
    display: block;
    margin-bottom: 4px;
}

.float-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 56px;
    height: 56px;
    background: #007aff;
    border-radius: 50%;
    color: #fff;
    font-size: 32px;
    text-align: center;
    line-height: 56px;
    box-shadow: 0 4px 12px rgba(0,122,255,0.4);
    z-index: 15;
    cursor: pointer;
    display: none;
}

.detail-content {
    padding: 15px;
}
.detail-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}
.detail-text {
    line-height: 1.8;
    color: #555;
}
/* ✅ 核心修复：文章详情图片容器，自适应高度，支持img标签 */
.detail-img {
    width: 100%;
    height: auto !important;
    background: transparent !important;
    border-radius: 12px;
    margin: 15px 0;
}
/* ✅ 图片自适应规则：宽度100%，等比例显示，不拉伸不重复 */
.detail-img img {
    width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    display: block;
    object-fit: cover;
}

.order-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
}
.order-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.order-name {
    font-weight: bold;
}
.order-status {
    color: #007aff;
    font-size: 13px;
}
.order-info {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
}

.order-cate-tab {
    display: flex;
    background: #fff;
    margin: 15px;
    border-radius: 10px;
    overflow: hidden;
}
.order-cate-tab .tab {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 15px;
    cursor: pointer;
}
.order-cate-tab .tab.active {
    background: #007aff;
    color: #fff;
}

.comment-box {
    margin-top: 30px;
}
.comment-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.comment-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 20px;
    outline: none;
}
.comment-btn {
    padding: 10px 15px;
    background: #007aff;
    color: #fff;
    border-radius: 20px;
    border: none;
}
.comment-item {
    background: #fff;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
}
.comment-user {
    font-weight: bold;
    margin-bottom: 5px;
}
.comment-text {
    color: #666;
    font-size: 14px;
}

.confirm-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    display: none;
}
.confirm-mask.show {
    display: block;
}
.confirm-pop {
    width: 80%;
    background: #fff;
    border-radius: 12px;
    margin: 50% auto 0;
    padding: 20px;
    text-align: center;
}
.confirm-txt {
    font-size: 16px;
    margin-bottom: 20px;
}
.confirm-btns {
    display: flex;
    border-top: 1px solid #eee;
}
.confirm-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-size: 16px;
}
.confirm-btn.cancel {
    color: #666;
    border-right: 1px solid #eee;
}
.confirm-btn.ok {
    color: #f56c6c;
}

.form-wrapper {
    margin-bottom: 70px;
}
.form-item {
    margin-bottom: 15px;
}
.form-item label {
    display: block;
    margin-bottom: 8px;
    color: #666;
}
.form-item input,
.form-item select,
.form-item textarea {
    width: 100% !important;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 15px;
    resize: vertical;
}
.fixed-bottom-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: #007aff;
    color: #fff;
    border: none;
    font-size: 16px;
    z-index: 22;
}

.empty-tip {
    text-align: center;
    padding: 50px 20px;
    color: #999;
    font-size: 14px;
}
.article-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}
.article-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}
.article-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}
.article-brief {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}
.article-comments {
    font-size: 12px;
    color: #999;
}

/* 发布文章-图片上传样式：适配原有UI，无侵入 */
.upload-group {
  margin: 12px 0;
}
.upload-btn {
  padding: 6px 12px;
  background: #007aff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
#imgFile {
  display: none;
}
.img-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.img-preview .preview-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  background: #f5f5f5;
}

/* 终极方案：编辑个人资料 强行左右留白，彻底不贴边 */
#sub-editUser .form-wrapper {
    margin-left: 20px !important;
    margin-right: 20px !important;
}