:root {
    --bg-base: #F5F5F7;
    --bg-card: #FFFFFF;
    --brand-color: #FF2442;
    --brand-light: rgba(255, 36, 66, 0.08);
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-tertiary: #B0B0B0;
    --divider: rgba(0, 0, 0, 0.06);
    --radius-card: 16px;
    --radius-pill: 100px;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-float: 0 8px 28px rgba(255, 36, 66, 0.28);
    --shadow-bar: 0 -4px 20px rgba(0, 0, 0, 0.06);
    --transition-smooth: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-spring: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
body { background-color: var(--bg-base); color: var(--text-primary); height: 100vh; overflow: hidden; }

/* Scrollbar */
::-webkit-scrollbar { width: 0; }

/* Page Views */
.page-view { display: none; height: 100vh; overflow-y: auto; padding-bottom: 90px; position: relative; }
.page-view.active { display: block; animation: pageIn 0.22s cubic-bezier(0.25, 0.8, 0.25, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Header */
header { position: sticky; top: 0; z-index: 90; background: rgba(245, 245, 247, 0.88); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); padding: 12px 16px 6px; display: flex; flex-direction: column; gap: 12px; }
.top-bar { display: flex; justify-content: space-between; align-items: center; }
.search-pill { flex-grow: 1; margin-right: 16px; background: rgba(0,0,0,0.05); border-radius: var(--radius-pill); padding: 9px 16px; display: flex; align-items: center; gap: 8px; color: var(--text-tertiary); font-size: 0.93rem; cursor: pointer; transition: var(--transition-smooth); }
.search-pill:hover { background: rgba(0,0,0,0.08); }
.search-pill input { border: none; background: transparent; outline: none; font-size: 0.93rem; color: var(--text-primary); width: 100%; }
.top-icons { display: flex; gap: 14px; }
.top-icons i { font-size: 1.45rem; color: var(--text-primary); cursor: pointer; transition: var(--transition-smooth); }
.top-icons i:active { transform: scale(0.88); opacity: 0.6; }

/* Category Tabs */
.category-tabs { display: flex; gap: 24px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.cat-btn { font-size: 1rem; color: var(--text-tertiary); background: none; border: none; font-weight: 500; white-space: nowrap; cursor: pointer; position: relative; transition: var(--transition-smooth); padding: 6px 0; letter-spacing: 0.3px; }
.cat-btn.active { color: var(--text-primary); font-size: 1.08rem; font-weight: 700; }
.cat-btn.active::after { content: ''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%) scaleX(0.7); width: 20px; height: 3px; background: var(--brand-color); border-radius: 4px; animation: tabIndicator 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes tabIndicator { from { transform: translateX(-50%) scaleX(0); } to { transform: translateX(-50%) scaleX(0.7); } }

/* Masonry Feed */
.masonry-feed { padding: 10px 12px; column-count: 2; column-gap: 10px; }
.feed-section { display: none; }
.feed-section.active { display: block; }

/* Cards */
.card { background: var(--bg-card); border-radius: var(--radius-card); margin-bottom: 10px; overflow: hidden; break-inside: avoid; box-shadow: var(--shadow-card); cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease; will-change: transform; }
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.card:active { transform: scale(0.97) translateY(1px); box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition-duration: 0.08s; }
.card-img-wrapper { width: 100%; position: relative; background: #f0f0f0; overflow: hidden; }
.card-img { width: 100%; display: block; object-fit: cover; transition: transform 0.3s ease; }
.card:hover .card-img { transform: scale(1.02); }
.card-badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,0.45); backdrop-filter: blur(6px); color: white; font-size: 0.72rem; padding: 3px 8px; border-radius: 8px; display: flex; align-items: center; gap: 3px; font-weight: 500; letter-spacing: 0.2px; }
.card-body { padding: 11px 12px 12px; }
.card-title { font-size: 0.93rem; font-weight: 600; line-height: 1.45; color: var(--text-primary); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { font-size: 1.05rem; font-weight: 700; color: var(--brand-color); margin-bottom: 6px; letter-spacing: -0.3px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }
.author { display: flex; align-items: center; gap: 6px; }
.author-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.author-name { font-size: 0.75rem; color: var(--text-secondary); }
.likes { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--text-tertiary); cursor: pointer; transition: var(--transition-smooth); user-select: none; }
.likes:active { transform: scale(0.9); }
.likes.liked { color: var(--brand-color); }
.likes.liked i { animation: heartPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes heartPop { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* Messages */
.page-header { padding: 16px 20px; font-size: 1.15rem; font-weight: 700; background: rgba(255,255,255,0.92); backdrop-filter: blur(20px); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--divider); display: flex; align-items: center; gap: 8px; }
.page-header i { cursor: pointer; transition: var(--transition-smooth); }
.page-header i:active { transform: scale(0.88); opacity: 0.5; }
.msg-list { padding: 0; }
.msg-item { display: flex; align-items: center; padding: 14px 20px; background: var(--bg-card); border-bottom: 1px solid var(--divider); cursor: pointer; transition: var(--transition-smooth); }
.msg-item:active { background: rgba(0,0,0,0.02); }
.msg-avatar { width: 50px; height: 50px; border-radius: 50%; background: #f0f0f0; margin-right: 14px; position: relative; flex-shrink: 0; overflow: hidden; }
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-badge { position: absolute; top: 0; right: 0; width: 11px; height: 11px; background: var(--brand-color); border-radius: 50%; border: 2px solid white; }
.msg-content { flex-grow: 1; min-width: 0; }
.msg-name { font-size: 1rem; font-weight: 600; margin-bottom: 3px; }
.msg-desc { font-size: 0.85rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-time { font-size: 0.72rem; color: var(--text-tertiary); align-self: flex-start; margin-top: 3px; flex-shrink: 0; }

/* Profile */
.profile-nav-top { position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; color: white; background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%); }
.profile-nav-top i { font-size: 1.5rem; cursor: pointer; transition: var(--transition-smooth); }
.profile-nav-top i:active { transform: scale(0.88); opacity: 0.6; }
.profile-header { background-size: cover; background-position: center; padding: 20px 20px 32px; color: white; position: relative; margin-top: -60px; padding-top: 80px; }
.profile-header::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%); pointer-events: none; }
.profile-info { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.profile-avatar { width: 74px; height: 74px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.9); object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.profile-name { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.3px; }
.profile-bio { font-size: 0.85rem; opacity: 0.85; margin-top: 5px; line-height: 1.4; }
.profile-stats { position: relative; z-index: 1; display: flex; gap: 28px; margin-top: 22px; }
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: 1.15rem; font-weight: 700; }
.stat-label { font-size: 0.72rem; opacity: 0.75; margin-top: 2px; }
.menu-list { padding: 10px 12px; }
.menu-item { background: var(--bg-card); padding: 15px 16px; border-radius: 14px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; cursor: pointer; transition: var(--transition-smooth); box-shadow: var(--shadow-card); }
.menu-item:active { transform: scale(0.98); background: #fafafa; }
.menu-left { display: flex; align-items: center; gap: 13px; font-weight: 500; font-size: 0.95rem; }
.menu-left i { font-size: 1.35rem; color: var(--text-secondary); transition: var(--transition-smooth); }
.menu-item:active .menu-left i { transform: scale(0.92); }

/* Tab Bar */
.bottom-tabbar { position: fixed; bottom: 0; left: 0; width: 100%; height: 68px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); display: flex; justify-content: space-around; align-items: center; border-top: 1px solid rgba(0,0,0,0.05); z-index: 100; padding-bottom: env(safe-area-inset-bottom); box-shadow: var(--shadow-bar); }
.tab-item { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-tertiary); cursor: pointer; padding: 6px 16px; transition: var(--transition-spring); }
.tab-item i { font-size: 1.55rem; transition: transform 0.2s ease; }
.tab-item span { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.2px; }
.tab-item.active { color: var(--text-primary); }
.tab-item.active i { transform: scale(1.1) translateY(-1px); }
.tab-item:active { transform: scale(0.92); }
.publish-btn-wrapper { position: relative; top: -16px; width: 52px; height: 52px; background: var(--brand-color); border-radius: 16px; display: flex; justify-content: center; align-items: center; box-shadow: var(--shadow-float); cursor: pointer; transition: var(--transition-spring); }
.publish-btn-wrapper:hover { transform: scale(1.05) translateY(-2px); box-shadow: 0 12px 32px rgba(255, 36, 66, 0.35); }
.publish-btn-wrapper:active { transform: scale(0.92); transition-duration: 0.08s; }
.publish-btn-wrapper i { color: white; font-size: 1.9rem; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 200; display: none; align-items: flex-end; }
.modal-overlay.show { display: flex; animation: fadeOverlay 0.2s ease; }
@keyframes fadeOverlay { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet { background: white; width: 100%; border-radius: 22px 22px 0 0; padding: 18px; animation: slideUp 0.28s cubic-bezier(0.34, 1.2, 0.64, 1); max-height: 90vh; overflow-y: auto; }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-handle { width: 38px; height: 4px; background: #DDD; border-radius: 2px; margin: 0 auto 16px; }
.modal-title { font-size: 1.1rem; font-weight: 700; text-align: center; margin-bottom: 18px; }

/* Auth Forms */
.auth-page { min-height: 100vh; background: var(--bg-base); }
.auth-header { padding: 52px 24px 16px; text-align: center; }
.auth-header h1 { font-size: 2rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; }
.auth-header p { color: var(--text-secondary); margin-top: 6px; font-size: 0.9rem; }
.auth-box { padding: 0 24px 24px; }
.auth-form { background: white; border-radius: 22px; padding: 28px 24px; box-shadow: var(--shadow-card); }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 0.87rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; letter-spacing: 0.2px; }
.form-field input, .form-field textarea, .form-field select { width: 100%; padding: 12px 16px; border: 2px solid rgba(0,0,0,0.07); border-radius: 12px; font-size: 0.95rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; background: var(--bg-base); }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--brand-color); box-shadow: 0 0 0 3px var(--brand-light); }
.form-field textarea { resize: vertical; min-height: 100px; }
.auth-btn { width: 100%; padding: 14px; background: var(--brand-color); color: white; border: none; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: var(--transition-spring); box-shadow: 0 4px 16px rgba(255, 36, 66, 0.25); }
.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 36, 66, 0.3); }
.auth-btn:active { transform: scale(0.97); transition-duration: 0.08s; }
.auth-link { text-align: center; margin-top: 18px; font-size: 0.87rem; color: var(--text-secondary); }
.auth-link a { color: var(--brand-color); text-decoration: none; font-weight: 600; }

/* Post Detail */
.post-detail { background: white; min-height: 100vh; }
.post-images { width: 100%; }
.post-images img { width: 100%; display: block; }
.post-content { padding: 20px; }
.post-title { font-size: 1.25rem; font-weight: 700; line-height: 1.55; margin-bottom: 12px; letter-spacing: -0.2px; }
.post-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.post-author { display: flex; align-items: center; gap: 10px; }
.post-author-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.post-author-name { font-weight: 600; font-size: 0.95rem; }
.post-author-time { font-size: 0.78rem; color: var(--text-tertiary); }
.post-body { font-size: 0.95rem; line-height: 1.75; color: var(--text-secondary); margin-bottom: 20px; white-space: pre-wrap; }
.post-price-tag { font-size: 1.25rem; font-weight: 700; color: var(--brand-color); padding: 12px 16px; background: var(--brand-light); border-radius: 14px; display: inline-block; margin-bottom: 16px; letter-spacing: -0.3px; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.post-tag { padding: 5px 12px; background: rgba(0,0,0,0.04); border-radius: 20px; font-size: 0.8rem; color: var(--text-secondary); }
.post-actions { display: flex; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--divider); background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); }
.post-action-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 11px; background: rgba(0,0,0,0.04); border-radius: 12px; cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: var(--transition-spring); user-select: none; }
.post-action-btn:active { transform: scale(0.95); }
.post-action-btn.liked { color: var(--brand-color); background: var(--brand-light); }
.post-action-btn.primary { background: var(--brand-color); color: white; box-shadow: 0 4px 14px rgba(255, 36, 66, 0.25); }
.post-action-btn.primary:active { transform: scale(0.96); }

/* Comments */
.comments-section { padding: 16px 20px; padding-bottom: 90px; }
.comments-title { font-weight: 600; margin-bottom: 16px; font-size: 1rem; color: var(--text-primary); }
.comment-item { display: flex; gap: 12px; margin-bottom: 18px; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-body { flex-grow: 1; }
.comment-name { font-weight: 600; font-size: 0.88rem; margin-bottom: 4px; }
.comment-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.55; }
.comment-time { font-size: 0.72rem; color: var(--text-tertiary); margin-top: 4px; }

/* 帖子评论输入条 */
.post-comment-bar { display: flex; gap: 10px; padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--divider); position: fixed; bottom: 68px; left: 0; right: 0; background: rgba(255,255,255,0.96); backdrop-filter: blur(20px); z-index: 40; box-shadow: 0 -4px 20px rgba(0,0,0,0.06); }
.post-comment-bar input { flex: 1; padding: 10px 16px; border: 2px solid rgba(0,0,0,0.07); border-radius: 22px; outline: none; font-size: 0.9rem; min-width: 0; box-sizing: border-box; background: var(--bg-base); transition: border-color 0.2s, box-shadow 0.2s; }
.post-comment-bar input:focus { border-color: var(--brand-color); box-shadow: 0 0 0 3px var(--brand-light); }
.post-comment-bar button { padding: 10px 18px; background: var(--brand-color); color: white; border: none; border-radius: 22px; cursor: pointer; font-weight: 600; white-space: nowrap; transition: var(--transition-spring); font-size: 0.88rem; }
.post-comment-bar button:active { transform: scale(0.93); }

/* Publish */
.publish-form { padding: 20px; }
.publish-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.publish-type-btn { padding: 16px 14px; background: rgba(0,0,0,0.03); border: 2px solid transparent; border-radius: 14px; text-align: center; cursor: pointer; transition: var(--transition-spring); }
.publish-type-btn:active { transform: scale(0.96); }
.publish-type-btn.active { border-color: var(--brand-color); background: var(--brand-light); }
.publish-type-btn i { font-size: 2rem; margin-bottom: 6px; display: block; transition: transform 0.2s ease; }
.publish-type-btn.active i { transform: scale(1.1); }
.publish-type-btn span { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); transition: color 0.2s; }
.publish-type-btn.active span { color: var(--brand-color); }
.img-upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.img-upload-item { aspect-ratio: 1; border-radius: 12px; overflow: hidden; position: relative; background: #f0f0f0; }
.img-upload-item img { width: 100%; height: 100%; object-fit: cover; }
.img-upload-item .remove-img { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; background: rgba(0,0,0,0.5); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; cursor: pointer; transition: var(--transition-smooth); }
.img-upload-item .remove-img:active { transform: scale(0.88); }
.img-upload-add { aspect-ratio: 1; border: 2px dashed rgba(0,0,0,0.12); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; color: var(--text-tertiary); font-size: 0.8rem; gap: 4px; transition: var(--transition-smooth); }
.img-upload-add:hover { border-color: var(--brand-color); color: var(--brand-color); background: var(--brand-light); }
.img-upload-add:active { transform: scale(0.96); }
.img-upload-add i { font-size: 1.5rem; }
.submit-btn { width: 100%; padding: 15px; background: var(--brand-color); color: white; border: none; border-radius: 14px; font-size: 1rem; font-weight: 700; cursor: pointer; margin-top: 16px; transition: var(--transition-spring); box-shadow: 0 4px 16px rgba(255, 36, 66, 0.25); }
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 36, 66, 0.3); }
.submit-btn:active { transform: scale(0.97); transition-duration: 0.08s; }

/* Chat */
.chat-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: rgba(255,255,255,0.96); backdrop-filter: blur(20px); border-bottom: 1px solid var(--divider); position: sticky; top: 0; z-index: 50; }
.chat-header-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.chat-header-name { font-weight: 600; font-size: 1rem; flex-grow: 1; }
.chat-header i { cursor: pointer; font-size: 1.3rem; color: var(--text-secondary); transition: var(--transition-smooth); }
.chat-header i:active { transform: scale(0.88); }
.chat-messages { padding: 16px; display: flex; flex-direction: column; gap: 10px; padding-bottom: 80px; }
.chat-msg { max-width: 76%; padding: 10px 15px; border-radius: 18px; font-size: 0.92rem; line-height: 1.55; word-break: break-word; transition: transform 0.15s ease; }
.chat-msg.sent { align-self: flex-end; background: var(--brand-color); color: white; border-bottom-right-radius: 5px; animation: msgSlideIn 0.2s ease; }
.chat-msg.received { align-self: flex-start; background: white; border: 1px solid var(--divider); border-bottom-left-radius: 5px; animation: msgSlideIn 0.2s ease; }
@keyframes msgSlideIn { from { opacity: 0; transform: translateY(8px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.chat-input-bar { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,0.96); backdrop-filter: blur(20px); padding: 10px 16px; display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--divider); z-index: 50; padding-bottom: calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px rgba(0,0,0,0.05); }
.chat-input-bar input { flex-grow: 1; padding: 10px 16px; border: 2px solid rgba(0,0,0,0.07); border-radius: 22px; outline: none; font-size: 0.92rem; background: var(--bg-base); transition: border-color 0.2s, box-shadow 0.2s; }
.chat-input-bar input:focus { border-color: var(--brand-color); box-shadow: 0 0 0 3px var(--brand-light); }
.chat-input-bar button { padding: 10px 20px; background: var(--brand-color); color: white; border: none; border-radius: 22px; cursor: pointer; font-weight: 600; transition: var(--transition-spring); }
.chat-input-bar button:active { transform: scale(0.92); }

/* Follow button */
.follow-btn { padding: 7px 18px; background: var(--brand-color); color: white; border: none; border-radius: 22px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: var(--transition-spring); box-shadow: 0 3px 10px rgba(255, 36, 66, 0.2); }
.follow-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(255, 36, 66, 0.28); }
.follow-btn:active { transform: scale(0.94); }
.follow-btn.following { background: rgba(0,0,0,0.06); color: var(--text-primary); box-shadow: none; }
.follow-btn.following:hover { background: rgba(0,0,0,0.1); }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty-state i { font-size: 4rem; color: #E0E0E0; animation: floatIcon 3s ease-in-out infinite; }
@keyframes floatIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.empty-state p { color: var(--text-tertiary); font-size: 0.9rem; }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: #1a1a2e; color: white; padding: 24px 0; flex-shrink: 0; }
.admin-logo { padding: 0 20px 24px; font-size: 1.2rem; font-weight: 800; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 16px; }
.admin-nav-item { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: rgba(255,255,255,0.6); cursor: pointer; transition: 0.2s; font-size: 0.9rem; }
.admin-nav-item:hover, .admin-nav-item.active { background: rgba(255,255,255,0.1); color: white; }
.admin-nav-item i { font-size: 1.2rem; }
.admin-main { flex-grow: 1; background: #f5f7fa; overflow-y: auto; }
.admin-topbar { background: white; padding: 16px 24px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 24px; }
.admin-stat-card { background: white; border-radius: 12px; padding: 20px; box-shadow: var(--shadow-card); }
.admin-stat-num { font-size: 1.8rem; font-weight: 800; color: var(--brand-color); }
.admin-stat-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }
.admin-table-wrap { background: white; border-radius: 12px; margin: 0 24px 24px; overflow: hidden; box-shadow: var(--shadow-card); }
.admin-table-header { padding: 16px 20px; border-bottom: 1px solid #eee; font-weight: 700; font-size: 1rem; }
table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th { text-align: left; padding: 12px 16px; font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); background: #fafafa; border-bottom: 1px solid #eee; }
table.admin-table td { padding: 14px 16px; font-size: 0.88rem; border-bottom: 1px solid #f5f5f5; }
table.admin-table tr:last-child td { border-bottom: none; }
table.admin-table tr:hover { background: #fafafa; }
table.admin-table .avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; }
.badge { padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-green { background: #e8f5e9; color: #2ecc71; }
.badge-red { background: #ffebee; color: #FF2442; }
.badge-blue { background: #e3f2fd; color: #1E88E5; }
.badge-orange { background: #fff3e0; color: #F57C00; }
.badge-gray { background: #f5f5f5; color: #888; }
.admin-action-btn { padding: 4px 10px; border: none; border-radius: 6px; cursor: pointer; font-size: 0.78rem; font-weight: 600; margin-right: 4px; transition: var(--transition-smooth); }
.admin-action-btn:active { transform: scale(0.93); }
.btn-danger { background: #ffebee; color: #FF2442; }
.btn-danger:hover { background: #ffd7d7; }
.btn-info { background: #e3f2fd; color: #1E88E5; }
.btn-info:hover { background: #d0e8ff; }

/* Dropdown */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; top: 100%; right: 0; background: white; border-radius: 14px; box-shadow: 0 8px 30px rgba(0,0,0,0.15); min-width: 160px; z-index: 1000; display: none; padding: 8px 0; animation: dropIn 0.18s cubic-bezier(0.34, 1.2, 0.64, 1); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dropdown-menu.show { display: block; }
.dropdown-item { padding: 10px 16px; font-size: 0.88rem; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: var(--transition-smooth); }
.dropdown-item:hover { background: rgba(0,0,0,0.03); }
.dropdown-item:active { background: rgba(0,0,0,0.06); }
.dropdown-item.danger { color: var(--brand-color); }

/* Image picker */
.hidden-input { display: none; }

/* Loading */
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.88); z-index: 9999; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 14px; backdrop-filter: blur(4px); }
.loading-overlay.show { display: flex; animation: fadeOverlay 0.15s ease; }
.spinner { width: 38px; height: 38px; border: 3px solid rgba(255, 36, 66, 0.1); border-top-color: var(--brand-color); border-radius: 50%; animation: spin 0.7s cubic-bezier(0.5, 0, 0.5, 1) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.9rem; color: var(--text-secondary); }

/* Profile Edit */
.profile-edit-section { padding: 20px; background: white; border-radius: 16px; margin-bottom: 12px; box-shadow: var(--shadow-card); }
.profile-edit-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--divider); }
.profile-edit-row:last-child { border-bottom: none; }
.profile-edit-label { font-weight: 500; font-size: 0.95rem; }
.profile-edit-value { color: var(--text-tertiary); font-size: 0.9rem; display: flex; align-items: center; gap: 4px; }
.profile-edit-value i { font-size: 1.1rem; }

/* Notification item */
.notif-item { display: flex; align-items: center; gap: 12px; padding: 15px 20px; background: var(--bg-card); border-bottom: 1px solid var(--divider); cursor: pointer; transition: var(--transition-smooth); }
.notif-item:active { background: #fafafa; }
.notif-item.unread { background: var(--brand-light); }
.notif-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-icon.like { background: #fff0f0; color: var(--brand-color); }
.notif-icon.comment { background: #e3f2fd; color: #1E88E5; }
.notif-icon.follow { background: #f0fff4; color: #2ecc71; }
.notif-icon.order { background: #fff3e0; color: #F57C00; }
.notif-body { flex-grow: 1; }
.notif-text { font-size: 0.88rem; line-height: 1.45; }
.notif-time { font-size: 0.72rem; color: var(--text-tertiary); margin-top: 3px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 20px; }
.pagination a, .pagination span { padding: 7px 14px; border-radius: 10px; font-size: 0.88rem; }
.pagination a { background: white; color: var(--text-primary); text-decoration: none; transition: var(--transition-smooth); box-shadow: var(--shadow-card); }
.pagination a:hover { background: var(--brand-light); }
.pagination .current { background: var(--brand-color); color: white; }

/* Search results */
.search-results { padding: 12px; }
.search-result-item { background: white; border-radius: 14px; padding: 14px 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: var(--transition-smooth); box-shadow: var(--shadow-card); }
.search-result-item:active { transform: scale(0.98); background: #fafafa; }
.search-result-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.search-result-name { font-weight: 600; font-size: 0.95rem; }
.search-result-bio { font-size: 0.8rem; color: var(--text-tertiary); margin-top: 2px; }

/* Skeleton loading */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Like animation on feed cards */
.likes.animating i { animation: heartBurst 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes heartBurst { 0% { transform: scale(1); } 30% { transform: scale(1.6); } 60% { transform: scale(0.9); } 100% { transform: scale(1); } }

/* Badge pop */
@keyframes badgePop { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* Responsive */
@media (max-width: 480px) {
    .admin-stats { grid-template-columns: 1fr 1fr; }
    .admin-sidebar { width: 60px; }
    .admin-logo span, .admin-nav-item span { display: none; }
    .admin-nav-item { justify-content: center; padding: 12px; }
}
