* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; color: #333; -webkit-font-smoothing: antialiased; }

/* Header - Outdoor Green Theme */
.page-header { position: fixed; top: 0; left: 0; right: 0; height: 50px; background: linear-gradient(135deg, var(--theme, #43a047), var(--theme-dark, #1b5e20)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.theme-picker { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.theme-btn { cursor: pointer; font-size: 20px; }
.theme-colors { position: absolute; top: 100%; right: 0; margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; width: 120px; background: rgba(255,255,255,0.95); padding: 8px; border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.theme-color { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform 0.15s; }
.theme-color.active { border-color: #333; transform: scale(1.2); }
.theme-color:hover { transform: scale(1.15); }
.header-back { position: absolute; left: 12px; font-size: 22px; cursor: pointer; padding: 4px 8px; }

/* Tab Bar */
.tab-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid #e0e0e0; z-index: 100; padding-bottom: 3px; }
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: #999; transition: color 0.2s; }
.tab-item.active { color: var(--theme, #43a047); }
.tab-icon { font-size: 22px; line-height: 1; }
.tab-label { font-size: 11px; margin-top: 2px; }

/* Login Overlay - Outdoor Fresh Theme */
.login-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.login-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: url('/api/login-bg.jpg') center/cover no-repeat; filter: brightness(0.9); }
.login-bg::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, rgba(13,71,161,0.3) 0%, rgba(0,0,0,0.4) 100%); }
.login-box { position: relative; background: rgba(255,255,255,0.6); backdrop-filter: blur(20px); border-radius: 20px; padding: 36px 28px; width: 88%; max-width: 380px; text-align: center; box-shadow: 0 25px 80px rgba(0,0,0,0.5); }
.login-logo { font-size: 56px; margin-bottom: 4px; }
.login-title { font-size: 26px; font-weight: 700; background: linear-gradient(135deg, var(--theme, #2e7d32), var(--theme-dark, #1b5e20)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 4px; }
.login-desc { font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 24px; }
.login-more { margin-top: 14px; font-size: 13px; color: rgba(255,255,255,0.6); cursor: pointer; }
.login-more:hover { text-decoration: underline; }
.login-tabs { display: flex; margin-bottom: 20px; border-radius: 10px; overflow: hidden; border: 1px solid #c8e6c9; }
.login-tabs span { flex: 1; padding: 10px; font-size: 14px; cursor: pointer; color: #666; background: #f1f8e9; transition: all 0.2s; }
.login-tabs span.active { background: linear-gradient(135deg, var(--theme, #43a047), var(--theme-dark, #2e7d32)); color: #fff; font-weight: 600; }
.login-input { width: 100%; padding: 14px 16px; border: 2px solid #e0e0e0; border-radius: 12px; font-size: 15px; outline: none; transition: all 0.2s; margin-bottom: 16px; background: #fff; color: #333; }
.login-input::placeholder { color: #999; }
.login-input:focus { border-color: var(--theme, #43a047); box-shadow: 0 0 0 3px rgba(67,160,71,0.15); }
.login-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, var(--theme, #43a047), var(--theme-dark, #2e7d32)); color: #fff; border: none; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; transition: all 0.2s; letter-spacing: 1px; }
.login-btn:active { transform: scale(0.98); opacity: 0.9; }

/* Common */
.page-body { min-height: calc(100vh - 55px); }
.page { padding: 16px; }
.card { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.card-meta { font-size: 12px; color: #999; margin-top: 6px; display: flex; gap: 12px; }
.empty-state { text-align: center; padding: 60px 20px; color: #ccc; }
.empty-state .icon { font-size: 60px; margin-bottom: 12px; }
.empty-state .text { font-size: 15px; }

/* Buttons */
.btn { display: inline-block; padding: 10px 24px; border-radius: 8px; font-size: 15px; font-weight: 500; border: none; cursor: pointer; transition: opacity 0.2s; text-align: center; }
.btn:active { opacity: 0.8; }
.btn-primary { background: linear-gradient(135deg, var(--theme, #43a047), var(--theme-dark, #2e7d32)); color: #fff; }
.btn-danger { background: #e53935; color: #fff; }
.btn-outline { background: #fff; color: #1a73e8; border: 2px solid #1a73e8; }
.btn-small { padding: 4px 10px; font-size: 11px; }
.btn-block { display: block; width: 100%; }
.btn-group { display: flex; gap: 10px; margin-top: 12px; }
.btn-group .btn { flex: 1; }

/* Form */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 500; color: #666; margin-bottom: 6px; }
.form-input { width: 100%; padding: 12px 14px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 15px; outline: none; transition: border-color 0.2s; }
.form-input:focus { border-color: #1a73e8; }
.form-textarea { width: 100%; padding: 12px 14px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 15px; outline: none; resize: vertical; min-height: 80px; font-family: inherit; transition: border-color 0.2s; }
.form-textarea:focus { border-color: #1a73e8; }
.form-select { width: 100%; padding: 12px 14px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 15px; outline: none; background: #fff; transition: border-color 0.2s; }
.form-select:focus { border-color: #1a73e8; }

/* Home Page */
.home-hero { background: linear-gradient(135deg, var(--theme, #43a047), var(--theme-dark, #1b5e20)); margin: -16px -16px 16px; padding: 30px 20px; color: #fff; text-align: center; }
.home-hero h2 { font-size: 22px; margin-bottom: 6px; }
.home-hero p { font-size: 14px; opacity: 0.85; }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.quick-action { background: #fff; border-radius: 12px; padding: 16px 8px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06); cursor: pointer; transition: transform 0.15s; }
.quick-action:active { transform: scale(0.95); }
.quick-action .icon { font-size: 28px; margin-bottom: 4px; }
.theme-icon { color: var(--theme-dark, #2e7d32); }
.quick-action .label { font-size: 12px; color: #666; }

/* Spot Card */
.spot-name { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.spot-address { font-size: 13px; color: #999; margin-bottom: 6px; }
.spot-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.spot-tag { background: var(--theme-light, #e8f5e9); color: var(--theme-dark, #2e7d32); padding: 3px 10px; border-radius: 12px; font-size: 12px; }

/* Record */
.record-fish { font-size: 18px; font-weight: 600; color: var(--theme-dark, #2e7d32); }
.record-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.record-detail-item { font-size: 13px; color: #666; }
.record-detail-item strong { color: #333; }

/* Tackle */
.tackle-name { font-size: 16px; font-weight: 600; }
.tackle-info { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 6px; font-size: 13px; color: #666; }

/* Post */
.post-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.post-content { font-size: 14px; color: #555; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-stats { display: flex; gap: 16px; font-size: 12px; color: #999; margin-top: 8px; }
.post-stats span { display: flex; align-items: center; gap: 3px; }

/* Profile */
.profile-header { text-align: center; padding: 24px 16px; background: #fff; border-radius: 12px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.profile-avatar { margin-bottom: 8px; }
.profile-avatar img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid #e8f5e9; }
.profile-name { font-size: 20px; font-weight: 600; }
.profile-meta { font-size: 13px; color: #999; margin-top: 4px; }
.profile-stats { display: flex; justify-content: center; gap: 36px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0f0f0; }
.profile-stat { text-align: center; cursor: pointer; }
.profile-stat .num { font-size: 20px; font-weight: 700; color: var(--theme, #2e7d32); }
.profile-stat .label { font-size: 12px; color: #999; margin-top: 2px; }
.profile-actions { margin-top: 10px; }
.menu-card { cursor: pointer; font-size: 15px; color: #333; padding: 14px 16px; }
.menu-card:active { background: #f5f5f5; }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 300; display: flex; align-items: center; justify-content: center; }
.modal-content { background: #fff; border-radius: 16px; width: 94%; max-width: 680px; max-height: 85vh; overflow-y: auto; padding: 24px 20px; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; text-align: center; }
.modal-close { position: absolute; top: 12px; right: 16px; font-size: 24px; cursor: pointer; color: #999; }

/* Toast */
.toast { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.8); color: #fff; padding: 10px 24px; border-radius: 20px; font-size: 14px; z-index: 500; animation: fadeIn 0.2s; pointer-events: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Loading */
.loading { text-align: center; padding: 40px; color: #999; font-size: 14px; }
.spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid #e0e0e0; border-top-color: var(--theme, #43a047); border-radius: 50%; animation: spin 0.6s linear infinite; margin-bottom: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Section Title */
.section-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.section-more { font-size: 13px; color: #1a73e8; cursor: pointer; }

/* pagination */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 16px 0; }
.page-btn { padding: 6px 14px; border: 1px solid #e0e0e0; border-radius: 6px; font-size: 13px; cursor: pointer; background: #fff; color: #333; }
.page-btn.active { background: var(--theme, #43a047); color: #fff; border-color: var(--theme, #43a047); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Search */
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-input { flex: 1; padding: 10px 14px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 14px; outline: none; }
.search-input:focus { border-color: #1a73e8; }

/* Tag filters */
.tag-filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 12px; }
.tag-filter { padding: 6px 16px; border-radius: 16px; font-size: 13px; white-space: nowrap; cursor: pointer; background: #f0f0f0; color: #666; }
.tag-filter.active { background: var(--theme, #1a73e8); color: #fff; }

/* Map */
.home-map-wrap { margin: 0; height: calc(100vh - 110px); position: relative; overflow: hidden; border-radius: 0; }
.home-map-wrap .home-hero { position: absolute; bottom: 0; left: 0; right: 0; z-index: 10; margin: 0; padding: 12px 20px; background: linear-gradient(transparent, rgba(0,0,0,0.6)); }
.home-map-wrap .home-hero h2 { font-size: 18px; }
.home-map-wrap .home-hero p { font-size: 12px; }
#home-map { width: 100%; height: 100%; }
.map-fullscreen-btn { position: absolute; top: 8px; right: 8px; z-index: 20; background: rgba(255,255,255,0.9); border: none; border-radius: 6px; padding: 0; font-size: 18px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; }
.map-fullscreen-btn:hover { background: #fff; }
.map-locate-btn { position: absolute; top: 46px; right: 8px; z-index: 20; background: rgba(255,255,255,0.9); border: none; border-radius: 6px; padding: 0; font-size: 18px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; }
.map-locate-btn:hover { background: #fff; }
.map-add-spot-btn { position: absolute; bottom: 68px; right: 8px; z-index: 100; background: rgba(255,255,255,0.9); border: none; border-radius: 6px; padding: 0; font-size: 18px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; }
.map-add-spot-btn:hover { background: #fff; }

.map-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 999; display: flex; align-items: center; justify-content: center; }
.map-modal-content { background: #fff; width: 100vw; height: 100vh; display: flex; flex-direction: column; border-radius: 0; overflow: hidden; }
.map-modal-header { display: flex; align-items: center; padding: 10px 16px; border-bottom: 1px solid #e0e0e0; flex-shrink: 0; }
.map-modal-header span { flex: 1; font-weight: bold; font-size: 16px; }
.map-modal-close { background: none; border: none; font-size: 24px; cursor: pointer; padding: 4px 10px; color: #666; }
.map-modal-body { flex: 1; position: relative; min-height: 0; }
#home-map-fullscreen { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }

/* Floating action button */
.fab { position: fixed; bottom: 72px; right: 20px; width: 52px; height: 52px; background: linear-gradient(135deg, var(--theme, #43a047), var(--theme-dark, #2e7d32)); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 4px 16px rgba(67,160,71,0.4); cursor: pointer; z-index: 50; transition: transform 0.15s; }
.fab:active { transform: scale(0.9); }

/* Responsive - 正常网页比例 */
#app { max-width: 100%; margin: 0 auto; min-height: 100vh; background: #f5f5f5; }
@media (min-width: 1200px) {
    #app { max-width: 960px; }
}

/* Post detail */
.post-full-content { font-size: 15px; line-height: 1.8; color: #333; white-space: pre-wrap; }
.detail-header { margin-bottom: 16px; }
.detail-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.detail-meta { font-size: 13px; color: #999; display: flex; gap: 16px; }

/* Admin tab buttons */
.tab-btn { padding: 6px 14px; border-radius: 16px; font-size: 13px; cursor: pointer; background: #f0f0f0; color: #666; transition: all 0.2s; white-space: nowrap; }
.tab-btn.active { background: var(--theme, #43a047); color: #fff; }
.tab-btn:hover { opacity: 0.8; }

/* Profile bio & tags */
.profile-bio { font-size: 13px; color: #888; margin-top: 6px; max-width: 80%; margin-left: auto; margin-right: auto; }
.profile-tags { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.tag { background: var(--theme-light, #e8f5e9); color: var(--theme-dark, #2e7d32); padding: 2px 10px; border-radius: 12px; font-size: 12px; }

/* Media Grid - image/video thumbnails, exactly 5 per row */
.media-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 8px; }
.media-grid .media-thumb { width: 100%; aspect-ratio: 1; border-radius: 6px; object-fit: cover; cursor: pointer; border: 1px solid #eee; background: #f5f5f5; transition: transform 0.15s; }
.media-grid .media-thumb:hover { transform: scale(1.05); }
.media-grid .media-video { width: 100%; aspect-ratio: 1; border-radius: 6px; object-fit: cover; cursor: pointer; border: 1px solid #eee; background: #000; }
.media-grid-lg { grid-template-columns: repeat(3, 1fr); }

.card-actions { display: flex; gap: 14px; margin-top: 8px; font-size: 13px; color: #888; }
.card-actions span { display: flex; align-items: center; gap: 3px; }
.post-time { margin-left: auto !important; }
.tackle-desc { font-size: 13px; color: #666; line-height: 1.5; margin-top: 6px; }

/* Fullscreen image viewer */
.img-viewer-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.92); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.img-viewer-overlay img { max-width: 95vw; max-height: 90vh; border-radius: 4px; cursor: pointer; }
.img-viewer-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; background: rgba(255,255,255,0.2); color: #fff; border: none; border-radius: 50%; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 1001; }

/* ===== Chat System (WeChat Style) ===== */

/* Conversation List */
.wx-search-bar { background: #ededed; padding: 8px 12px; }
.wx-search-input { background: #fff; border-radius: 6px; display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 14px; color: #999; }
.wx-empty { text-align: center; padding: 60px 0; color: #999; font-size: 14px; }
.wx-empty div { margin-top: 12px; }
.wx-conv-list { background: #fff; }
.wx-conv-item { display: flex; align-items: center; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid #f0f0f0; position: relative; overflow: hidden; }
.wx-conv-item:active { background: #ececec; }
.wx-conv-avatar { width: 48px; height: 48px; border-radius: 6px; overflow: hidden; flex-shrink: 0; margin-right: 12px; }
.wx-conv-avatar img { width: 48px; height: 48px; object-fit: cover; }
.wx-conv-avatar-text { width: 48px; height: 48px; border-radius: 6px; background: #07c160; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; }
.wx-conv-body { flex: 1; min-width: 0; overflow: hidden; }
.wx-conv-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.wx-conv-name { font-size: 16px; color: #191919; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.wx-conv-time { font-size: 12px; color: #b0b0b0; flex-shrink: 0; }
.wx-conv-bottom { display: flex; justify-content: space-between; align-items: center; }
.wx-conv-preview { font-size: 13px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.wx-conv-badge { background: #f55050; color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; font-weight: 600; flex-shrink: 0; margin-left: 8px; }
.wx-conv-actions { display: flex; gap: 4px; margin-left: 6px; flex-shrink: 0; }
.wx-conv-actions .wx-act-btn { }
@media (hover: none) {
    .wx-conv-actions { position: static; display: flex; margin-left: auto; }
    .wx-conv-actions .wx-act-btn { }
}
.wx-act-btn { width: 26px; height: 26px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #aaa; background: #f5f5f5; }
.wx-act-btn:active { opacity: 0.7; }
.wx-act-del:active { background: #f55050; color: #fff; }
.wx-hidden-bar { text-align: center; padding: 12px; font-size: 13px; color: #07c160; cursor: pointer; background: #f9f9f9; border-top: 1px solid #eee; }
.wx-hidden-list { padding: 0 16px; background: #fff; }
.wx-hidden-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.wx-hidden-name { font-size: 14px; color: #666; }
.wx-load-more { text-align: center; padding: 12px; font-size: 13px; color: #576b95; cursor: pointer; }

/* Chat Room */
.wx-chat-header { background: #ededed; display: flex; align-items: center; padding: 10px 12px; border-bottom: 1px solid #d9d9d9; flex-shrink: 0; height: 44px; }
.wx-chat-back { cursor: pointer; font-size: 18px; color: #333; padding-right: 12px; }
.wx-chat-title { flex: 1; text-align: center; font-size: 17px; font-weight: 500; color: #191919; }
.wx-chat-menu { cursor: pointer; font-size: 14px; color: #333; padding-left: 12px; }
.chat-room { padding: 0 !important; display: flex !important; flex-direction: column !important; height: calc(100vh - 50px); max-height: calc(100vh - 50px); background: #ededed; }
.chat-msg-area { flex: 1; overflow-y: auto; padding: 8px 12px; background: #ededed; -webkit-overflow-scrolling: touch; }
.chat-msg-row { display: flex; margin-bottom: 12px; align-items: flex-start; }
.chat-msg-left { flex-direction: row; }
.chat-msg-right { flex-direction: row-reverse; }
.chat-msg-avatar { width: 36px; height: 36px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.chat-msg-left .chat-msg-avatar { margin-right: 8px; }
.chat-msg-right .chat-msg-avatar { margin-left: 8px; }
.chat-msg-avatar img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; }
.chat-msg-avatar-text { width: 36px; height: 36px; border-radius: 4px; background: #07c160; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; }
.chat-msg-right .chat-msg-avatar-text { background: #576b95; }
.chat-msg-body { max-width: 70%; min-width: 40px; }
.chat-bubble { padding: 9px 12px; border-radius: 4px; font-size: 15px; line-height: 1.45; word-break: break-word; position: relative; display: inline-block; max-width: 100%; }
.chat-msg-left .chat-bubble { background: #fff; color: #333; }
.chat-msg-right .chat-bubble { background: #95ec69; color: #000; }
.chat-msg-left .chat-bubble::after { content: ''; position: absolute; left: -5px; top: 12px; width: 0; height: 0; border: 5px solid transparent; border-right-color: #fff; border-left: 0; }
.chat-msg-right .chat-bubble::after { content: ''; position: absolute; right: -5px; top: 12px; width: 0; height: 0; border: 5px solid transparent; border-left-color: #95ec69; border-right: 0; }
.chat-bubble-img { padding: 3px; background: #fff !important; }
.chat-bubble-img img { max-width: 180px; max-height: 180px; border-radius: 4px; cursor: pointer; display: block; }
.chat-bubble-video { padding: 3px; position: relative; cursor: pointer; }
.chat-bubble-video video { max-width: 180px; max-height: 180px; border-radius: 4px; display: block; background: #000; }
.chat-bubble-video-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 36px; height: 36px; background: rgba(0,0,0,0.4); border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.chat-bubble-revoked { background: transparent !important; color: #b0b0b0 !important; font-size: 13px; text-align: center; padding: 6px 12px; border: none; }
.chat-bubble-revoked::after { display: none !important; }
.chat-time-divider { text-align: center; padding: 10px 0; font-size: 12px; color: #b0b0b0; margin: 0; }

/* Input Bar */
.chat-input-bar { background: #f7f7f7; border-top: 1px solid #e0e0e0; padding: 6px 12px; flex-shrink: 0; }
.chat-tools { display: flex; gap: 18px; margin-bottom: 6px; }
.chat-tool-btn { cursor: pointer; color: #666; display: flex; align-items: center; }
.chat-input-row { display: flex; gap: 8px; align-items: center; }
.chat-input { flex: 1; border: none; background: #fff; border-radius: 6px; padding: 10px 12px; font-size: 15px; outline: none; }
.chat-send-btn { background: #07c160; color: #fff; border: none; border-radius: 6px; padding: 8px 18px; font-size: 14px; cursor: pointer; }
.chat-send-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.emoji-panel { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 0; max-height: 150px; overflow-y: auto; }
.emoji-item { font-size: 22px; cursor: pointer; padding: 4px; }

/* Friends Feed */
.feed-item { padding: 14px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.feed-item:last-child { border-bottom: none; }
.feed-item:active { background: #f8f8f8; margin: 0 -16px; padding: 14px 16px; }
.feed-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.feed-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--theme, #43a047); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; flex-shrink: 0; }
.feed-user { flex: 1; min-width: 0; }
.feed-nickname { font-size: 14px; font-weight: 500; color: #333; }
.feed-time { font-size: 11px; color: #bbb; margin-top: 1px; }
.feed-type-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; flex-shrink: 0; }
.tag-record { background: var(--theme-light, #e8f5e9); color: var(--theme-dark, #2e7d32); }
.tag-post { background: var(--theme-light, #e3f2fd); color: var(--theme-dark, #1565c0); }
.feed-body { padding-left: 46px; }
.feed-title { font-size: 15px; font-weight: 500; color: #222; margin-bottom: 4px; }
.feed-content { font-size: 13px; color: #666; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; }
.feed-img { max-width: 100%; max-height: 200px; border-radius: 8px; margin-top: 4px; }

/* Visibility toggle */
.form-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.form-label-row .form-label { margin-bottom: 0; }
.vis-toggle { font-size: 11px; padding: 3px 8px; border-radius: 10px; cursor: pointer; transition: all 0.2s; user-select: none; }
.vis-toggle:active { opacity: 0.7; }
.vis-public { background: var(--theme-light, #e8f5e9); color: var(--theme-dark, #2e7d32); }
.vis-friends { background: #e3f2fd; color: #1565c0; }
.vis-private { background: #fce4ec; color: #c62828; }

/* Content visibility selector */
.vis-selector { display: flex; gap: 6px; flex-wrap: wrap; }
.vis-option { padding: 6px 14px; border-radius: 16px; font-size: 13px; cursor: pointer; border: 1px solid #e0e0e0; background: #fff; color: #666; transition: all 0.2s; }
.vis-option.active { border-color: var(--theme, #43a047); background: var(--theme-light, #e8f5e9); color: var(--theme-dark, #2e7d32); font-weight: 500; }

/* Revoked Message - centered */
.chat-msg-revoked{text-align:center;padding:8px 0}
.chat-msg-revoked-time{font-size:10px;color:#b0b0b0;margin-bottom:2px}
.chat-msg-revoked-text{font-size:12px;color:#b0b0b0}

/* Theme-aware icons */
.theme-icon svg, .theme-icon { color: var(--theme-dark, #2e7d32); }
.empty-state .icon svg { color: #ccc; }
.empty-state .icon.theme-icon svg { color: var(--theme-dark, #2e7d32); }

/* Slider Captcha */
.slider-captcha { margin-bottom: 8px; }
.slider-track { position: relative; height: 38px; background: #e8e8e8; border-radius: 19px; overflow: hidden; }
.slider-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 19px; transition: width 0.15s; }
.slider-thumb { position: absolute; top: 3px; width: 32px; height: 32px; background: #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; font-size: 16px; color: #999; font-weight: bold; cursor: grab; user-select: none; }
.slider-thumb:active { cursor: grabbing; }

/* Puzzle Captcha */
.puzzle-captcha { margin-bottom: 8px; }
.puzzle-box { position: relative; width: 100%; height: 150px; overflow: hidden; border-radius: 8px; user-select: none; }
.puzzle-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.puzzle-gap { position: absolute; width: 40px; height: 40px; border: 2px dashed var(--theme, #43a047); background: rgba(255,255,255,0.5); }
.puzzle-piece { position: absolute; width: 40px; height: 40px; cursor: grab; box-shadow: 0 2px 8px rgba(0,0,0,0.4); border-radius: 2px; }
.puzzle-piece:active { cursor: grabbing; }

/* Points Mall */
.mall-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mall-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.mall-img { width: 100%; height: 140px; overflow: hidden; background: #f8f8f8; cursor: pointer; position: relative; }
.mall-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }
.mall-img-empty { display: flex; align-items: center; justify-content: center; }
.mall-img-dots { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.mall-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: background 0.2s; }
.mall-dot.active { background: #fff; width: 16px; border-radius: 3px; }

.mall-cart-float { position: fixed; bottom: 70px; right: 16px; width: 52px; height: 52px; background: linear-gradient(135deg, var(--theme, #43a047), var(--theme-dark, #2e7d32)); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,0.25); cursor: pointer; z-index: 50; color: #fff; transition: background 0.3s; }
.mall-cart-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; background: #e53935; color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* 购物车复选框 */
.cart-checkbox { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border: 2px solid #ccc; border-radius: 50%; cursor: pointer; outline: none; flex-shrink: 0; transition: all 0.2s; position: relative; }
.cart-checkbox:checked { border-color: var(--theme, #43a047); background: linear-gradient(135deg, var(--theme, #43a047), var(--theme-dark, #2e7d32)); }
.cart-checkbox:checked::after { content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 12px; font-weight: 700; }

/* Detail page */
.detail-section { padding: 10px 0; }
.detail-section + .detail-section { border-top: 1px solid #f0f0f0; }
.mall-info { padding: 10px 12px; }
.mall-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mall-desc { font-size: 12px; color: #888; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mall-meta { font-size: 11px; color: #999; margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.mall-meta span { background: #f5f5f5; padding: 1px 6px; border-radius: 4px; }
.mall-footer { display: flex; align-items: center; justify-content: space-between; }
.mall-points { font-size: 14px; font-weight: 600; color: #ff9800; }
.mall-soldout { font-size: 13px; color: #e53935; font-weight: 500; }
.mall-stock { font-size: 11px; color: #999; margin-top: 2px; }

.mall-record { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.mall-record-img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.mall-record-info { flex: 1; min-width: 0; }
.mall-record-name { font-size: 14px; font-weight: 500; }
.mall-record-points { font-size: 13px; color: #e53935; font-weight: 500; }
.mall-record-time { font-size: 11px; color: #999; margin-top: 2px; }
.waterfall{display:flex;gap:0;}
.waterfall>.waterfall-col{flex:1;min-width:0;padding:0 4px;}
.waterfall-card{cursor:pointer;transition:transform 0.15s;break-inside:avoid;}
.waterfall-card:active{transform:scale(0.98);}

.amap-marker-label { background: transparent !important; border: none !important; padding: 0 !important; }
#spot-detail-map { width: 100%; height: 240px; }


