/* =========================================
   全局样式 - 城市综合服务平台 H5
   ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a56db;
    --primary-light: #eff6ff;
    --primary-dark: #1e40af;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --bg: #f3f4f6;
    --white: #ffffff;
    --border: #e5e7eb;
    --success: #059669;
    --danger: #dc2626;
    --warn: #d97706;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --tab-height: 56px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--tab-height) + 10px);
}

/* =========================================
   大字版模式 - 适老化
   ========================================= */
body.large-text {
    font-size: 18px;
}

body.large-text .news-thumb-title,
body.large-text .feed-nickname,
body.large-text .carpool-feed-route,
body.large-text .section-title,
body.large-text .detail-page-title {
    font-size: 20px;
}

body.large-text .news-thumb-summary,
body.large-text .feed-text,
body.large-text .carpool-feed-info,
body.large-text .carpool-feed-remark {
    font-size: 16px;
}

body.large-text .news-thumb-meta,
body.large-text .feed-time,
body.large-text .feed-footer,
body.large-text .carpool-feed-meta,
body.large-text .tab-item,
body.large-text .detail-page-meta {
    font-size: 14px;
}

body.large-text .tab-icon {
    font-size: 24px;
}

body.large-text .category-name {
    font-size: 14px;
}

body.large-text .btn-call,
body.large-text .btn-share {
    font-size: 16px;
    padding: 10px 18px;
}

/* 大字版切换按钮 */
.font-size-toggle {
    position: fixed;
    right: 16px;
    bottom: 260px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
    z-index: 150;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.font-size-toggle:active {
    transform: scale(0.95);
}

a {
    color: inherit;
    text-decoration: none;
}

/* 顶部搜索栏 */
.search-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary);
    padding: 10px 12px;
}

.search-bar input {
    width: 100%;
    height: 36px;
    border: none;
    border-radius: 18px;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
    background: var(--white);
}

/* 轮播图 */
.banner-section {
    position: relative;
    overflow: hidden;
    background: var(--white);
}

.swiper {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.swiper-wrapper {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
}

.swiper-slide {
    min-width: 100%;
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.banner-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 13px;
}

.banner-placeholder {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    font-size: 13px;
}

/* 快捷入口 */
.quick-nav {
    display: flex;
    justify-content: space-around;
    background: var(--white);
    padding: 16px 8px;
    margin-bottom: 8px;
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text);
}

.quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

/* 区块通用 */
.section {
    background: var(--white);
    margin-bottom: 8px;
    padding: 12px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.section-more {
    font-size: 12px;
    color: var(--primary);
}

/* 资讯列表 */
.news-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.news-item:last-child {
    border-bottom: none;
}

.news-cover {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-title {
    font-size: 14px;
    color: var(--text);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-meta {
    font-size: 11px;
    color: var(--text-lighter);
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

/* 乐乡集市列表 */
.classify-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.classify-item:last-child {
    border-bottom: none;
}

.classify-info {
    flex: 1;
}

.classify-title {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 4px;
}

.classify-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-lighter);
}

.classify-price {
    color: var(--danger);
    font-weight: 600;
}

/* 拼车列表 */
.carpool-item {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.carpool-item:last-child {
    border-bottom: none;
}

.carpool-type {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.type-person {
    background: #fef2f2;
    color: #dc2626;
}

.type-car {
    background: #eff6ff;
    color: #1a56db;
}

.carpool-route {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.carpool-route .arrow {
    color: var(--primary);
    margin: 0 6px;
}

.carpool-meta {
    font-size: 12px;
    color: var(--text-lighter);
    display: flex;
    gap: 12px;
}

.carpool-price {
    color: var(--danger);
    font-weight: 600;
}

/* 底部导航 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--tab-height);
    background: var(--white);
    display: flex;
    border-top: 1px solid var(--border);
    z-index: 200;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-lighter);
    font-size: 10px;
}

.tab-item.active {
    color: var(--primary);
}

.tab-icon {
    font-size: 20px;
}

/* 列表页通用 */
.page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header .back {
    color: white;
    font-size: 18px;
    padding: 4px;
}

.page-header h1 {
    flex: 1;
    color: white;
    font-size: 16px;
    font-weight: normal;
}

.page-header input {
    flex: 1;
    height: 34px;
    border: none;
    border-radius: 17px;
    padding: 0 14px;
    font-size: 13px;
    outline: none;
}

.page-header button {
    background: none;
    border: none;
    color: white;
    font-size: 13px;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-item {
    flex-shrink: 0;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.filter-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* 内容列表（列表页复用） */
.content-list {
    padding: 0 12px;
    background: var(--white);
}

/* 详情页 */
.detail-header {
    background: var(--white);
    padding: 16px 12px;
    margin-bottom: 8px;
}

.detail-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 10px;
}

.detail-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-lighter);
}

.detail-cover {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    display: block;
}

.detail-body {
    background: var(--white);
    padding: 16px 12px;
    margin-bottom: 8px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    word-break: break-all;
}

.detail-body img {
    max-width: 100%;
    border-radius: 6px;
    margin: 8px 0;
}

/* 评论区 */
.comment-section {
    background: var(--white);
    padding: 12px;
    margin-bottom: 60px;
}

.comment-input-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.comment-input-bar input {
    flex: 1;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0 14px;
    font-size: 13px;
    outline: none;
}

.comment-input-bar button {
    height: 36px;
    padding: 0 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 13px;
}



.comment-actions span {
    font-size: 11px;
    color: var(--text-lighter);
    cursor: pointer;
}

/* 表单 */
.form-group {
    padding: 12px;
    background: var(--white);
    margin-bottom: 1px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    background: var(--bg);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn {
    display: block;
    width: calc(100% - 24px);
    margin: 16px auto;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 22px;
    font-size: 15px;
    cursor: pointer;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text-lighter);
    font-size: 13px;
}

/* 加载中 */
.loading {
    text-align: center;
    padding: 30px 0;
    color: var(--text-lighter);
    font-size: 13px;
}

/* 辅助类 */
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.p-12 { padding: 12px; }
.bg-white { background: var(--white); }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }

/* 用户中心 */
.user-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 24px 16px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.user-info h3 {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 4px;
}

.user-info p {
    font-size: 12px;
    opacity: 0.8;
}

.user-stats {
    display: flex;
    background: var(--white);
    padding: 14px 0;
    margin-bottom: 8px;
}

.user-stat {
    flex: 1;
    text-align: center;
    border-right: 1px solid var(--border);
}

.user-stat:last-child {
    border-right: none;
}

.user-stat .num {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.user-stat .label {
    font-size: 11px;
    color: var(--text-lighter);
    margin-top: 2px;
}

/* 功能菜单 */
.menu-list {
    background: var(--white);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item .icon {
    font-size: 20px;
    margin-right: 10px;
    width: 24px;
    text-align: center;
}

.menu-item .text {
    flex: 1;
    font-size: 14px;
}

.menu-item .arrow {
    color: var(--text-lighter);
    font-size: 14px;
}

.menu-item .badge {
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 16px;
    font-size: 13px;
}

.pagination button {
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: white;
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .current {
    color: var(--primary);
    font-weight: 600;
}

/* 登录页 */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-logo {
    font-size: 64px;
    margin-bottom: 16px;
}

.login-title {
    color: white;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 32px;
}

.login-box {
    width: 100%;
    background: white;
    border-radius: 16px;
    padding: 24px;
}

.login-box h2 {
    font-size: 18px;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text);
}

.login-box input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 14px;
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
}

.login-box input:focus {
    border-color: var(--primary);
}

.login-btn {
    width: 100%;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    cursor: pointer;
    margin-top: 4px;
}

.login-tip {
    text-align: center;
    font-size: 12px;
    color: var(--text-lighter);
    margin-top: 16px;
}

.agreement {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-lighter);
    margin-top: 12px;
}

.agreement input {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
}

/* 图片上传 */
.upload-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.upload-item {
    width: 80px;
    height: 80px;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-lighter);
    cursor: pointer;
    position: relative;
}

.upload-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.upload-item .remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* =========================================
   信息流样式 - 悦读/乐乡集市/拼车
   ========================================= */

/* 首页悦读推荐 - 特色展示 */
.news-featured-item {
    display: block;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.news-featured-cover {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.news-featured-content {
    padding: 12px;
}

.news-featured-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-featured-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-lighter);
    margin-top: 8px;
}

/* 信息流列表 - 通用卡片 */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feed-item {
    display: block;
    background: var(--white);
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.feed-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.feed-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
    flex-shrink: 0;
}

.feed-user-info {
    flex: 1;
    min-width: 0;
}

.feed-nickname {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.feed-category {
    font-size: 11px;
    color: var(--text-lighter);
    margin-top: 2px;
}

.feed-time {
    font-size: 11px;
    color: var(--text-lighter);
    flex-shrink: 0;
}

.feed-body {
    margin-bottom: 10px;
}

.feed-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    margin-bottom: 8px;
}

.feed-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.feed-image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.feed-image-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
}

.feed-image-grid.single img {
    grid-column: span 1;
    max-width: 200px;
}

.feed-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-lighter);
}

.feed-price {
    color: var(--danger);
    font-weight: 600;
    font-size: 14px;
}

/* 拨打电话按钮 */
.btn-call {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.btn-call:active {
    opacity: 0.9;
}

/* 拼车文字列表 - 首页用 */
.carpool-text-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.carpool-text-item {
    display: block;
    background: var(--white);
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.carpool-text-main {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.carpool-type-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    flex-shrink: 0;
}

.carpool-route-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.carpool-text-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-lighter);
}

/* 发布按钮 - 悬浮 */
.btn-publish {
    position: fixed;
    bottom: 76px;
    right: 16px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(26,86,219,0.35);
    z-index: 150;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-publish:active {
    transform: scale(0.95);
}

/* 分享按钮 */
.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.btn-share:active {
    background: #dbeafe;
}

/* 相关推荐 */
.related-section {
    background: var(--white);
    padding: 12px;
    margin-top: 8px;
}

.related-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 3px solid var(--primary);
}

/* 详情页头部信息 */
.detail-author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--white);
    margin-bottom: 8px;
}

.detail-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--primary);
    font-weight: 500;
}

.detail-author-info {
    flex: 1;
}

.detail-author-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.detail-author-meta {
    font-size: 12px;
    color: var(--text-lighter);
    margin-top: 2px;
}

/* 信息流页面专用 */
.feed-page .content-list {
    padding: 8px 12px;
    background: var(--bg);
    min-height: calc(100vh - 100px);
}

/* 分类筛选栏优化 */
.filter-bar {
    display: flex;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 4px;
}

.filter-item {
    flex-shrink: 0;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
}

.filter-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 500;
}

/* 二级分类标签 */
.subcategory-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.subcategory-item {
    padding: 6px 14px;
    background: var(--bg);
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
    border: 1px solid transparent;
}

.subcategory-item.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

/* 底部操作栏 */
.detail-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 8px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    z-index: 100;
}

.detail-actions .btn-call {
    flex: 1;
    justify-content: center;
    height: 40px;
}

.detail-actions .btn-share {
    height: 40px;
}

/* =========================================
   首页分类图标网格
   ========================================= */
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 16px 12px;
    background: var(--white);
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.category-name {
    font-size: 12px;
    color: var(--text);
}

/* =========================================
   拼车专用样式
   ========================================= */

/* 拼车信息流卡片 */
.carpool-feed-item {
    display: block;
    background: var(--white);
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    position: relative;
}

.carpool-feed-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.carpool-top-tag {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #dc2626;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.carpool-feed-type {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.carpool-feed-route {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.carpool-feed-route .arrow {
    color: var(--primary);
    font-size: 14px;
}

.carpool-feed-via {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
    padding-left: 4px;
}

.carpool-feed-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.carpool-feed-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.carpool-feed-remark {
    font-size: 13px;
    color: var(--text-light);
    background: var(--bg);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    line-height: 1.5;
}

.carpool-feed-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carpool-feed-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.carpool-feed-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--primary);
}

.carpool-feed-meta {
    font-size: 12px;
    color: var(--text-lighter);
}

/* 热门线路 */
.hot-routes {
    background: var(--white);
    padding: 16px 12px;
    margin-bottom: 8px;
}

.hot-routes-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.hot-route-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-route-tag {
    padding: 6px 14px;
    background: var(--bg);
    border-radius: 16px;
    font-size: 13px;
    color: var(--text);
    border: 1px solid var(--border);
}

/* 悬浮分享按钮 */
.float-share-btn {
    position: fixed;
    right: 16px;
    bottom: 140px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(245,158,11,0.35);
    z-index: 150;
    border: none;
    cursor: pointer;
}

/* 客服按钮 */
.float-service-btn {
    position: fixed;
    right: 16px;
    bottom: 200px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(16,185,129,0.35);
    z-index: 150;
    border: none;
    cursor: pointer;
}

/* 详情页内容样式 */
.detail-content-section {
    background: var(--white);
    padding: 16px 12px;
    margin-bottom: 8px;
}

.detail-content-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
}

.detail-content-text img {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}

.detail-image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.detail-image-gallery img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
}

.detail-image-gallery.single {
    grid-template-columns: 1fr;
}

.detail-image-gallery.single img {
    max-height: 300px;
}

/* 悦读缩略图列表 */
.news-thumb-item {
    display: flex;
    gap: 12px;
    background: var(--white);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.news-thumb-image {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.news-thumb-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-thumb-title {
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-thumb-summary {
    font-size: 11px;
    color: var(--text-lighter);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    margin-bottom: 6px;
}

.news-thumb-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-lighter);
}

/* 详情页头部 */
.detail-page-header {
    background: var(--white);
    padding: 16px 12px;
    margin-bottom: 8px;
}

.detail-page-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 12px;
}

.detail-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-lighter);
}

/* 相关推荐列表 */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: var(--bg);
    border-radius: 8px;
}

.related-item img {
    width: 70px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.related-item-title {
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-item-meta {
    font-size: 11px;
    color: var(--text-lighter);
    margin-top: 4px;
}

/* =========================================
   评论区样式
   ========================================= */

/* 评论区容器 */
.comment-section {
    background: var(--white);
    margin-top: 8px;
    padding: 16px 12px;
}

.comment-section-header {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    padding-left: 8px;
    border-left: 3px solid var(--primary);
}

/* 评论输入框 */
.comment-input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.comment-input-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
    flex-shrink: 0;
}

.comment-input-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-input {
    width: 100%;
    min-height: 60px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.comment-input:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-input-tip {
    font-size: 11px;
    color: var(--text-lighter);
    text-align: right;
}

.comment-submit {
    align-self: flex-end;
    padding: 6px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.comment-submit:active {
    opacity: 0.9;
}

.comment-submit:disabled {
    background: var(--text-lighter);
    cursor: not-allowed;
}

/* 评论容器 */
.comment-section {
    background: var(--white);
    padding: 14px;
    margin-bottom: 6px;
}

/* 评论列表 */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 10px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-nickname {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

.comment-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 6px;
    word-break: break-all;
}

.comment-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-lighter);
}

.comment-action {
    background: none;
    border: none;
    color: var(--text-lighter);
    font-size: 11px;
    cursor: pointer;
    padding: 0;
}

.comment-action:active {
    color: var(--primary);
}

.comment-like-btn {
    display: flex;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--text-lighter);
    font-size: 11px;
    cursor: pointer;
    padding: 0;
}

.comment-like-btn.liked {
    color: var(--danger);
}

/* 回复列表 */
.comment-replies {
    margin-top: 10px;
    padding-left: 10px;
    border-left: 2px solid var(--border);
}

.comment-reply-item {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.comment-reply-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--primary);
    font-weight: 500;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-reply-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.comment-reply-content {
    flex: 1;
    min-width: 0;
}

.comment-reply-nickname {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 2px;
}

.comment-reply-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    word-break: break-all;
}

.comment-reply-meta {
    display: flex;
    gap: 10px;
    font-size: 10px;
    color: var(--text-lighter);
    margin-top: 4px;
}

/* 加载更多按钮 */
.comment-load-more {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--bg);
    border: none;
    border-radius: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 16px;
}

.comment-load-more:active {
    background: var(--primary-light);
}

.comment-empty {
    text-align: center;
    padding: 30px 0;
    color: var(--text-lighter);
    font-size: 13px;
}

/* 评论审核提示 */
.comment-pending-tip {
    text-align: center;
    padding: 8px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

/* 相关推荐 */
.related-section {
    background: var(--white);
    padding: 14px;
    margin-bottom: 6px;
}

.related-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 6px;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    min-width: 0;
    border-radius: 0;
}

.related-item:last-child {
    border-bottom: none;
}

.related-tag {
    font-size: 11px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--primary-light);
    color: var(--primary);
    flex-shrink: 0;
    white-space: nowrap;
}

.related-title-text {
    flex: 1;
    font-size: 14px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.related-time {
    font-size: 12px;
    color: var(--text-lighter);
    flex-shrink: 0;
    white-space: nowrap;
}

/* 拼车路线换行 */
.related-item-carpool {
    align-items: flex-start;
}

.related-route-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 4px;
}

.related-route-part {
    font-size: 14px;
    color: var(--text);
    word-break: break-all;
    max-width: 100%;
}

.related-route-arrow {
    font-size: 14px;
    color: var(--primary);
    flex-shrink: 0;
    padding: 0 2px;
}

/* 拼车相关推荐保留图片样式 */
.related-item img {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg);
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-info .r-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-info .r-meta {
    font-size: 11px;
    color: var(--text-lighter);
    margin-top: 4px;
}
