/**
 * languifang.cc 分类信息平台 - 主样式文件
 * 移动端优先响应式设计 - 粉色系主题
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #e91e63;
    --primary-light: #f48fb1;
    --primary-lighter: #fce4ec;
    --bg-white: #ffffff;
    --bg-gray: #f5f5f5;
    --text-dark: #333333;
    --text-gray: #555555;
    --text-light: #999999;
    --border-color: #eeeeee;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--bg-gray);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
input, textarea, button { font-family: inherit; font-size: inherit; border: none; outline: none; }

.app-container { min-height: 100vh; padding-bottom: 65px; background: var(--bg-gray); }
.main-content { padding-top: 50px; }

/* 头部 */
.header {
    position: fixed; top: 0; left: 0; right: 0; height: 50px;
    background: var(--bg-white); z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.header-content { display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 15px; }
.logo { font-size: 18px; font-weight: bold; color: var(--primary); }
.city-selector {
    display: flex; align-items: center; gap: 4px; padding: 6px 14px;
    background: var(--primary); border-radius: 20px; cursor: pointer; font-size: 14px;
    color: #fff; font-weight: 500;
}
.city-selector:active { background: #c2185b; }
.city-selector .ion { font-size: 12px; color: #fff; }

/* 城市选择器 */
.city-picker-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); z-index: 200;
    opacity: 0; visibility: hidden; transition: all 0.3s;
}
.city-picker-overlay.show { opacity: 1; visibility: visible; }
.city-picker {
    position: fixed; bottom: 0; left: 0; right: 0;
    max-height: 70vh; background: var(--bg-white);
    border-radius: 16px 16px 0 0; z-index: 201;
    transform: translateY(100%); transition: transform 0.3s; overflow: hidden;
}
.city-picker-overlay.show .city-picker { transform: translateY(0); }
.city-picker-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px; border-bottom: 1px solid var(--border-color);
}
.city-picker-title { font-size: 16px; font-weight: bold; }
.city-picker-close {
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--bg-gray); cursor: pointer; font-size: 18px;
}
.city-picker-content { max-height: calc(70vh - 60px); overflow-y: auto; padding: 15px; }
.city-tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 15px; }
.city-tab {
    flex: 1; padding: 10px; text-align: center; font-size: 14px;
    color: var(--text-light); border-bottom: 2px solid transparent; cursor: pointer;
}
.city-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.province-list, .city-list { display: flex; flex-wrap: wrap; gap: 10px; }
.province-item, .city-item {
    padding: 8px 16px; background: var(--bg-gray); border-radius: 20px;
    cursor: pointer; font-size: 13px; transition: all 0.3s;
}
.province-item:hover, .city-item:hover { background: var(--primary-lighter); }
.province-item.active, .city-item.active { background: var(--primary); color: white; }
.city-list { display: none; }
.city-list.show { display: flex; }

/* 公告栏 */
.announcement-bar {
    background: var(--bg-white); padding: 10px 15px;
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.announcement-icon { color: var(--primary); font-size: 20px; }
.announcement-content { flex: 1; overflow: hidden; }
.announcement-scroll { display: flex; gap: 30px; animation: scroll 20s linear infinite; white-space: nowrap; }
.announcement-text { font-size: 13px; color: var(--text-gray); }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* 帖子列表 - 双列瀑布流 */
.post-list { padding: 0 8px 15px; display: flex; gap: 8px; }
.post-list .post-col { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.post-card {
    background: var(--bg-white); border-radius: 12px; padding: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); transition: all 0.3s;
}
.post-card:active { transform: scale(0.98); }
.post-header { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 8px; }
.post-title {
    font-size: 14px; font-weight: bold; color: var(--text-dark);
    line-height: 1.4; flex: 1; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-top-badge {
    background: linear-gradient(135deg, #ff9800, #ffc107); color: white;
    padding: 2px 6px; border-radius: 4px; font-size: 10px; white-space: nowrap;
}
.post-content {
    font-size: 12px; color: var(--text-gray); line-height: 1.5;
    margin-bottom: 8px; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 瀑布流封面图 - 大图 */
.post-cover { width: 100%; border-radius: 8px; object-fit: cover; background: var(--bg-gray); display: block; margin-bottom: 8px; aspect-ratio: 3/4; }
.post-img-count { font-size: 11px; color: #999; margin-bottom: 8px; }
.post-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 8px; border-top: 1px solid var(--border-color);
}
.post-location { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-light); }
.post-location .ion { color: var(--primary); font-size: 12px; }
.post-time { font-size: 11px; color: var(--text-light); }

/* 底部导航 */
.tab-bar {
    position: fixed; bottom: 0; left: 0; right: 0; height: 65px;
    background: var(--bg-white); display: flex;
    box-shadow: 0 -1px 10px rgba(0,0,0,0.08); z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 4px; color: var(--text-light); transition: all 0.3s; position: relative;
}
.tab-item .ion { font-size: 24px; transition: all 0.3s; }
.tab-item span { font-size: 11px; }
.tab-item.active { color: var(--primary); }
.tab-item.active .ion { transform: scale(1.1); }
.tab-item.active::before {
    content: ''; position: absolute; top: 0; left: 50%;
    transform: translateX(-50%); width: 40px; height: 3px;
    background: var(--primary); border-radius: 0 0 3px 3px;
}

/* 表单 */
.form-group { margin-bottom: 15px; }
.form-label { display: block; font-size: 14px; color: var(--text-dark); margin-bottom: 8px; font-weight: 500; }
.form-input {
    width: 100%; padding: 12px 15px; background: var(--bg-gray);
    border-radius: 10px; border: 1px solid transparent; transition: all 0.3s;
}
.form-input:focus { border-color: var(--primary); background: var(--bg-white); }
textarea.form-input { min-height: 120px; resize: vertical; }
.form-btn {
    width: 100%; padding: 14px; background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white; border-radius: 25px; font-size: 16px; font-weight: bold;
    cursor: pointer; transition: all 0.3s; border: none;
}
.form-btn:active { transform: scale(0.98); }
.form-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* 会员中心 */
.member-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 30px 20px 40px; color: white; text-align: center;
}
.member-title { font-size: 22px; font-weight: bold; margin-bottom: 8px; }
.member-subtitle { font-size: 14px; opacity: 0.9; }
.member-stats {
    background: var(--bg-white); margin: -30px 15px 15px; border-radius: 12px;
    padding: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex; justify-content: space-around; font-size: 12px;
}
.member-stat-value { font-size: 18px; font-weight: bold; color: var(--primary); }
.member-stat-label { color: var(--text-light); margin-top: 4px; }

/* 会员套餐 */
.member-packages { padding: 15px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.package-card {
    background: var(--bg-white); border-radius: 12px; padding: 18px 15px;
    text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); position: relative; overflow: hidden;
}
.package-card.hot::before {
    content: 'HOT'; position: absolute; top: 8px; right: 8px;
    background: linear-gradient(135deg, #ff9800, #ffc107); color: white;
    padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: bold;
}
.package-name { font-size: 15px; font-weight: bold; color: var(--text-dark); margin-bottom: 8px; }
.package-original { font-size: 12px; color: var(--text-light); text-decoration: line-through; margin-bottom: 4px; }
.package-price { font-size: 26px; font-weight: bold; color: var(--primary); margin-bottom: 4px; }
.package-price span { font-size: 14px; }
.package-tag {
    font-size: 11px; color: var(--primary); background: var(--primary-lighter);
    padding: 4px 10px; border-radius: 10px; margin-bottom: 12px; display: inline-block;
}
.package-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white;
    padding: 10px 25px; border-radius: 20px; font-size: 14px; font-weight: bold; cursor: pointer;
}

/* 会员须知 */
.member-rules { background: var(--bg-white); border-radius: 12px; margin: 15px; padding: 20px 15px; }
.member-rules-title { font-size: 15px; font-weight: bold; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.rule-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 13px; color: var(--text-gray); line-height: 1.5; }
.rule-icon { color: var(--primary); font-size: 16px; flex-shrink: 0; }

/* 我的页面 */
.my-header { background: linear-gradient(135deg, var(--primary), var(--primary-light)); padding: 30px 20px; color: white; }
.login-card {
    background: var(--bg-white); border-radius: 12px; padding: 20px;
    display: flex; align-items: center; gap: 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.login-logo {
    width: 60px; height: 60px; background: var(--primary-lighter); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--primary);
}
.login-info { flex: 1; }
.login-title { font-size: 18px; font-weight: bold; color: var(--text-dark); margin-bottom: 4px; }
.login-tip { font-size: 13px; color: var(--text-light); }

/* 功能菜单 */
.my-menu { padding: 15px; }
.menu-card { background: var(--bg-white); border-radius: 12px; overflow: hidden; }
.menu-item {
    display: flex; align-items: center; padding: 15px; gap: 12px;
    border-bottom: 1px solid var(--border-color); cursor: pointer; transition: background 0.3s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--bg-gray); }
.menu-icon {
    width: 40px; height: 40px; background: var(--primary-lighter); border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--primary);
}
.menu-text { flex: 1; font-size: 15px; color: var(--text-dark); }
.menu-arrow { color: var(--text-light); font-size: 18px; }

/* 推广区块 */
.promote-card { background: var(--primary-lighter); border-radius: 12px; padding: 20px 15px; margin: 15px; }
.promote-title { font-size: 16px; font-weight: bold; color: var(--primary); margin-bottom: 5px; }
.promote-subtitle { font-size: 13px; color: var(--text-gray); margin-bottom: 15px; }
.promote-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 15px; }
.promote-stat { text-align: center; background: var(--bg-white); border-radius: 10px; padding: 15px; }
.promote-stat-value { font-size: 20px; font-weight: bold; color: var(--primary); }
.promote-stat-label { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.promote-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.promote-btn { padding: 12px; border-radius: 25px; font-size: 14px; font-weight: bold; text-align: center; cursor: pointer; }
.promote-btn-copy { background: var(--primary); color: white; }
.promote-btn-save { background: var(--bg-white); color: var(--primary); }

/* 帖子详情 */
.detail-container { background: var(--bg-white); padding: 15px; }
.detail-title { font-size: 18px; font-weight: bold; line-height: 1.5; margin-bottom: 12px; }
.detail-meta { display: flex; align-items: center; gap: 15px; font-size: 12px; color: var(--text-light); margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
.detail-content { font-size: 15px; line-height: 1.8; color: var(--text-gray); margin-bottom: 20px; }
.detail-images { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 20px; }
.detail-image { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--bg-gray); }

/* 联系方式 */
.contact-section { background: var(--bg-gray); border-radius: 12px; padding: 20px 15px; margin-top: 15px; text-align: center; }
.contact-locked-icon { font-size: 50px; color: var(--text-light); margin-bottom: 15px; }
.contact-locked-title { font-size: 15px; color: var(--text-dark); margin-bottom: 8px; }
.contact-locked-desc { font-size: 13px; color: var(--text-light); margin-bottom: 15px; }
.vip-open-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white;
    padding: 12px 30px; border-radius: 25px; font-size: 15px; font-weight: bold; cursor: pointer;
}
.contact-display { display: flex; flex-direction: column; gap: 12px; }
.contact-item { display: flex; align-items: center; gap: 12px; background: var(--bg-white); padding: 12px 15px; border-radius: 10px; }
.contact-item-icon { width: 40px; height: 40px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.contact-item-info { flex: 1; }
.contact-item-label { font-size: 12px; color: var(--text-light); }
.contact-item-value { font-size: 16px; font-weight: bold; color: var(--text-dark); }

/* 登录/注册 */
.auth-page { min-height: 100vh; background: linear-gradient(135deg, var(--primary), var(--primary-light)); display: flex; flex-direction: column; }
.auth-header { text-align: center; padding: 50px 20px 30px; color: white; }
.auth-logo { font-size: 60px; margin-bottom: 15px; }
.auth-title { font-size: 26px; font-weight: bold; margin-bottom: 5px; }
.auth-card { background: var(--bg-white); border-radius: 20px 20px 0 0; padding: 25px 20px; flex: 1; }
.auth-tabs { display: flex; margin-bottom: 25px; border-bottom: 2px solid var(--border-color); }
.auth-tab { flex: 1; padding: 12px; text-align: center; font-size: 16px; font-weight: 500; color: var(--text-light); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.3s; }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-form { display: none; }
.auth-form.active { display: block; }
.verify-code-group { display: flex; gap: 10px; }
.verify-code-group .form-input { flex: 1; }
.verify-code-btn { padding: 12px 15px; background: var(--primary); color: white; border-radius: 10px; font-size: 13px; white-space: nowrap; cursor: pointer; }
.verify-code-btn:disabled { background: var(--text-light); }

/* 必看/推荐 */
.must-see-header { background: linear-gradient(135deg, #ff9800, #ffc107); color: white; padding: 20px; text-align: center; }
.must-see-title { font-size: 20px; font-weight: bold; margin-bottom: 5px; }
.must-see-subtitle { font-size: 13px; opacity: 0.9; }

/* 发布页面 */
.publish-header { background: var(--bg-white); padding: 15px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.publish-title { font-size: 17px; font-weight: bold; }
.region-select { display: flex; gap: 10px; margin-bottom: 15px; }
.region-select .form-input { flex: 1; }

/* 收藏页面 */
.favorite-card { background: var(--bg-white); border-radius: 12px; padding: 15px; margin: 0 12px 12px; display: flex; gap: 12px; }
.favorite-thumb { width: 80px; height: 80px; border-radius: 8px; background: var(--bg-gray); object-fit: cover; flex-shrink: 0; }
.favorite-info { flex: 1; min-width: 0; }
.favorite-title { font-size: 14px; font-weight: bold; margin-bottom: 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.favorite-meta { font-size: 12px; color: var(--text-light); }
.favorite-remove { color: var(--text-light); font-size: 18px; cursor: pointer; }

/* 通用 */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 64px; color: var(--text-light); margin-bottom: 15px; }
.empty-text { font-size: 14px; color: var(--text-gray); margin-bottom: 20px; }
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; }
.loading-spinner { width: 30px; height: 30px; border: 3px solid var(--border-color); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%) translateY(-20px); background: rgba(0,0,0,0.75); color: white; padding: 10px 24px; border-radius: 25px; font-size: 14px; z-index: 1000; opacity: 0; visibility: hidden; transition: all 0.3s; }
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* 后台 */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 200px; background: #2c3e50; color: white; position: fixed; height: 100vh; overflow-y: auto; }
.admin-logo { padding: 20px; text-align: center; font-size: 18px; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-menu-item { display: flex; align-items: center; padding: 12px 20px; color: rgba(255,255,255,0.7); transition: all 0.3s; gap: 10px; font-size: 14px; }
.admin-menu-item:hover, .admin-menu-item.active { background: rgba(255,255,255,0.1); color: white; }
.admin-menu-item .ion { font-size: 18px; }
.admin-main { flex: 1; margin-left: 200px; background: var(--bg-gray); min-height: 100vh; }
.admin-header { background: var(--bg-white); padding: 15px 25px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.admin-content { padding: 25px; }
.admin-card { background: var(--bg-white); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.admin-card-header { font-size: 16px; font-weight: bold; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.stat-card { background: var(--bg-white); border-radius: 12px; padding: 20px; text-align: center; }
.stat-icon { width: 50px; height: 50px; margin: 0 auto 10px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: white; }
.stat-value { font-size: 28px; font-weight: bold; margin-bottom: 5px; }
.stat-label { font-size: 13px; color: var(--text-light); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 14px; }
.admin-table th { background: var(--bg-gray); font-weight: 500; }
.admin-table tr:hover { background: var(--bg-gray); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.badge-success { background: #e8f5e9; color: #4caf50; }
.badge-warning { background: #fff3e0; color: #ff9800; }
.badge-danger { background: #ffebee; color: #f44336; }
.badge-primary { background: var(--primary-lighter); color: var(--primary); }

/* 响应式 */
@media (max-width: 768px) {
    .admin-sidebar { display: none; position: fixed; top: 0; left: 0; z-index: 10000; width: 220px; height: 100vh; overflow-y: auto; }
    .admin-sidebar.show { display: block; }
    .admin-main { margin-left: 0; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .mobile-menu-btn { display: flex !important; }
    .mobile-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 9999; }
    .mobile-overlay.show { display: block; }
    .admin-header h2 { margin-left: 50px; }
}
@media (min-width: 769px) {
    .app-container { max-width: 480px; margin: 0 auto; box-shadow: 0 0 20px rgba(0,0,0,0.1); }
}

/* 首页快捷图标 - 一行5个 */
.home-icons{display:flex!important;flex-wrap:wrap!important;gap:8px!important;padding:12px!important;justify-content:space-between!important;}
.home-icon-item{display:flex!important;flex-direction:column!important;align-items:center!important;width:calc(20% - 7px)!important;text-decoration:none!important;}
.home-icon-circle{width:44px!important;height:44px!important;border-radius:12px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:20px!important;margin-bottom:4px!important;overflow:hidden!important;}
.home-icon-circle img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:12px!important;}
.home-icon-name{font-size:11px!important;color:#333!important;white-space:nowrap!important;}