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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 20px;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 18px 16px;
    text-align: center;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.logo {
    font-size: 20px;
    font-weight: 700;
}
.subtitle {
    font-size: 13px;
    opacity: 0.85;
}

/* 导航标签 */
.tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}
.tab {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}
.tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

/* 页面容器 */
.page {
    display: none;
    padding: 12px;
}
.page.active {
    display: block;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.search-bar input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}
.search-bar input:focus {
    border-color: #667eea;
}
.search-bar select {
    padding: 10px 6px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 12px;
    background: #fff;
    outline: none;
    min-width: 100px;
}

/* 帖子卡片 */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.post-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.post-card:active {
    transform: scale(0.98);
}
.post-card .type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}
/* 类型颜色 */
.post-card .type-badge.house {
    background: #e3f2fd;
    color: #1976d2;
}
.post-card .type-badge.carpool {
    background: #e8f5e9;
    color: #2e7d32;
}
.post-card .type-badge.business {
    background: #fff3e0;
    color: #e65100;
}
.post-card .type-badge.outdoor {
    background: #f3e5f5;
    color: #7b1fa2;
}
.post-card .type-badge.default {
    background: #f5f5f5;
    color: #666;
}

.post-card .route {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}
.post-card .route .arrow {
    color: #999;
    margin: 0 6px;
}
.post-card .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}
.post-card .meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}
.post-card .price-tag {
    color: #e53935;
    font-weight: 700;
    font-size: 15px;
}
.post-card .price-tag.free {
    color: #43a047;
}
.post-card .remark {
    font-size: 13px;
    color: #777;
    margin-top: 6px;
    padding: 6px 10px;
    background: #fafafa;
    border-radius: 6px;
}

/* 发布表单 */
.publish-form {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
}
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #667eea;
}
.form-row {
    display: flex;
    gap: 10px;
}
.form-group.half {
    flex: 1;
}

/* 类型字段组 */
.type-fields {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-submit:active {
    opacity: 0.85;
}
.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 我的发布 */
.mine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.mine-header h3 {
    font-size: 16px;
}
.mine-header small {
    color: #999;
}

/* 空状态 */
.empty-state, .loading {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 14px;
}

/* 模态弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    justify-content: center;
    align-items: center;
}
.modal.active {
    display: flex;
}
.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    width: 92%;
    max-width: 440px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

/* 详情类型标签 */
.detail-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}
.detail-type.house {
    background: #e3f2fd;
    color: #1976d2;
}
.detail-type.carpool {
    background: #e8f5e9;
    color: #2e7d32;
}
.detail-type.business {
    background: #fff3e0;
    color: #e65100;
}
.detail-type.outdoor {
    background: #f3e5f5;
    color: #7b1fa2;
}

.detail-route {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}
.detail-route .arrow {
    color: #999;
    margin: 0 8px;
}
.detail-info {
    margin-bottom: 14px;
}
.detail-info .row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.detail-info .row .label {
    color: #999;
}
.detail-info .row .value {
    font-weight: 500;
}
.detail-phone {
    display: block;
    text-align: center;
    padding: 12px;
    background: #667eea;
    color: #fff;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 14px;
}
.detail-remark {
    background: #fafafa;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    margin-top: 12px;
}

/* 删除按钮 */
.btn-delete {
    width: 100%;
    padding: 12px;
    background: #ff5252;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

/* 卡片顶部时间行 */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.post-card .time-tag {
    font-size: 11px;
    color: #aaa;
}

/* 每日发布计数 */
.daily-counter {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: #999;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 16px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}
.footer a {
    color: #999;
    font-size: 13px;
    text-decoration: none;
}

/* 已关闭状态 */
.post-card .closed-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #eee;
    color: #999;
    margin-bottom: 8px;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    max-width: 80%;
    text-align: center;
    animation: fadeIn 0.2s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}
