/* ==========================================================================
   移动端 APP 风格补充样式 (H5)
   仅在 max-width: 768px 时生效，PC端不受影响
   注意：本文件只补充 main.css 中未覆盖的部分
   - 首页/圈子/文章列表等页面已有完整移动端样式，请勿在此覆盖
   - 本文件主要覆盖："我的"页面APP风格、文章详情页、通用表单等
   ========================================================================== */

@media (max-width: 768px) {

/* ==================== 全局基础 ==================== */
* {
    -webkit-tap-highlight-color: transparent;
}

/* 面包屑导航在移动端隐藏 */
.breadcrumb { display: none !important; }

/* ==================== "我的"页面 APP 风格 ==================== */

/* PC端原有样式在移动端隐藏 */
.user-profile-page .profile-tabs { display: none !important; }
.user-profile-page .profile-header { display: none !important; }

/* 主页面（activeTab=profile）下隐藏PC端tab-content，因为APP视图已展示 */
.user-profile-page:not(.is-subpage) .profile-tab-content { display: none !important; }

/* 子页面模式下显示tab-content（包含编辑/订单/话题/问答/密码等内容） */
.user-profile-page.is-subpage .profile-tab-content { display: block !important; padding: 0 !important; }

/* ==================== 移动端子页面导航头 ==================== */
.uc-subpage-header {
    display: none;
}
.user-profile-page.is-subpage .uc-subpage-header {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 12px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 50;
}
.uc-subpage-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #333;
    text-decoration: none;
}
.uc-subpage-back svg {
    width: 22px;
    height: 22px;
}
.uc-subpage-title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 32px 0 0;
}

/* APP风格用户中心容器 */
.user-center-app {
    display: flex !important;
    flex-direction: column;
    min-height: calc(100vh - 48px - 56px);
    background: #f5f5f5;
}

/* 顶部用户信息卡片 */
.uc-header {
    position: relative;
    padding: 48px 16px 20px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8e53 100%);
    color: #fff;
    overflow: hidden;
}
.uc-header::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -30px;
    width: 140px;
    height: 140px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.uc-header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.uc-user-row {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}
.uc-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    object-fit: cover;
    background: #fff;
    flex-shrink: 0;
}
.uc-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.uc-avatar-placeholder svg {
    width: 32px;
    height: 32px;
    color: #fff;
}
.uc-user-text {
    flex: 1;
    min-width: 0;
}
.uc-username {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.uc-vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    font-weight: 400;
}
.uc-vip-badge.vip-active {
    background: linear-gradient(90deg, #ffd700, #ffb347);
    color: #8b4513;
}
.uc-vip-badge svg {
    width: 12px;
    height: 12px;
}
.uc-user-meta {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    gap: 12px;
}

/* 数据统计行 */
.uc-stats {
    display: flex;
    background: #fff;
    margin: -12px 12px 0;
    border-radius: 12px;
    padding: 16px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: relative;
    z-index: 2;
}
.uc-stat-item {
    flex: 1;
    text-align: center;
    border-right: 1px solid #f0f0f0;
}
.uc-stat-item:last-child {
    border-right: none;
}
.uc-stat-num {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}
.uc-stat-label {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* 签到卡片 */
.uc-signin-card {
    margin: 12px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.uc-signin-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.uc-signin-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}
.uc-signin-desc {
    font-size: 12px;
    color: #999;
}
.uc-signin-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #ff6b35, #ff8e53);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.uc-signin-btn:disabled,
.uc-signin-btn.signed {
    background: #e0e0e0;
    color: #999;
}

/* VIP推广卡片 */
.uc-vip-card {
    margin: 0 12px 12px;
    padding: 16px;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffd700;
}
.uc-vip-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.uc-vip-card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700, #ffb347);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b4513;
}
.uc-vip-card-icon svg {
    width: 22px;
    height: 22px;
}
.uc-vip-card-text h4 {
    font-size: 15px;
    color: #ffd700;
    margin: 0 0 2px;
}
.uc-vip-card-text p {
    font-size: 11px;
    color: #aaa;
    margin: 0;
}
.uc-vip-card-btn {
    padding: 6px 16px;
    background: linear-gradient(90deg, #ffd700, #ffb347);
    color: #8b4513;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* 功能网格 */
.uc-section {
    margin: 0 12px 12px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.uc-section-title {
    padding: 14px 16px 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.uc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 4px 0 12px;
}
.uc-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
    text-decoration: none;
    color: #333;
}
.uc-grid-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    font-size: 20px;
}
.uc-grid-icon svg {
    width: 22px;
    height: 22px;
}
.uc-grid-icon.ic-order { background: #fff3e0; color: #ff9800; }
.uc-grid-icon.ic-topic { background: #e3f2fd; color: #2196f3; }
.uc-grid-icon.ic-qa { background: #e8f5e9; color: #4caf50; }
.uc-grid-icon.ic-fav { background: #fce4ec; color: #e91e63; }
.uc-grid-icon.ic-history { background: #f3e5f5; color: #9c27b0; }
.uc-grid-icon.ic-follow { background: #e0f7fa; color: #00bcd4; }
.uc-grid-icon.ic-breed { background: #fff8e1; color: #ffc107; }
.uc-grid-icon.ic-image { background: #e8eaf6; color: #3f51b5; }
.uc-grid-label {
    font-size: 11px;
    color: #666;
}

/* 设置列表 */
.uc-menu-list {
    margin: 0 12px 12px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.uc-menu-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}
.uc-menu-item:last-child {
    border-bottom: none;
}
.uc-menu-item:active {
    background: #f9f9f9;
}
.uc-menu-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    background: #f5f5f5;
    flex-shrink: 0;
}
.uc-menu-icon svg {
    width: 16px;
    height: 16px;
    color: #666;
}
.uc-menu-text {
    flex: 1;
    font-size: 15px;
}
.uc-menu-arrow {
    color: #ccc;
    font-size: 18px;
}
.uc-menu-badge {
    background: #ff6b35;
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-right: 4px;
}

/* 退出登录按钮 */
.uc-logout {
    margin: 0 12px 24px;
    padding: 14px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    color: #e53935;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.uc-logout:active {
    background: #fef0f0;
}

/* ==================== "我的"页面子面板适配 ==================== */
/* 编辑资料、修改密码等子页面的panel在移动端也用APP风格 */
.user-profile-page > .panel {
    margin: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.user-profile-page > .panel h3 {
    font-size: 16px;
    margin-bottom: 12px;
}
.user-profile-page .info-grid {
    display: block;
}
.user-profile-page .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}
.user-profile-page .info-item:last-child {
    border-bottom: none;
}
.user-profile-page .info-label {
    color: #999;
    font-size: 14px;
}
.user-profile-page .info-value {
    color: #333;
    font-size: 14px;
    text-align: right;
}
.user-profile-page .profile-form .form-group {
    margin-bottom: 16px;
}
.user-profile-page .profile-form label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}
.user-profile-page .profile-form input[type="text"],
.user-profile-page .profile-form input[type="email"],
.user-profile-page .profile-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}
.user-profile-page .profile-form .btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ff6b35, #ff8e53);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

/* 数据表格在移动端改为卡片 */
.user-profile-page .data-table {
    width: 100%;
}
.user-profile-page .data-table thead {
    display: none;
}
.user-profile-page .data-table tr {
    display: block;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.user-profile-page .data-table td {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}
.user-profile-page .data-table td::before {
    content: attr(data-label);
    color: #999;
}

/* 内容列表在移动端 */
.user-profile-page .content-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.user-profile-page .content-item {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

/* ==================== 文章详情页 APP 风格 ==================== */
/* main.css 未覆盖文章详情页，此处补充移动端样式 */
.article-detail-page {
    padding: 12px !important;
    background: #fff;
}
.article-detail-page .article-title {
    font-size: 20px !important;
    line-height: 1.4 !important;
    margin: 8px 0 12px !important;
    color: #1a1a1a !important;
    font-weight: 700 !important;
}
.article-detail-page .article-meta-bar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 10px 0 !important;
    margin-bottom: 14px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 12px !important;
    color: #999 !important;
}
.article-detail-page .author-info {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.article-detail-page .author-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #f5f5f5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
.article-detail-page .author-avatar svg {
    width: 20px !important;
    height: 20px !important;
    color: #999 !important;
}
.article-detail-page .author-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}
.article-detail-page .author-name {
    font-size: 13px !important;
    color: #333 !important;
    font-weight: 600 !important;
}
.article-detail-page .publish-time {
    font-size: 11px !important;
    color: #999 !important;
}
.article-detail-page .article-stats {
    display: flex !important;
    gap: 12px !important;
    font-size: 11px !important;
    color: #999 !important;
}
.article-detail-page .stat-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}
.article-detail-page .stat-item svg {
    width: 13px !important;
    height: 13px !important;
}

/* 文章正文 */
.article-detail-page .article-content {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #333 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}
.article-detail-page .article-cover {
    margin: 0 0 14px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}
.article-detail-page .article-cover img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 10px !important;
}
.article-detail-page .article-body {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #333 !important;
}
.article-detail-page .article-body p {
    margin: 14px 0 !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #333 !important;
    word-wrap: break-word !important;
}
.article-detail-page .article-body h2 {
    font-size: 19px !important;
    margin: 22px 0 12px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    line-height: 1.4 !important;
}
.article-detail-page .article-body h3 {
    font-size: 17px !important;
    margin: 18px 0 10px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    line-height: 1.4 !important;
}
.article-detail-page .article-body h4 {
    font-size: 15px !important;
    margin: 14px 0 8px !important;
    font-weight: 600 !important;
    color: #333 !important;
}
.article-detail-page .article-body img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    margin: 14px 0 !important;
    display: block !important;
}
.article-detail-page .article-body ul,
.article-detail-page .article-body ol {
    margin: 14px 0 !important;
    padding-left: 22px !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
}
.article-detail-page .article-body li {
    margin: 6px 0 !important;
}
.article-detail-page .article-body blockquote {
    margin: 14px 0 !important;
    padding: 12px 14px !important;
    border-left: 3px solid #ff6b35 !important;
    background: #fafafa !important;
    border-radius: 0 8px 8px 0 !important;
    color: #666 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}
.article-detail-page .article-body pre {
    margin: 14px 0 !important;
    padding: 12px !important;
    background: #f5f5f5 !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
}
.article-detail-page .article-body code {
    font-size: 14px !important;
    padding: 2px 6px !important;
    background: #f5f5f5 !important;
    border-radius: 4px !important;
}
.article-detail-page .article-body table {
    width: 100% !important;
    margin: 14px 0 !important;
    border-collapse: collapse !important;
    font-size: 14px !important;
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}
.article-detail-page .article-body table th,
.article-detail-page .article-body table td {
    padding: 8px 10px !important;
    border: 1px solid #e0e0e0 !important;
    text-align: left !important;
}
.article-detail-page .article-body a {
    color: #ff6b35 !important;
    text-decoration: none !important;
    word-break: break-all !important;
}

/* 文章操作按钮 */
.article-detail-page .article-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 16px 0 12px !important;
    margin-top: 12px !important;
    border-top: 1px solid #f0f0f0 !important;
}
.article-detail-page .btn-like {
    flex: 1 !important;
    min-width: 100px !important;
    padding: 10px 14px !important;
    background: #fff !important;
    border: 1px solid #ff6b35 !important;
    color: #ff6b35 !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    cursor: pointer !important;
}
.article-detail-page .btn-like svg {
    width: 16px !important;
    height: 16px !important;
}
.article-detail-page .btn-like.liked {
    background: #ff6b35 !important;
    color: #fff !important;
}
.article-detail-page .share-buttons {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
    justify-content: flex-end !important;
}
.article-detail-page .share-label {
    font-size: 12px !important;
    color: #999 !important;
}
.article-detail-page .share-btn {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #f5f5f5 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #666 !important;
}
.article-detail-page .share-btn svg {
    width: 16px !important;
    height: 16px !important;
}

/* 评论区 */
.article-detail-page .comments-section,
.article-detail-page .article-comments {
    padding: 14px 0 !important;
    margin-top: 12px !important;
    border-top: 1px solid #f0f0f0 !important;
}
.article-detail-page .comment-item {
    padding: 12px 0 !important;
    border-bottom: 1px solid #f5f5f5 !important;
}
.article-detail-page .comment-avatar {
    width: 36px !important;
    height: 36px !important;
}
.article-detail-page .comment-body {
    padding-left: 10px !important;
}
.article-detail-page .comment-form textarea {
    width: 100% !important;
    padding: 10px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
    box-sizing: border-box !important;
}

/* ==================== 通用表单 APP 风格 ==================== */
.form-group {
    margin-bottom: 14px !important;
}
.form-group label {
    font-size: 14px !important;
    margin-bottom: 6px !important;
}
.form-control,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100% !important;
    padding: 10px 12px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
    box-sizing: border-box !important;
}
.form-group .help-text {
    font-size: 12px !important;
    color: #999 !important;
    margin-top: 4px !important;
}

/* 通用按钮 */
.btn-primary,
.btn.btn-primary {
    background: linear-gradient(135deg, #ff6b35, #ff8e53) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #fff !important;
}
.btn-block {
    width: 100% !important;
}

/* ==================== 通用面板/提示 APP 风格 ==================== */
.panel {
    margin: 10px 12px !important;
    background: #fff !important;
    border-radius: 12px !important;
    padding: 14px !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04) !important;
}
.panel h3,
.panel .panel-header h3 {
    font-size: 16px !important;
    margin-bottom: 10px !important;
}

.alert {
    margin: 10px 12px !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
}

/* 分页在移动端 */
.pagination {
    padding: 16px 12px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
}
.pagination a,
.pagination span {
    padding: 6px 10px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
}

/* 空状态 */
.empty-state {
    padding: 48px 20px !important;
    text-align: center !important;
}
.empty-state .empty-icon svg {
    width: 48px !important;
    height: 48px !important;
}
.empty-state p {
    font-size: 14px !important;
    color: #999 !important;
}

/* 标签/徽章 */
.badge {
    font-size: 11px !important;
    padding: 2px 8px !important;
}

/* 卡片基础 */
.card {
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04) !important;
}

/* 返回顶部避开底部导航 */
.back-to-top {
    bottom: 70px !important;
}

} /* end @media (max-width: 768px) */
