/* ================================================
   社区论坛 - 全局样式
   ================================================ */

/* CSS Variables */
:root {
    --primary-color: #1a1a2e;
    --primary-hover: #16213e;
    --primary-light: rgba(26, 26, 46, 0.06);
    --secondary-color: #4a4a68;
    --accent-color: #e94560;
    --success-color: #2d936c;
    --warning-color: #f4a261;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-light: #8b8b9e;
    --bg-primary: #f7f8f9;
    --bg-white: #ffffff;
    --bg-dark: #1a1a2e;
    --border-color: #e8eaed;
    --border-hover: #d1d3d8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.09);
    --radius: 10px;
    --radius-lg: 14px;
    --radius-sm: 6px;
    --radius-xs: 3px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

input, textarea, select {
    font-family: inherit;
    outline: none;
    border: none;
}

ul, ol {
    list-style: none;
}

/* ================================================
   布局容器
   ================================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================================================
   公共头部 Header
   ================================================ */
.header {
    background: var(--bg-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 8px 0;
    font-size: 13px;
    letter-spacing: 0.3px;
    border-bottom: 1px solid var(--border-color);
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    gap: 32px;
}

/* 图片Logo样式 */
.logo-image {
    height: 45px;
    width: auto;
    object-fit: contain;
}

/* Logo区域 */
.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.logo-slogan {
    font-size: 11px;
    color: var(--text-light);
    letter-spacing: 1px;
    font-weight: 400;
}

/* 城市切换 */
.city-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-primary);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    border: 1px solid transparent;
    white-space: nowrap;
    min-width: 100px;
}

.city-switcher:hover {
    background: var(--bg-white);
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

.city-icon {
    font-size: 15px;
    color: var(--text-light);
    flex-shrink: 0;
}

.city-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* 三级联动样式 - 简洁版 */
.city-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0;
    z-index: 1001;
    max-height: 400px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    min-width: 420px;
    max-width: 480px;
}

.city-dropdown.show {
    display: block;
}

/* 城市选项卡 */
.city-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.city-tab {
    flex: 1;
    padding: 14px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.city-tab:hover {
    color: var(--primary-color);
    background: rgba(230, 126, 34, 0.05);
}

.city-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--bg-white);
}

/* 城市内容区 */
.city-content {
    max-height: 340px;
    overflow-y: auto;
}

.city-content::-webkit-scrollbar {
    width: 6px;
}

.city-content::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.city-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.city-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* 城市列表 */
.city-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px;
}

.city-item {
    padding: 12px 14px;
    text-align: center;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    line-height: 1;
    border: 1px solid transparent;
}

.city-item:hover {
    background: var(--bg-primary);
    border-color: rgba(230, 126, 34, 0.2);
}

.city-item.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* 已废弃 - 使用渐进式选择后不再需要底部显示 */
/* .city-selected {
    padding: 14px 16px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.05), rgba(241, 196, 15, 0.05));
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-label {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.selected-value {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    flex: 1;
} */

/* 搜索区域 */
.search-area {
    flex: 1;
    max-width: 480px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 5px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.search-box:focus-within {
    background: var(--bg-white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-btn {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-hover);
}

/* 用户区域 */
.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.user-avatar:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.login-btn {
    padding: 9px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
}

.login-btn:hover {
    background: var(--primary-hover);
}

/* 欢迎标语 */
.welcome-banner {
    background: var(--bg-white);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.welcome-text {
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: var(--primary-color);
    letter-spacing: 1px;
}

/* 导航菜单 */
.nav-menu {
    background: var(--bg-white);
    padding: 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-item {
    padding: 14px 24px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

.nav-item.active {
    color: var(--primary-color);
    font-weight: 600;
    background: transparent;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ================================================
   主内容区域 Main
   ================================================ */
.main-content {
    display: flex;
    gap: 24px;
    padding: 28px 0;
    min-height: calc(100vh - 200px);
}

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

.sidebar-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.sidebar-card:hover {
    box-shadow: var(--shadow-md);
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-primary);
}

.sidebar-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 2px;
}

.sidebar-body {
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
}

/* 自定义滚动条样式 */
.sidebar-body::-webkit-scrollbar {
    width: 4px;
}

.sidebar-body::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.sidebar-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

.district-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.district-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 2px;
}

.district-item:hover {
    background: var(--primary-light);
}

.district-item.active {
    background: var(--primary-color);
    color: white;
}

.district-name {
    font-size: 14px;
    font-weight: 500;
}

.district-count {
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg-primary);
    padding: 3px 8px;
    border-radius: 12px;
}

.district-item.active .district-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* 热门话题 */
.topic-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.topic-item:hover {
    transform: translateX(4px);
    background: var(--primary-light);
    box-shadow: var(--shadow);
}

.topic-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

.topic-icon.hot {
    background: var(--accent-color);
    color: white;
}

.topic-icon.new {
    background: var(--primary-color);
    color: white;
}

.topic-icon.recommend {
    background: var(--secondary-color);
    color: white;
}

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

.topic-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.topic-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 用户统计 */
.user-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
}

.stat-item {
    text-align: center;
    padding: 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ================================================
   内容区域 Content
   ================================================ */
.content {
    flex: 1;
    min-width: 0;
}

/* 顶部操作栏 */
.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 18px 22px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.content-header:hover {
    box-shadow: var(--shadow-md);
}

.content-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-btn {
    padding: 7px 16px;
    background: var(--bg-primary);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.publish-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.publish-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.publish-btn svg {
    width: 18px;
    height: 18px;
}

/* 帖子列表 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
}

/* 帖子卡片 */
.post-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
}

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

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    font-size: 15px;
}

.post-user-info {
    display: flex;
    flex-direction: column;
}

.post-username {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.post-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.post-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    padding: 5px 10px;
    border-radius: 14px;
}

.post-topic {
    display: inline-block;
    padding: 5px 10px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.post-topic:hover {
    background: var(--primary-color);
    color: white;
}

.post-content {
    padding: 0 18px 12px;
}

.post-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 10px;
}

.post-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.keyword-tag {
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.keyword-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* 帖子媒体 */
.post-media {
    position: relative;
}

.post-images {
    display: grid;
    gap: 4px;
    padding: 0 18px 12px;
}

.post-images.grid-1 {
    grid-template-columns: 1fr;
}

.post-images.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.post-images.grid-3,
.post-images.grid-4,
.post-images.grid-5,
.post-images.grid-6 {
    grid-template-columns: repeat(3, 1fr);
}

.post-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

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

.post-video {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 18px 12px;
}

.post-video-cover {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.05);
    background: rgba(0, 0, 0, 0.85);
}

.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
}

/* 帖子操作栏 */
.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 12px 18px;
    border-top: 1px solid var(--border-color);
}

.action-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.action-item:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
}

.action-item.liked {
    color: var(--primary-color);
}

.action-item svg {
    width: 18px;
    height: 18px;
}

.action-count {
    font-size: 13px;
    font-weight: 500;
}

/* 加载更多 */
.load-more {
    padding: 24px;
    text-align: center;
}

.load-more-btn {
    padding: 13px 44px;
    background: var(--bg-white);
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.load-more-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================================================
   发布弹窗 Modal
   ================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius);
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--primary-color);
    color: white;
}

.modal-body {
    padding: 22px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 22px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

/* 发布表单 */
.publish-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-textarea {
    width: 100%;
    min-height: 130px;
    padding: 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    resize: vertical;
    transition: var(--transition);
    border: 1px solid transparent;
}

.form-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* 媒体上传 */
.media-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.upload-item {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.upload-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.upload-item svg {
    width: 28px;
    height: 28px;
    color: var(--text-light);
}

.upload-item span {
    font-size: 12px;
    color: var(--text-secondary);
}

.upload-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    opacity: 0;
    transition: var(--transition);
}

.upload-item:hover .upload-remove {
    opacity: 1;
}

/* 媒体类型切换 */
.media-type-tabs {
    display: flex;
    gap: 8px;
}

.media-tab {
    padding: 8px 18px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.media-tab.active,
.media-tab:hover {
    background: var(--primary-color);
    color: white;
}

/* 位置选择 */
.location-select {
    display: flex;
    gap: 12px;
}

.location-select select {
    flex: 1;
    padding: 11px 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.location-select select:focus {
    border-color: var(--primary-color);
}

/* 按钮样式 */
.btn {
    padding: 11px 26px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ================================================
   微信分享面板
   ================================================ */
.share-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 22px;
    z-index: 2001;
    transform: translateY(100%);
    transition: var(--transition);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
}

.share-panel.active {
    transform: translateY(0);
}

.share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.share-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.share-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.share-options {
    display: flex;
    justify-content: space-around;
    margin-bottom: 18px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.share-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
}

.share-icon.wechat {
    background: #07c160;
}

.share-icon.moments {
    background: #576b95;
}

.share-icon.copy {
    background: var(--warning-color);
}

.share-icon.qrcode {
    background: #3498db;
}

.share-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ================================================
   公共底部 Footer
   ================================================ */
.footer {
    background: var(--bg-white);
    color: var(--text-primary);
    padding: 45px 0 22px;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 35px;
    margin-bottom: 35px;
}

/* 品牌信息 */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-image {
    height: 36px;
    width: auto;
    object-fit: contain;
    margin-bottom: 12px;
}

.footer-logo-icon {
    width: 38px;
    height: 38px;
    background: var(--primary-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
}

.footer-logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.footer-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 链接组 */
.footer-links h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 4px;
}

/* 社交媒体 */
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 底部版权 */
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copyright {
    font-size: 12px;
    color: var(--text-light);
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    font-size: 12px;
    color: var(--text-light);
}

.footer-legal a:hover {
    color: var(--primary-color);
}

/* ================================================
   空状态 & 错误提示
   ================================================ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ================================================
   响应式设计
   ================================================ */
@media (max-width: 1200px) {
    .container {
        padding: 0 15px;
    }

    .content-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        display: none;
    }

    .main-content {
        flex-direction: column;
    }

    .header-main {
        flex-wrap: wrap;
    }

    .search-area {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 12px;
    }

    .city-switcher {
        padding: 8px 14px;
    }
}

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

    .user-name {
        display: none;
    }

    .nav-list {
        overflow-x: auto;
    }

    .nav-item {
        padding: 12px 16px;
        white-space: nowrap;
    }

    .post-images.grid-4,
    .post-images.grid-5,
    .post-images.grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .post-images.grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .post-actions {
        padding: 8px 12px;
    }

    .action-item {
        padding: 6px 10px;
    }

    .publish-btn span {
        display: none;
    }
}

/* ================================================
   动画效果
   ================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.4s ease forwards;
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.08s; }
.post-card:nth-child(3) { animation-delay: 0.11s; }
.post-card:nth-child(4) { animation-delay: 0.14s; }
.post-card:nth-child(5) { animation-delay: 0.17s; }

/* Toast 提示 */
.toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    background: var(--bg-dark);
    color: white;
    padding: 12px 26px;
    border-radius: var(--radius);
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

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

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--primary-color);
}

/* ================================================
   帖子详情视图样式
   ================================================ */
.post-detail-view {
    display: none;
}

.detail-header {
    margin-bottom: 16px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.back-btn:hover {
    background: var(--primary-color);
    color: white;
}

.detail-post-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 图片预览弹窗 */
.image-preview {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.image-preview.active {
    opacity: 1;
    visibility: visible;
}

.image-preview img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius);
}

.image-preview-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: var(--transition);
}

.image-preview-close:hover {
    background: var(--primary-color);
}

/* ================================================
   帖子详情弹窗样式
   ================================================ */
.post-detail-modal {
    max-width: 780px;
}

.post-detail {
    padding: 0;
}

/* 团建项目帖子样式 */
.team-building-post {
    padding: 0;
}

.team-building-content {
    padding: 18px;
    background: #fff;
}

.team-building-text {
    line-height: 1.7;
    color: var(--text-primary);
}

.team-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    line-height: 1.4;
}

.team-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 18px 0 10px 0;
    padding: 9px 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-color);
}

.team-paragraph {
    font-size: 14px;
    color: var(--text-primary);
    margin: 10px 0;
    line-height: 1.7;
}

.team-tag {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.team-list {
    margin: 8px 0;
    padding-left: 18px;
    list-style: none;
}

.team-list li {
    position: relative;
    padding: 7px 0 7px 22px;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
}

.team-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-secondary);
    font-weight: normal;
    font-size: 15px;
}

/* 团建项目图片画廊 */
.team-building-gallery {
    padding: 18px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.gallery-grid {
    display: grid;
    gap: 8px;
}

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

.gallery-grid.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-image:hover {
    transform: scale(1.01);
}

