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

:root {
    --accent: #7c3aed;
    --accent-light: #f5f3ff;
    --accent-dark: #6d28d9;
    --text: #1e1b2e;
    --text-muted: #8b83a0;
    --bg: #f8f7fc;
    --white: #fff;
    --border: #e4e0ee;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
}

body {
    font-family: "PingFang SC","Hiragino Sans GB","Microsoft YaHei",-apple-system,sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

/* ===== Header ===== */
.top-header {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%);
    padding: 15px 20px;
    box-shadow: 0 1px 8px rgba(124,58,237,0.15);
    position: sticky; top: 0; z-index: 100;
}
.top-header-inner {
    max-width: 960px; margin: 0 auto;
    display: flex; align-items: center; gap: 10px;
}
.logo-text {
    font-size: 22px; font-weight: 800; color: #fff;
    text-decoration: none; letter-spacing: 1px;
}
.top-subtitle { color: rgba(255,255,255,0.7); font-size: 12px; }
.top-header-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top-nav-link { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 6px; transition: background 0.2s; white-space: nowrap; }
.top-nav-link:hover { background: rgba(255,255,255,0.15); color: #fff; }
.top-nav-admin { background: rgba(255,255,255,0.2); }
.top-nav-admin:hover { background: rgba(255,255,255,0.3) !important; }
.top-nav-badge { display: inline-block; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 8px; padding: 0 4px; }
.announcement-bar {
    background: #fffbeb; color: #92400e; padding: 7px 20px;
    font-size: 13px; text-align: center; font-weight:600; border-bottom: 1px solid #fde68a;
}

/* ===== Main ===== */
.main-content { flex: 1; max-width: 960px; margin: 0 auto; padding: 24px 20px 120px; width: 100%; }

/* ===== Carousel ===== */
.carousel-wrapper { position: relative; margin-bottom: 20px; }
.carousel-track { position: relative; height: 280px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; }
.carousel-slide.active { opacity: 1; z-index: 1; }
.carousel-link { display: block; width: 100%; height: 100%; text-decoration: none; color: inherit; position: relative; }
.carousel-bg { position: absolute; inset: 0; }
.carousel-text-only { display: flex; align-items: center; justify-content: center; padding: 40px; text-align: center; }
.carousel-text-only h3 { font-size: 22px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.carousel-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 50px 24px 20px; background: linear-gradient(transparent, rgba(0,0,0,0.6)); color: #fff; }
.carousel-caption h3 { font-size: 20px; font-weight: 800; margin: 5px 0 0; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; background: rgba(255,255,255,0.92); border: none; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; cursor: pointer; color: var(--accent); font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.12); transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.carousel-btn:hover { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.carousel-prev { left: 14px; } .carousel-next { right: 14px; }
.carousel-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 5; }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.45); cursor: pointer; transition: all 0.3s; }
.carousel-dot.active { background: #fff; width: 24px; border-radius: 4px; }

/* ===== Category Nav Strip ===== */
.cat-nav-strip {
    display: flex; gap: 6px; padding: 12px 0; overflow-x: auto;
    scrollbar-width: none; margin-bottom: 16px;
}
.cat-nav-strip::-webkit-scrollbar { display: none; }
.cat-nav-item {
    flex-shrink: 0; padding: 7px 18px; background: #fff;
    color: var(--text-muted); text-decoration: none; font-size: 14px;
    font-weight: 600; border-radius: 20px; border: 1px solid var(--border);
    transition: all 0.2s;
}
.cat-nav-item:hover { color: var(--accent); border-color: var(--accent); }
.cat-nav-item.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Home ===== */
.home-full { }
.home-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.home-header h1 { font-size: 18px; font-weight: 800; padding-left: 12px; border-left: 3px solid var(--accent); }
.search-form { display: flex; gap: 6px; }
.search-form input { padding: 8px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 14px; font-family: inherit; width: 200px; transition: border-color 0.2s; }
.search-form input:focus { outline: none; border-color: var(--accent); }

/* Members */
.members-section { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.section-title { font-size: 18px; font-weight: 800; margin-bottom: 16px; padding-left: 12px; border-left: 3px solid var(--accent); }
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.member-card-sm { background: #fff; border-radius: var(--radius); padding: 14px 10px; text-align: center; text-decoration: none; color: var(--text); border: 1px solid var(--border); transition: all 0.2s; }
.member-card-sm:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.member-card-sm.vip-user { border-color: #fbbf24; background: #fffdf0; }
.member-avatar-sm { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg,#7c3aed,#a78bfa); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; }
.member-avatar-sm svg { width: 18px; height: 18px; stroke: #fff; }
.vip-user .member-avatar-sm { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.member-name-sm { font-size: 14px; font-weight: 700; }
.member-date-sm { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.home-stats-bar { display: flex; gap: 24px; justify-content: center; padding: 10px; background: #fff; border-radius: var(--radius); font-size: 13px; color: var(--text-muted); font-weight: 600; border: 1px solid var(--border); }

/* ===== Post List ===== */
.post-list { display: flex; flex-direction: column; gap: 8px; }
.post-card { background: #fff; border-radius: var(--radius); padding: 16px 20px; border: 1px solid var(--border); transition: all 0.2s; }
.post-card:hover { box-shadow: var(--shadow-md); }
.post-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.post-title { font-size: 16px; font-weight: 700; color: var(--text); text-decoration: none; }
.post-title:hover { color: var(--accent); }
.post-card-meta { display: flex; gap: 18px; font-size: 13px; color: var(--text-muted); align-items: center; }
.post-author { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--text); }
.post-author svg { flex-shrink: 0; stroke: var(--accent); }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 20px; border: none; background: #fff; color: var(--text); border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid var(--border); transition: all 0.2s; font-family: inherit; }
.btn:hover { background: var(--accent-light); }
.btn-primary { background: var(--accent); color: #fff; border: none; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-danger { background: #ef4444; color: #fff; border: none; }
.btn-danger:hover { opacity: 0.9; }
.btn-success { background: #22c55e; color: #fff; border: none; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-vip { background: linear-gradient(135deg,#f59e0b,#fbbf24) !important; color: #78350f !important; border: none !important; font-weight: 700 !important; }
.btn-vip:hover { box-shadow: 0 4px 12px rgba(245,158,11,0.3) !important; }

/* ===== Bottom Nav ===== */
.bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,0.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border); z-index: 200; padding: 4px 0 max(env(safe-area-inset-bottom,5px),5px); }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5px 0; color: var(--text-muted); text-decoration: none; font-size: 10px; transition: all 0.2s; position: relative; }
.nav-item .nav-icon { font-size: 22px; line-height: 1; margin-bottom: 1px; transition: transform 0.2s; position: relative; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; }
.nav-item .nav-icon svg { width: 24px; height: 24px; stroke: currentColor; }
.nav-item.active { color: var(--accent); }
.nav-item.active .nav-icon { transform: scale(1.15); }
.nav-item.active::after { content: ''; position: absolute; bottom: -4px; width: 20px; height: 2px; background: var(--accent); border-radius: 2px; }
.nav-item-center { position: relative; top: -14px; }
.nav-item-center .nav-icon-add { width: 44px; height: 44px; background: linear-gradient(135deg,#7c3aed,#a78bfa); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(124,58,237,0.3); transition: transform 0.2s; }
.nav-item-center .nav-icon-add svg { width: 22px; height: 22px; stroke: #fff; }
.nav-item-center:active .nav-icon-add { transform: scale(0.9); }
.nav-badge { position: absolute; top: -2px; right: calc(50% - 16px); background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 8px; padding: 0 4px; z-index: 10; }

/* ===== Forms ===== */
.form-box { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); max-width: 460px; margin: 0 auto; }
.form-box label { display: block; margin: 14px 0 4px; font-weight: 700; font-size: 14px; }
.form-box input[type="text"], .form-box input[type="password"], .form-box input[type="email"], .form-box input[type="number"], .form-box input[type="url"], .form-box textarea, .form-box select { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; transition: border-color 0.2s; }
.form-box input:focus, .form-box textarea:focus, .form-box select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-box button[type="submit"] { margin-top: 16px; width: 100%; padding: 12px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; padding: 6px 10px; background: #fffbeb; border-radius: 6px; border: 1px dashed #e8d088; }

/* Auth */
.auth-page { max-width: 420px; margin: 30px auto; }
.auth-page h1 { text-align: center; margin-bottom: 20px; font-size: 22px; font-weight: 800; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 14px; color: var(--text-muted); }
.auth-switch a { color: var(--accent); font-weight: 700; text-decoration: none; }

/* Alerts */
.alert { padding: 10px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* Badges */
.badge { display: inline-flex; padding: 2px 9px; background: var(--accent-light); color: var(--accent); border-radius: 20px; font-size: 11px; font-weight: 700; }
.pin-badge { display: inline-flex; padding: 2px 7px; background: #fef2f2; color: #e11d48; border-radius: 20px; font-size: 11px; font-weight: 700; margin-right: 4px; }
.vip-badge-sm { display: inline-flex; padding: 1px 5px; background: linear-gradient(135deg,#f59e0b,#fbbf24); color: #78350f; border-radius: 10px; font-size: 10px; font-weight: 800; }
.verify-badge-sm { display: inline-flex; padding: 1px 5px; background: #0ea5e9; color: #fff; border-radius: 10px; font-size: 10px; font-weight: 700; }
.vip-badge { display: inline-flex; align-items: center; gap: 3px; padding: 3px 10px; background: linear-gradient(135deg,#f59e0b,#fbbf24); color: #78350f; border-radius: 20px; font-size: 12px; font-weight: 800; }
.verify-badge { display: inline-flex; align-items: center; gap: 3px; padding: 3px 10px; background: #0ea5e9; color: #fff; border-radius: 20px; font-size: 12px; font-weight: 700; }
.admin-badge { display: inline-flex; padding: 3px 10px; background: linear-gradient(135deg,#a78bfa,#ec4899); color: #fff; border-radius: 20px; font-size: 12px; font-weight: 700; }

/* ===== Post Detail ===== */
.post-detail-layout { display: flex; gap: 16px; align-items: flex-start; }
.post-author-card { width: 170px; flex-shrink: 0; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 18px 14px; text-align: center; }
.author-avatar-link { display: block; text-decoration: none; }
.author-avatar-lg { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg,#7c3aed,#a78bfa); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; border: 3px solid var(--accent-light); }
.author-avatar-lg svg { width: 28px; height: 28px; stroke: #fff; }
.author-name { display: block; font-size: 15px; font-weight: 800; color: var(--text); text-decoration: none; margin-bottom: 4px; }
.author-name:hover { color: var(--accent); }
.author-badges { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-bottom: 8px; }
.admin-badge-sm { display: inline-flex; padding: 1px 6px; background: linear-gradient(135deg,#a78bfa,#ec4899); color: #fff; border-radius: 8px; font-size: 10px; font-weight: 800; }
.author-bio { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; }
.author-stats-row { display: flex; justify-content: center; gap: 14px; margin-bottom: 6px; font-size: 12px; color: var(--text-muted); }
.author-stat b { color: var(--text); }
.author-joined { font-size: 11px; color: var(--text-muted); display: block; padding-top: 8px; border-top: 1px solid var(--border); }
.post-detail-main { flex: 1; min-width: 0; }
.post-detail { background: #fff; border-radius: var(--radius); padding: 28px; margin-bottom: 16px; border: 1px solid var(--border); }
.post-header { border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 16px; }
.post-header h1 { font-size: 24px; font-weight: 800; margin: 8px 0; }
.post-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-muted); }
.post-content { font-size: 16px; line-height: 1.9; }

/* Replies */
.replies-section { background: #fff; border-radius: var(--radius); padding: 24px; margin-bottom: 30px; border: 1px solid var(--border); }
.replies-section h2 { font-size: 17px; font-weight: 800; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.reply-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.reply-meta { margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.reply-meta .time { color: var(--text-muted); font-size: 12px; margin-left: 10px; font-weight: 400; }
.reply-content { font-size: 15px; line-height: 1.8; }

/* ===== Category Page ===== */
.cat-header { margin-bottom: 18px; }
.cat-breadcrumb { margin-bottom: 8px; }
.cat-breadcrumb a { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; }
.cat-breadcrumb a:hover { opacity: 0.8; }
.cat-banner { background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 60%, #a78bfa 100%); border-radius: var(--radius); padding: 20px 24px; color: #fff; margin-bottom: 16px; box-shadow: 0 2px 12px rgba(124,58,237,0.2); }
.cat-banner h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.cat-banner-desc { font-size: 14px; opacity: 0.85; }
.cat-banner-stats { margin-top: 10px; display: flex; gap: 16px; font-size: 12px; opacity: 0.75; }
.cat-banner-stats span { font-weight: 700; }
.cat-tabs { display: flex; gap: 2px; margin-bottom: 18px; background: #fff; border-radius: var(--radius); padding: 3px; border: 1px solid var(--border); }
.cat-tab { padding: 8px 18px; text-decoration: none; color: var(--text-muted); font-size: 14px; font-weight: 600; border-radius: 10px; transition: all 0.15s; }
.cat-tab.active { background: var(--accent-light); color: var(--accent); }
.cat-post-btn { margin-left: auto; }

/* Categories Listing */
.categories-page .page-header { margin-bottom: 20px; }
.categories-page .page-header h1 { font-size: 20px; font-weight: 800; padding-left: 12px; border-left: 3px solid var(--accent); }
.page-desc { font-size: 14px; color: var(--text-muted); margin-left: 14px; margin-top: 2px; }
.category-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.category-card { display: flex; align-items: center; gap: 14px; padding: 18px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); text-decoration: none; color: inherit; transition: box-shadow 0.2s; }
.category-card:hover { box-shadow: var(--shadow-md); }
.category-card-icon { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg,#7c3aed,#a78bfa); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; flex-shrink: 0; }
.category-card-body h3 { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.category-desc { font-size: 13px; color: var(--text-muted); }
.category-stats { font-size: 12px; color: var(--accent); font-weight: 600; }
.category-arrow { color: #ccc; font-size: 18px; }

/* ===== Create Post ===== */
.create-page { max-width: 800px; }
.create-page h1 { font-size: 22px; font-weight: 800; margin-bottom: 20px; }
.create-form { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); }
.create-form-row { margin-bottom: 16px; }
.create-form-row label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.create-form-row input[type="text"], .create-form-row input[type="url"], .create-form-row select { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; }
.create-form-row input:focus, .create-form-row select:focus { outline: none; border-color: var(--accent); }
.editor-wrapper { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.editor-wrapper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.editor-toolbar { display: flex; align-items: center; gap: 3px; padding: 6px 8px; background: #faf9fc; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tool-hint { font-size: 11px; color: var(--text-muted); margin-right: auto; }
.tool-btn { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 5px; background: #fff; font-size: 11px; font-weight: 700; cursor: pointer; color: var(--text); }
.tool-btn:hover { background: var(--accent-light); color: var(--accent); }
.editor-wrapper textarea { width: 100%; padding: 14px 16px; border: none; font-size: 15px; font-family: "SF Mono",Menlo,Consolas,monospace; line-height: 1.7; resize: vertical; min-height: 280px; }
.editor-wrapper textarea:focus { outline: none; }
.create-form-actions { display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ===== Profile ===== */
.profile-page { max-width: 720px; }
.profile-cover { height: 110px; background: linear-gradient(135deg,#7c3aed,#a78bfa,#818cf8); border-radius: var(--radius) var(--radius) 0 0; }
.profile-card { background: #fff; border-radius: 0 0 var(--radius) var(--radius); border: 1px solid var(--border); padding: 24px; margin-top: -30px; margin-bottom: 20px; }
.profile-card-top { display: flex; align-items: center; gap: 14px; margin-top: -50px; margin-bottom: 16px; flex-wrap: wrap; }
.profile-avatar-large { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(135deg,#7c3aed,#a78bfa); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 4px solid #fff; box-shadow: 0 4px 12px rgba(124,58,237,0.25); }
.profile-avatar-large svg { width: 36px; height: 36px; stroke: #fff; }
.profile-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.profile-name-row h1 { font-size: 20px; font-weight: 800; }
.profile-top-actions { display: flex; gap: 6px; margin-left: auto; }
.profile-stats-row { display: flex; gap: 8px; margin-bottom: 14px; }
.pstat { flex: 1; text-align: center; padding: 8px 4px; background: var(--accent-light); border-radius: 8px; }
.pstat-num { display: block; font-size: 16px; font-weight: 800; color: var(--accent); }
.pstat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.profile-bio-card { padding: 10px 14px; background: #faf9fc; border-radius: 8px; border-left: 3px solid var(--accent); font-size: 14px; margin-bottom: 12px; }
.profile-actions { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.profile-links { display: flex; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.profile-time { font-size: 13px; color: var(--text-muted); }
.verified-card, .member-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.verified-card { background: #f0f9ff; border: 1px solid #bae6fd; }
.member-card { background: linear-gradient(135deg,#fef3c7,#fffbeb); color: #78350f; border: 1px solid #fbbf24; }
.member-expire { font-size: 12px; opacity: 0.7; margin-left: 6px; }

/* ===== Membership Page ===== */
.membership-hero { text-align: center; padding: 20px 16px; margin-bottom: 16px; }
.membership-hero h1 { font-size: 22px; font-weight: 800; margin: 8px 0 4px; }
.membership-hero p { color: var(--text-muted); font-size: 14px; }
.price-show { text-align: center; padding: 20px; background: linear-gradient(135deg,#fef3c7,#fffbeb); border-radius: var(--radius); margin-bottom: 16px; border: 1px solid #fbbf24; }
.price-big { font-size: 40px; font-weight: 900; color: #78350f; }
.price-unit { font-size: 14px; color: #92400e; }
.pay-codes { display: flex; gap: 14px; margin-bottom: 16px; }
.pay-code-card { flex: 1; text-align: center; padding: 14px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); }
.pay-code-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.pay-code-card img { max-width: 100%; border-radius: 8px; }
.pay-noqr { text-align: center; padding: 24px; background: #fff; border-radius: var(--radius); border: 1px dashed var(--border); color: var(--text-muted); }

/* ===== Messages ===== */
.msg-page { max-width: 700px; }
.msg-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.msg-header-bar h1 { font-size: 20px; font-weight: 800; }
.msg-tabs { display: flex; gap: 2px; margin-bottom: 14px; background: #fff; border-radius: var(--radius); padding: 3px; border: 1px solid var(--border); }
.msg-tab { flex: 1; padding: 7px; border: none; border-radius: 10px; background: transparent; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.msg-tab.active { background: var(--accent-light); color: var(--accent); }
.msg-list { display: flex; flex-direction: column; gap: 1px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 3px; }
.msg-item { display: flex; align-items: center; gap: 12px; padding: 12px; text-decoration: none; color: inherit; border-radius: 10px; transition: background 0.15s; }
.msg-item:hover { background: #faf9fc; }
.msg-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg,#7c3aed,#a78bfa); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.msg-avatar svg { width: 18px; height: 18px; stroke: #fff; }
.group-avatar { border-radius: 10px; background: linear-gradient(135deg,#10b981,#0ea5e9); }
.msg-body { flex: 1; min-width: 0; }
.msg-name { font-size: 15px; font-weight: 700; margin-bottom: 1px; }
.msg-preview { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-meta { text-align: right; flex-shrink: 0; }
.msg-time { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 2px; }
.msg-unread { display: inline-block; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 8px; padding: 0 4px; }

/* Chat */
.chat-page { height: calc(100vh - 170px); display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.chat-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #faf9fc; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.chat-back { color: var(--accent); font-size: 14px; font-weight: 700; text-decoration: none; }
.chat-peer { display: flex; align-items: center; gap: 8px; }
.chat-peer-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#7c3aed,#a78bfa); color: #fff; display: flex; align-items: center; justify-content: center; }
.chat-peer-avatar svg { width: 14px; height: 14px; stroke: #fff; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.chat-bubble { max-width: 75%; display: flex; flex-direction: column; }
.chat-me { align-self: flex-end; align-items: flex-end; }
.chat-other { align-self: flex-start; align-items: flex-start; }
.chat-sender-name { font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: 1px; padding: 0 3px; }
.chat-bubble-content { padding: 8px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; word-break: break-word; }
.chat-me .chat-bubble-content { background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.chat-other .chat-bubble-content { background: #fff; border-bottom-left-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.chat-bubble-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; padding: 0 3px; }
.chat-input-bar { display: flex; gap: 8px; padding: 10px 16px; background: #fff; border-top: 1px solid var(--border); flex-shrink: 0; }
.chat-input-bar input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 16px; font-size: 14px; font-family: inherit; }
.chat-input-bar input:focus { outline: none; border-color: var(--accent); }
.chat-input-bar button { border-radius: 16px; }

/* Group */
.group-layout { display: flex; gap: 12px; }
.group-chat-main { flex: 1; min-width: 0; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; }
.group-chat-main .chat-messages { height: 360px; }
.group-header-info { flex: 1; }
.group-header-name { font-size: 15px; font-weight: 800; }
.group-header-count { font-size: 12px; color: var(--text-muted); }
.group-members-panel { width: 170px; flex-shrink: 0; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 12px; max-height: 440px; overflow-y: auto; }
.group-members-panel h3 { font-size: 13px; font-weight: 800; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.group-member-item { display: flex; align-items: center; gap: 6px; padding: 5px; font-size: 13px; font-weight: 600; border-radius: 6px; }
.group-member-item:hover { background: var(--accent-light); }
.gm-avatar { width: 28px; height: 28px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.gm-avatar svg { width: 12px; height: 12px; stroke: #fff; }

/* ===== Admin ===== */
.admin-page h1 { font-size: 22px; font-weight: 800; margin-bottom: 14px; }
.admin-tabs { display: flex; gap: 3px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-tabs a { padding: 7px 16px; background: var(--accent-light); color: var(--text-muted); text-decoration: none; border-radius: 8px 8px 0 0; font-size: 14px; font-weight: 600; }
.admin-tabs a:hover { background: #e0d8ff; }
.admin-tabs a.active { background: var(--accent); color: #fff; }
.admin-table { width: 100%; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); margin-top: 12px; }
.admin-table th, .admin-table td { padding: 10px 16px; font-size: 14px; border-bottom: 1px solid var(--border); }
.admin-table th { background: #faf9fc; font-weight: 700; }
.admin-table tr:hover td { background: #faf9fc; }
.admin-grid { display: flex; gap: 20px; }
.admin-col-main { flex: 1; min-width: 0; }
.admin-col-side { width: 270px; flex-shrink: 0; }
.admin-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 18px; margin-bottom: 14px; }
.admin-card h2 { font-size: 15px; font-weight: 800; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.stats-grid { display: flex; gap: 6px; }
.stat-item { flex: 1; text-align: center; background: var(--accent-light); border-radius: 8px; padding: 12px 6px; }
.stat-num { display: block; font-size: 20px; font-weight: 900; color: var(--accent); }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.info-list dt { color: var(--text-muted); margin-top: 8px; font-weight: 700; font-size: 12px; }
.info-list dd { font-weight: 600; }
.role-badge { padding: 3px 10px; border-radius: 20px; border: none; font-size: 12px; cursor: pointer; font-weight: 700; }
.role-badge:disabled { opacity: 0.5; }
.role-admin { background: linear-gradient(135deg,#a78bfa,#ec4899); color: #fff; }
.role-user { background: var(--accent-light); color: var(--accent); }

/* Settings */
.settings-form .form-group { margin-bottom: 14px; }
.settings-form label { display: block; margin-bottom: 4px; font-weight: 700; font-size: 14px; }
.settings-form input[type="text"], .settings-form input[type="number"], .settings-form textarea, .settings-form select { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; }
.settings-form input:focus, .settings-form textarea:focus, .settings-form select:focus { outline: none; border-color: var(--accent); }
.checkbox-label { display: flex !important; align-items: center; gap: 8px; cursor: pointer; font-weight: 600 !important; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.form-inline { display: flex; gap: 8px; padding: 12px; background: var(--accent-light); border-radius: var(--radius); flex-wrap: wrap; }
.form-inline input { flex: 1; min-width: 100px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; }
.page-info { font-size: 14px; color: var(--text-muted); }

/* Misc */
.empty { text-align: center; color: var(--text-muted); padding: 50px 0; font-size: 15px; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .main-content { padding: 14px 12px 100px; }
    .carousel-track { height: 200px; }
    .carousel-caption h3 { font-size: 15px; }
    .members-grid { grid-template-columns: repeat(3, 1fr); }
    .post-detail-layout { flex-direction: column; }
    .post-author-card { width: 100%; display: flex; flex-wrap: wrap; text-align: left; gap: 10px; padding: 14px; align-items: center; }
    .author-avatar-lg { width: 44px; height: 44px; font-size: 18px; margin: 0; flex-shrink: 0; }
    .author-badges { margin-bottom: 0; justify-content: flex-start; }
    .author-bio { display: none; }
    .author-stats-row { display: none; }
    .author-joined { border-top: none; padding-top: 0; margin-left: auto; }
    .cat-banner { padding: 16px; }
    .cat-banner h1 { font-size: 20px; }
    .category-cards { grid-template-columns: 1fr; }
    .admin-grid { flex-direction: column; }
    .admin-col-side { width: 100%; }
    .admin-tabs a { padding: 5px 10px; font-size: 13px; }
    .profile-card-top { flex-direction: column; text-align: center; }
    .profile-top-actions { margin-left: 0; margin-top: 6px; }
    .profile-actions { flex-direction: column; }
    .profile-actions .btn { width: 100%; }
    .group-layout { flex-direction: column; }
    .group-members-panel { width: 100%; max-height: 160px; }
    .group-chat-main .chat-messages { height: 260px; }
    .chat-page { height: calc(100vh - 150px); }
    .top-subtitle { display: none; }
    .search-form input { width: 130px; }
    .top-header-right { gap: 3px; overflow-x: auto; }
    .top-nav-link { font-size: 12px; padding: 4px 6px; white-space: nowrap; }
    .cat-tabs { flex-wrap: wrap; }
    .cat-tab { padding: 6px 12px; font-size: 13px; }
    .pay-codes { flex-direction: column; }
    .cat-nav-strip { padding: 8px 0; }
    .cat-nav-item { padding: 5px 14px; font-size: 13px; }
}
