/* ============================================
   全局基础样式
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    min-height: calc(100vh - 200px);
    padding: 20px 0;
}

/* 全局防止输入框缩放 */
input,
textarea,
select {
    font-size: 16px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* ============================================
   Header 样式
   ============================================ */
.header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 70px;
    min-height: 70px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 20px;
    font-weight: 700;
    color: #ff6b9d;
}

/* 主导航 */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 36px;
    height: 70px;
    line-height: 1;
}

.main-nav a {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #ff6b9d;
}

/* 发布按钮 */
.nav-publish {
    background: linear-gradient(135deg, #ff6b9d, #ff4d6d);
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 32px;
    border: none;
    cursor: pointer;
}

/* 右侧用户区 */
.header-right {
    display: flex;
    align-items: center;
}

/* 用户菜单 */
.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px;
    border-radius: 20px;
    transition: background 0.2s;
}

.user-info:hover {
    background: #f5f5f5;
}

.user-info img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

/* PC端下拉菜单 */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 48px;
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    min-width: 170px;
    overflow: hidden;
    z-index: 999;
}

.dropdown-menu.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.dropdown-menu a:last-child {
    border: none;
}

.dropdown-menu a:hover {
    background: #fff5f8;
}

/* 移动端头部 */
.mobile-header {
    display: none;
    height: 50px;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

.mobile-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.mobile-menu-btn {
    font-size: 20px;
    background: none;
    border: none;
    color: #ff6b9d;
    cursor: pointer;
    padding: 5px;
}

.mobile-user {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ff6b9d;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-user img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 移动端用户下拉 */
.mobile-user-dropdown {
    display: none;
    position: absolute;
    top: 55px;
    right: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    min-width: 160px;
    overflow: hidden;
    z-index: 9999;
}

.mobile-user-dropdown.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.mobile-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
}

.mobile-user-dropdown a:last-child {
    border: none;
}

.mobile-user-dropdown a:hover {
    background: #fff5f8;
}

/* 移动端侧边栏 */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100%;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    padding: 20px;
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-sidebar a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #f3f3f3;
    color: #333;
    font-size: 15px;
}

.mobile-sidebar a:hover {
    color: #ff6b9d;
}

.mobile-sidebar .close-btn {
    text-align: right;
    margin-bottom: 10px;
}

.mobile-sidebar .close-btn button {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
}

/* ============================================
   Footer 样式
   ============================================ */
.main-footer {
    background: #fff;
    border-top: 1px solid #f0f0f0;
    padding: 16px 0;
    margin-top: 20px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-brand {
    font-size: 16px;
    font-weight: 600;
    color: #ff6b9d;
    margin-bottom: 4px;
}

.footer-brand i {
    margin-right: 6px;
}

.footer-slogan {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 14px;
    color: #666;
}

.footer-links a:hover {
    color: #ff6b9d;
}

.footer-copyright {
    font-size: 12px;
    color: #bbb;
}

/* ============================================
   全局移动端底部导航
   ============================================ */
.global-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 2000;
    justify-content: space-around;
    align-items: center;
}

.g-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 11px;
    padding: 4px 10px;
    position: relative;
    min-width: 50px;
    transition: color 0.2s;
}

.g-nav-item i {
    font-size: 21px;
}

.g-nav-item.active {
    color: #ff6b9d;
}

.g-nav-publish {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -20px;
    box-shadow: 0 4px 15px rgba(236,72,153,0.4);
}

.g-nav-publish i {
    font-size: 22px;
}

.g-nav-badge {
    position: absolute;
    top: 1px;
    right: 4px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* 分类弹出菜单 */
.g-cat-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1998;
}

.g-cat-panel {
    display: none;
    position: fixed;
    bottom: calc(60px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 18px 18px 0 0;
    padding: 18px 16px 10px;
    z-index: 1999;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
}

.g-cat-panel.open,
.g-cat-overlay.open {
    display: block;
}

.g-cat-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.g-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.g-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #374151;
    padding: 10px 6px;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 13px;
    transition: all 0.2s;
}

.g-cat-item:active {
    background: #fce7f3;
    color: #db2777;
}

.g-cat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b9d, #ff4d6d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

/* ============================================
   城市页专用样式
   ============================================ */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 分类标题 */
.cat-header {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cat-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* 城市模块 */
.city-box {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid #eee;
    margin-bottom: 16px;
}

/* 热门城市 */
.city-hot {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.city-title {
    width: 60px;
    font-size: 14px;
    color: #666;
    font-weight: 600;
    text-align: left;
    flex-shrink: 0;
}

.city-hot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    flex: 1;
}

.city-link {
    font-size: 14px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.city-link:hover {
    color: #ff5a5a;
}

.city-link.active {
    color: #ff6b9d;
    font-weight: 600;
}

/* 展开全部按钮 */
.city-toggle,
.city-btn {
    display: block;
    margin: 0 auto 15px;
    padding: 6px 20px;
    border-radius: 20px;
    border: 1px solid #ff6b9d;
    background: #fff;
    color: #ff6b9d;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.city-toggle:hover,
.city-btn:hover {
    background: #ff6b9d;
    color: #fff;
}

/* 全部省份展开区域 */
.city-all {
    display: none;
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 14px;
}

/* 省份行 */
.city-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.city-row .city-label {
    width: 60px;
    font-size: 14px;
    color: #666;
    font-weight: 600;
    text-align: left;
    flex-shrink: 0;
}

.city-row .city-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    flex: 1;
}

/* 当前省城市行 */
.province-city-row {
    margin-top: 14px;
    border-top: 1px solid #eee;
    padding-top: 14px;
    display: flex;
    align-items: flex-start;
}

.province-city-row .city-label {
    width: 60px;
    font-size: 14px;
    color: #666;
    font-weight: 600;
    text-align: left;
    flex-shrink: 0;
}

.province-city-row .city-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    flex: 1;
}

/* ============================================
   帖子列表样式
   ============================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.post-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: row;
    height: 160px;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    border-color: #ffd6e0;
}

.post-image-wrapper {
    width: 110px;
    height: 136px;
    min-width: 110px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 10px;
    margin: 12px 0 12px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s;
}

.post-card:hover .post-image {
    transform: scale(1.05);
}

.post-content {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.post-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #bbb;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
}

.post-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-location {
    color: #ff6b9d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 3px;
}

.post-views {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #999;
    font-size: 12px;
}

/* 帖子徽章 */
.post-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: linear-gradient(135deg, #ff6b9d, #ff4d6d);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.post-badge.top {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #ccc;
}

.empty-state i {
    font-size: 60px;
    display: block;
    margin-bottom: 16px;
    color: #ddd;
}

/* ============================================
   通用组件样式
   ============================================ */

/* 消息徽章 */
.msg-badge {
    display: inline-block;
    background: #ff4d6d;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 5px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

/* 下拉菜单项特殊样式 */
.dropdown-item-hot {
    color: #f59e0b !important;
}

.dropdown-item-hot span {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

.toast.info {
    background: #3b82f6;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* 表单错误状态 */
.error {
    border-color: #ef4444 !important;
}

/* 上传图片预览 */
.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.upload-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

.upload-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

/* 标签切换 */
.tab-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #ff6b9d;
    border-bottom-color: #ff6b9d;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 缩略图 */
.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.thumbnail.active {
    border-color: #ff6b9d;
}

/* 确认按钮 */
[data-confirm] {
    cursor: pointer;
}

/* 后台提示消息 */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ============================================
   后台管理样式
   ============================================ */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.admin-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    font-weight: 600;
    color: #666;
    background: #f9fafb;
}

.data-table tr:hover {
    background: #f9fafb;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #ff6b9d;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b9d, #ff4d6d);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ============================================
   响应式适配
   ============================================ */
@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-nav {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .header-inner {
        display: none;
    }

    .mobile-header {
        display: flex;
    }

    .global-mobile-nav {
        display: flex !important;
    }

    body {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .city-hot,
    .city-row,
    .province-city-row {
        flex-direction: column;
        gap: 10px;
    }

    .city-title,
    .city-label {
        width: auto;
    }

    .g-cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        height: auto;
        gap: 15px;
    }
    
    .main-nav.active {
        display: flex;
    }
}

@media (max-width: 480px) {
    .g-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        padding: 0 12px;
    }
    
    .post-card {
        height: 140px;
    }
    
    .post-image-wrapper {
        width: 90px;
        height: 116px;
        min-width: 90px;
        margin: 12px 0 12px 12px;
    }
    
    .post-content {
        padding: 10px 12px;
    }
    
    .post-title {
        font-size: 14px;
    }
}
/* ============================================
   用户中心布局样式 - User Center Layout
   ============================================ */

/* 整体布局 */
.user-layout {
    display: flex;
    gap: 25px;
    padding: 20px 0;
    align-items: flex-start;
}

/* 左侧边栏 */
.user-sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* 右侧主内容区 */
.user-main {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 用户资料卡 */
.user-profile-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-profile-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

/* 侧边导航菜单 */
.user-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.user-nav li {
    border-bottom: 1px solid #f5f5f5;
}

.user-nav li:last-child {
    border-bottom: none;
}

.user-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #555;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.user-nav a:hover {
    background: #fff5f8;
    color: #ff6b9d;
    padding-left: 25px;
}

.user-nav a.active {
    background: linear-gradient(90deg, #fff5f8 0%, #fff 100%);
    color: #ff6b9d;
    border-left: 3px solid #ff6b9d;
}

.user-nav i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* 导航徽章 */
.nav-badge {
    background: #ff4d6d;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: auto;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.nav-coins {
    margin-left: auto;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ============================================
   代理中心特定样式 - Agent Center
   ============================================ */

/* 页面标题 */
.page-title {
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b9d, #ff4d6d);
    border-radius: 2px;
}

/* 推广卡片 */
.promo-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.promo-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.promo-card h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.promo-link-box {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.promo-input {
    flex: 1;
    background: rgba(255,255,255,0.25);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-family: monospace;
    backdrop-filter: blur(10px);
}

.promo-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.promo-input:focus {
    outline: none;
    background: rgba(255,255,255,0.35);
    border-color: rgba(255,255,255,0.5);
}

.promo-card .copy-btn {
    background: #fff;
    color: #764ba2;
    border: none;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.promo-card .copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.promo-tip {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* 统计数据网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    padding: 25px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b9d, #ff4d6d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* 章节标题 */
.section-title {
    margin: 35px 0 20px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #ff6b9d, #ff4d6d);
    border-radius: 2px;
}

/* 信息说明框 */
.info-box {
    background: #fafafa;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    line-height: 2;
}

.info-box p {
    margin: 0 0 12px 0;
    color: #555;
    font-size: 15px;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.info-box strong {
    color: #333;
    font-weight: 600;
}

/* ============================================
   响应式适配 - 用户中心
   ============================================ */
@media (max-width: 992px) {
    .user-layout {
        flex-direction: column;
    }
    
    .user-sidebar {
        width: 100%;
    }
    
    .user-profile-card {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 15px;
        padding: 20px;
    }
    
    .user-avatar-large {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
    }
    
    .user-profile-card h3 {
        margin-bottom: 4px;
    }
    
    .user-nav {
        display: flex;
        overflow-x: auto;
        border-radius: 12px;
        padding: 10px;
        gap: 5px;
    }
    
    .user-nav li {
        border-bottom: none;
        border-right: 1px solid #f5f5f5;
        flex-shrink: 0;
    }
    
    .user-nav li:last-child {
        border-right: none;
    }
    
    .user-nav a {
        padding: 10px 16px;
        white-space: nowrap;
    }
    
    .user-nav a.active {
        border-left: none;
        border-bottom: 2px solid #ff6b9d;
        background: #fff5f8;
        border-radius: 8px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .user-main {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .promo-link-box {
        flex-direction: column;
    }
    
    .promo-card {
        padding: 20px;
    }
    
    .promo-input {
        font-size: 13px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 24px;
    }
}
/* ============================================
   消息中心/聊天页面样式 - Messages/Chat
   ============================================ */

/* 聊天布局 */
.chat-layout {
    display: flex;
    height: calc(100vh - 70px);
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin: 20px 0;
}

/* 左侧联系人列表 */
.chat-sidebar {
    width: 320px;
    border-right: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    background: #fafafa;
}

.chat-search {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.chat-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    background: #fff;
}

.chat-search input:focus {
    outline: none;
    border-color: #ff6b9d;
}

/* 联系人列表 */
.chat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}

.chat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.chat-item:hover {
    background: #fff5f8;
}

.chat-item.active {
    background: #fff;
    border-left: 3px solid #ff6b9d;
}

.chat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-preview {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 右侧聊天区域 */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

/* 消息列表 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 单条消息 */
.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-sent {
    align-self: flex-end;
    background: linear-gradient(135deg, #ff6b9d, #ff4d6d);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message-received {
    align-self: flex-start;
    background: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

/* 输入区域 */
.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
}

.chat-input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    transition: all 0.2s;
}

.chat-input:focus {
    outline: none;
    border-color: #ff6b9d;
}

/* VIP 徽章 */
.vip-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
}

/* 空状态 */
.empty-chat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.empty-chat i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
    color: #ccc;
}

/* ============================================
   消息中心响应式
   ============================================ */
@media (max-width: 768px) {
    .chat-layout {
        margin: 0;
        border-radius: 0;
        height: calc(100vh - 50px);
    }
    
    .chat-sidebar {
        width: 100%;
    }
    
    .chat-main {
        width: 100%;
    }
    
    .message {
        max-width: 85%;
    }
    
    .chat-header::before {
        content: '←';
        position: absolute;
        left: 15px;
        font-size: 20px;
        cursor: pointer;
        color: #666;
    }
    
    .chat-header {
        position: relative;
        padding-left: 40px;
    }
}
/* 筛选栏样式 - 仿城市标签滑动效果 */
.filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
}

.filter-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

.filter-tabs::-webkit-scrollbar {
    display: none; /* Chrome Safari */
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: #f5f5f5;
    text-decoration: none; /* 去掉下划线 */
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.filter-tab:hover {
    color: #ff4d6d;
    background: #fff0f3;
    border-color: #ffccd5;
    text-decoration: none; /* 确保hover时无下划线 */
}

.filter-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #ff6b9d, #ff4d6d);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(255, 77, 109, 0.3);
    text-decoration: none; /* 确保active时无下划线 */
}

.filter-tab i {
    font-size: 13px;
}

.filter-right {
    flex-shrink: 0;
    margin-left: 15px;
}

.filter-count {
    font-size: 13px;
    color: #999;
}