:root {
  --primary: #00c853;
  --primary-dark: #00a844;
  --primary-light: #e8f5e9;
  --bg: #f5f5f5;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #999;
  --border: #e8e8e8;
  --danger: #ff5252;
  --warning: #ffab00;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 16px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.10);
  --nav-height: 64px;
  --max-width: 1200px;
  --safe-bottom: 0px;
}

* :focus { outline: none; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; font-size: 15px; overflow-x: hidden; }
a { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; font-family: inherit; font-size: inherit; -webkit-tap-highlight-color: transparent; }
input, textarea, select { font-family: inherit; font-size: inherit; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], textarea, select { -webkit-appearance: none; appearance: none; border-radius: var(--radius-sm); }

/* ===== Navbar ===== */
.navbar { position: fixed; top: 0; left: 0; right: 0; height: var(--nav-height); background: rgba(255,255,255,.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 1px 8px rgba(0,0,0,.08); z-index: 100; display: flex; align-items: center; }
.navbar-inner { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 20px; }
.navbar-brand { font-size: 22px; font-weight: 800; color: var(--primary); white-space: nowrap; display: flex; align-items: center; gap: 8px; letter-spacing: -0.5px; }
.navbar-brand svg { width: 30px; height: 30px; }
.navbar-nav { display: flex; gap: 6px; }
.navbar-nav a { padding: 8px 18px; border-radius: 22px; font-size: 15px; font-weight: 600; color: var(--text-secondary); transition: all .25s; }
.navbar-nav a:hover, .navbar-nav a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.navbar-search { flex: 1; max-width: 420px; position: relative; }
.navbar-search input { width: 100%; height: 40px; border: 1.5px solid var(--border); border-radius: 22px; padding: 0 18px 0 42px; font-size: 14px; outline: none; transition: all .25s; background: rgba(245,245,245,.6); color: var(--text); }
.navbar-search input::placeholder { color: #aaa; }
.navbar-search input:focus { border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(0,200,83,.1); }
.navbar-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-muted); }
.navbar-actions { display: flex; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 20px; border-radius: 22px; font-size: 14px; font-weight: 600; transition: all .25s; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,200,83,.3); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--primary); background: var(--primary-light); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; }
/* ===== Navbar User ===== */
.navbar-user { position: relative; display: flex; align-items: center; gap: 8px; }
.navbar-user-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #00bfa5); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; cursor: pointer; transition: all .2s; box-shadow: 0 2px 8px rgba(0,200,83,.25); flex-shrink: 0; position: relative; }
.navbar-user-avatar:hover { transform: scale(1.08); box-shadow: 0 4px 14px rgba(0,200,83,.35); }
.navbar-user-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.navbar-user-avatar .verified-badge { position: absolute; bottom: -3px; right: -3px; z-index: 2; background: #fff; border-radius: 50%; padding: 1.5px; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.navbar-user-avatar .verified-badge svg { width: 13px; height: 13px; }
.navbar-user-dropdown { position: absolute; top: 44px; right: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 180px; overflow: hidden; display: none; z-index: 200; border: 1px solid var(--border); }
.navbar-user-dropdown.show { display: block; }
.navbar-user-dropdown a, .navbar-user-dropdown button { display: block; width: 100%; padding: 12px 20px; font-size: 14px; color: var(--text); text-align: left; background: none; border: none; cursor: pointer; transition: background .15s; }
.navbar-user-dropdown a:hover, .navbar-user-dropdown button:hover { background: var(--primary-light); color: var(--primary); }

/* ===== Main Content ===== */
.main { margin-top: var(--nav-height); min-height: calc(100vh - var(--nav-height)); }
body.has-mobile-nav .main { padding-bottom: calc(84px + var(--safe-bottom)); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 24px; }

/* ===== Banner / Hero (Coverflow Carousel) ===== */
.hero { position: relative; margin-bottom: 0; padding: 24px 0; background: var(--bg, #f5f5f5); }
.hero-slider { position: relative; height: 340px; max-width: var(--max-width); margin: 0 auto; overflow: hidden; }
.hero-slide { position: absolute; top: 50%; left: 50%; width: 72%; height: 100%; border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: linear-gradient(135deg, #00c853 0%, #00bfa5 50%, #009688 100%); transform: translate(-50%, -50%) scale(0.78); opacity: 0; transition: transform .5s cubic-bezier(.25,.46,.45,.94), opacity .5s, z-index 0s .25s; z-index: 0; box-shadow: 0 4px 20px rgba(0,0,0,.1); cursor: default; }
.hero-slide.active { transform: translate(-50%, -50%) scale(1); opacity: 1; z-index: 3; transition: transform .5s cubic-bezier(.25,.46,.45,.94), opacity .5s, z-index 0s 0s; box-shadow: 0 8px 40px rgba(0,0,0,.18); }
.hero-slide.prev { transform: translate(calc(-50% - 60%), -50%) scale(0.82); opacity: .55; z-index: 1; }
.hero-slide.next { transform: translate(calc(-50% + 60%), -50%) scale(0.82); opacity: .55; z-index: 1; }
.hero-slide.prev2 { transform: translate(calc(-50% - 100%), -50%) scale(0.7); opacity: 0; z-index: 0; }
.hero-slide.next2 { transform: translate(calc(-50% + 100%), -50%) scale(0.7); opacity: 0; z-index: 0; }
.hero-slide.active.clickable { cursor: pointer; }
.hero-content { text-align: center; color: #fff; z-index: 1; padding: 20px 40px; }
.hero-content h1 { font-size: 40px; font-weight: 900; margin-bottom: 14px; text-shadow: 0 2px 12px rgba(0,0,0,.2); letter-spacing: -0.5px; }
.hero-content p { font-size: 18px; opacity: .92; margin-bottom: 26px; }
.hero-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); color: #555; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgba(0,0,0,.12); transition: all .2s; }
.hero-nav-btn:hover { background: #fff; color: var(--primary); box-shadow: 0 2px 16px rgba(0,0,0,.2); transform: translateY(-50%) scale(1.08); }
.hero-nav-prev { left: 8px; }
.hero-nav-next { right: 8px; }
.hero-dots { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 4; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: all .25s; }
.hero-dot.active { background: var(--primary); transform: scale(1.3); }

/* ===== Category Bar ===== */
.category-bar { background: var(--white); border-bottom: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,.03); position: relative; display: flex; align-items: center; }
.category-bar-inner { flex: 1; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; scroll-behavior: smooth; justify-content: center; }
.category-bar-inner::-webkit-scrollbar { display: none; }
.category-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(255,255,255,.95); color: var(--text-secondary); cursor: pointer; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: all .2s; flex-shrink: 0; }
.category-arrow:hover { background: var(--white); color: var(--primary); box-shadow: 0 2px 12px rgba(0,0,0,.18); }
.category-arrow-left { left: 6px; }
.category-arrow-right { right: 6px; }
.category-item { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 14px 18px; cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--text-secondary); transition: all .2s; border-bottom: 3px solid transparent; flex-shrink: 0; }
.category-item:hover, .category-item.active { color: var(--primary); border-bottom-color: var(--primary); }
.category-item .emoji { font-size: 24px; }

/* ===== Filter Bar ===== */
.filter-bar { background: var(--white); padding: 18px 0; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.filter-bar-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.filter-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label { font-size: 14px; font-weight: 600; color: var(--text-muted); min-width: 60px; }
.filter-tag { padding: 7px 18px; border-radius: 18px; font-size: 14px; color: var(--text-secondary); background: var(--bg); cursor: pointer; transition: all .2s; white-space: nowrap; font-weight: 500; border: 1px solid transparent; }
.filter-tag:hover, .filter-tag.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.sort-bar { display: flex; gap: 20px; margin-top: 14px; }
.sort-item { font-size: 14px; color: var(--text-muted); cursor: pointer; padding-bottom: 4px; border-bottom: 2px solid transparent; transition: all .2s; font-weight: 500; }
.sort-item:hover, .sort-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

/* ===== Event Cards ===== */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.event-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05); transition: all .35s cubic-bezier(.4,0,.2,1); cursor: pointer; border: 1px solid rgba(0,0,0,.04); }
.event-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.event-card-cover { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #e8f5e9, #c8e6c9); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.event-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-card-cover .placeholder-icon { font-size: 52px; opacity: .5; }
.event-card-badge { position: absolute; top: 12px; left: 12px; background: var(--primary); color: #fff; padding: 3px 12px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.event-card-format { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.55); color: #fff; padding: 3px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.event-card-body { padding: 18px; }
.event-card-title { font-size: 17px; font-weight: 700; line-height: 1.45; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-card-meta { display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--text-secondary); }
.event-card-meta-item { display: flex; align-items: center; gap: 7px; }
.event-card-meta svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.event-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.event-card-price { font-size: 20px; font-weight: 800; color: var(--primary); }
.event-card-price.free { color: var(--primary); font-size: 17px; }
.event-card-stats { display: flex; gap: 12px; font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ===== Event Detail ===== */
.event-detail { max-width: 800px; margin: 0 auto; }
.event-detail-cover { width: 100%; aspect-ratio: 16/7; background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; display: flex; align-items: center; justify-content: center; }
.event-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.event-detail-cover .placeholder-icon { font-size: 80px; opacity: .5; }
.event-detail-title { font-size: 30px; font-weight: 800; margin-bottom: 24px; line-height: 1.3; letter-spacing: -0.3px; }
.event-detail-info { display: grid; grid-template-columns: 1fr auto; gap: 28px; }
.event-detail-info-list { display: flex; flex-direction: column; gap: 18px; }
.event-detail-info-item { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; }
.event-detail-info-item svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.event-detail-info-item .label { color: var(--text-muted); min-width: 60px; font-weight: 500; }
.event-detail-info-item .value { font-weight: 600; color: var(--text); }
.event-detail-sidebar { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-lg); min-width: 270px; height: fit-content; position: sticky; top: 88px; border: 1px solid var(--border); }
.event-detail-sidebar .price { font-size: 38px; font-weight: 900; color: var(--primary); margin-bottom: 8px; }
.event-detail-sidebar .price.free { font-size: 28px; }
.event-detail-sidebar .reg-count { font-size: 15px; color: var(--text-muted); margin-bottom: 24px; }
.event-detail-sidebar .btn { width: 100%; justify-content: center; padding: 14px; font-size: 16px; font-weight: 700; }
.event-detail-desc { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border); }
.event-detail-desc h3 { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.event-detail-desc .content { font-size: 16px; line-height: 1.85; color: var(--text-secondary); }
.event-detail-tags { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.tag { padding: 5px 14px; border-radius: 16px; font-size: 13px; font-weight: 600; background: var(--primary-light); color: var(--primary); }

/* ===== Modal ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(4px); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal { background: var(--white); border-radius: var(--radius); width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { padding: 22px 26px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 19px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 26px; color: var(--text-muted); cursor: pointer; padding: 4px; line-height: 1; transition: color .15s; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 26px; }
.modal-footer { padding: 18px 26px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 12px; }

/* ===== Form ===== */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.form-input, .form-select, .form-textarea { width: 100%; height: 46px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 0 16px; font-size: 15px; outline: none; transition: all .2s; background: var(--white); }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,200,83,.1); }
.form-textarea { height: auto; padding: 12px 16px; resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error { font-size: 13px; color: var(--danger); margin-top: 6px; }
.form-hint { font-size: 13px; color: var(--text-muted); margin-top: 6px; }

/* ===== Admin ===== */
.admin-layout { display: flex; min-height: calc(100vh - var(--nav-height)); }
.admin-sidebar { width: 230px; background: var(--white); border-right: 1px solid var(--border); padding: 24px 0; flex-shrink: 0; }
.admin-sidebar-brand { padding: 0 24px 24px; font-size: 20px; font-weight: 800; color: var(--primary); border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.admin-sidebar a { display: flex; align-items: center; gap: 12px; padding: 12px 24px; font-size: 15px; font-weight: 500; color: var(--text-secondary); transition: all .2s; }
.admin-sidebar a:hover, .admin-sidebar a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.admin-sidebar svg { width: 20px; height: 20px; flex-shrink: 0; }
.admin-content { flex: 1; padding: 28px; overflow-x: auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 12px; flex-wrap: wrap; }
.admin-header h2 { font-size: 24px; font-weight: 700; }
.admin-sidebar-mobile-header { display: none; }
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04); transition: all .2s; border: 1px solid rgba(0,0,0,.05); }
.stat-card:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.stat-card .value { font-size: 34px; font-weight: 800; color: var(--primary); }
.stat-card .label { font-size: 14px; color: var(--text-muted); margin-top: 6px; font-weight: 500; }

/* ===== Table ===== */
.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table th { background: var(--bg); font-weight: 700; color: var(--text-secondary); white-space: nowrap; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table td { color: var(--text); }
.data-table tr:hover td { background: rgba(0,200,83,.03); }
.badge { padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.badge-green { background: #e8f5e9; color: #2e7d32; }
.badge-yellow { background: #fff8e1; color: #f57f17; }
.badge-red { background: #ffebee; color: #c62828; }
.badge-blue { background: #e3f2fd; color: #1565c0; }

/* ===== Pagination ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; }
.pagination button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--white); font-size: 14px; color: var(--text-secondary); cursor: pointer; transition: all .2s; display: flex; align-items: center; justify-content: center; font-weight: 500; }
.pagination button:hover, .pagination button.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); font-weight: 700; }

/* ===== Toast ===== */
.toast-container { position: fixed; top: 88px; right: 24px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 14px 22px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); animation: slideInRight .3s; min-width: 220px; }
.toast-success { background: #e8f5e9; color: #2e7d32; }
.toast-error { background: #ffebee; color: #c62828; }
.toast-info { background: #e3f2fd; color: #1565c0; }
@keyframes slideInRight { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 70px 20px; color: var(--text-muted); }
.empty-state svg { width: 88px; height: 88px; margin: 0 auto 18px; opacity: .35; }
.empty-state p { font-size: 17px; font-weight: 500; }

/* ===== Loading ===== */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== Footer ===== */
.footer { background: var(--white); border-top: 1px solid var(--border); padding: 48px 20px; margin-top: 48px; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-brand { font-size: 22px; font-weight: 800; color: var(--primary); }
.footer-copy { font-size: 14px; color: var(--text-muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.footer-links a:hover { color: var(--primary); }

/* ===== Back to top ===== */
.back-top { position: fixed; bottom: 28px; right: 28px; width: 48px; height: 48px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 50; opacity: 0; transform: translateY(10px); transition: all .3s; border: 1px solid var(--border); }
.back-top.show { opacity: 1; transform: translateY(0); }
.back-top:hover { color: var(--primary); border-color: var(--primary); box-shadow: 0 4px 20px rgba(0,200,83,.2); }
.back-top svg { width: 22px; height: 22px; }

/* ===== Responsive â€?Tablet & Mobile ===== */
@media (max-width: 768px) {
  :root { --nav-height: 54px; }
  .navbar { padding-top: env(safe-area-inset-top, 0px); height: calc(var(--nav-height) + env(safe-area-inset-top, 0px)); }
  .navbar-inner { padding: 0 12px; gap: 8px; }
  .navbar-brand { font-size: 18px; }
  .navbar-brand svg { width: 26px; height: 26px; }
  .navbar-nav { display: none; }
  .navbar-search { max-width: none; flex: 1; }
  .navbar-search input { height: 36px; font-size: 14px; padding: 0 14px 0 38px; border-radius: 18px; }
  .navbar-search svg { left: 12px; width: 16px; height: 16px; }
  .navbar-actions { gap: 6px; }
  .navbar-actions .btn-text { display: none; }
  .btn { padding: 7px 14px; font-size: 14px; }
  .navbar-user-avatar { width: 32px; height: 32px; font-size: 14px; }
  .navbar-notification { width: 32px; height: 32px; }
  .navbar-notification svg { width: 18px; height: 18px; }

  .hero { padding: 16px 0; }
  .hero-slider { height: 220px; }
  .hero-slide { width: 82%; border-radius: 10px; }
  .hero-slide.prev { transform: translate(calc(-50% - 55%), -50%) scale(0.78); }
  .hero-slide.next { transform: translate(calc(-50% + 55%), -50%) scale(0.78); }
  .hero-content { padding: 14px 24px; }
  .hero-content h1 { font-size: 22px; margin-bottom: 8px; }
  .hero-content p { font-size: 13px; margin-bottom: 12px; }
  .hero-nav-btn { width: 32px; height: 32px; }
  .hero-nav-prev { left: 4px; }
  .hero-nav-next { right: 4px; }
  .hero-dots { bottom: 4px; }

  .category-bar-inner { padding: 0 10px; }
  .category-item { padding: 10px 12px; font-size: 12px; }
  .category-item .emoji { font-size: 20px; }
  .category-arrow { width: 28px; height: 28px; }
  .category-arrow-left { left: 2px; }
  .category-arrow-right { right: 2px; }

  .filter-bar { padding: 14px 0; margin-bottom: 16px; }
  .filter-bar-inner { padding: 0 12px; }
  .filter-row { gap: 6px; margin-bottom: 8px; }
  .filter-label { font-size: 13px; min-width: 48px; }
  .filter-tag { padding: 6px 14px; font-size: 13px; }
  .sort-bar { gap: 14px; margin-top: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .sort-bar::-webkit-scrollbar { display: none; }
  .sort-item { font-size: 13px; white-space: nowrap; }

  .container { padding: 14px; }
  .event-grid { grid-template-columns: 1fr; gap: 14px; }
  .event-card-body { padding: 14px; }
  .event-card-title { font-size: 16px; margin-bottom: 10px; }
  .event-card-meta { font-size: 13px; gap: 6px; }
  .event-card-footer { margin-top: 12px; padding-top: 12px; }
  .event-card-price { font-size: 18px; }

  .event-detail-cover { aspect-ratio: 16/9; margin-bottom: 18px; border-radius: var(--radius-sm); }
  .event-detail-title { font-size: 22px; margin-bottom: 18px; }
  .event-detail-info { grid-template-columns: 1fr; gap: 18px; }
  .event-detail-info-list { gap: 14px; }
  .event-detail-info-item { font-size: 14px; }
  .event-detail-sidebar { position: static; min-width: auto; padding: 20px; }
  .event-detail-sidebar .price { font-size: 30px; }
  .event-detail-desc { margin-top: 24px; padding-top: 20px; }
  .event-detail-desc h3 { font-size: 18px; }
  .event-detail-desc .content { font-size: 15px; line-height: 1.8; }
  .event-detail-share { margin-top: 20px; padding-top: 18px; }
  .event-detail-qr { margin-top: 18px; padding: 18px; }
  .event-detail-bottom { margin-top: 20px; border-radius: var(--radius-sm); }

  /* Admin sidebar â†?off-canvas drawer */
  .admin-sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 240px; z-index: 300; transform: translateX(-100%); transition: transform .25s ease; padding-top: env(safe-area-inset-top, 0px); overflow-y: auto; box-shadow: var(--shadow-lg); }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-sidebar a span { display: inline !important; }
  .admin-sidebar-brand { font-size: 18px !important; padding: 0 24px 20px !important; }
  .admin-sidebar-mobile-header { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: var(--white); border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 600; color: var(--primary); cursor: pointer; position: sticky; top: 0; z-index: 10; }
  .admin-content { padding: 14px !important; width: 100% !important; }
  .admin-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 250; }
  .admin-overlay.show { display: block; }
  .admin-header { margin-bottom: 18px; }
  .admin-header h2 { font-size: 20px; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
  .stat-card { padding: 16px; }
  .stat-card .value { font-size: 28px; }
  .stat-card .label { font-size: 13px; }

  /* Tables â†?scrollable wrapper */
  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 10px 12px; }

  /* Modal â†?bottom-sheet style */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; width: 100%; max-height: 88vh; border-radius: var(--radius) var(--radius) 0 0; animation: slideUp .25s ease; }
  .modal-header { padding: 16px 20px; }
  .modal-header h3 { font-size: 17px; }
  .modal-body { padding: 20px; }
  .modal-footer { padding: 14px 20px; }
  @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

  .form-row { grid-template-columns: 1fr; }
  .form-label { font-size: 14px; }
  .form-input, .form-select, .form-textarea { height: 44px; font-size: 16px; }

  /* Toast â†?centered top */
  .toast-container { top: 70px; right: 12px; left: 12px; align-items: center; }
  .toast { min-width: auto; max-width: 100%; width: auto; font-size: 13px; padding: 12px 18px; text-align: center; }

  .footer { padding: 28px 16px; margin-top: 28px; padding-bottom: calc(28px + var(--safe-bottom)); }
  .footer-inner { flex-direction: column; text-align: center; gap: 10px; }
  .footer-brand { font-size: 18px; }

  .back-top { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); right: 16px; width: 42px; height: 42px; z-index: 200; }
  .back-top svg { width: 20px; height: 20px; }

  .notif-panel { width: calc(100vw - 24px); right: -8px; max-width: 360px; }

  .publish-form { padding: 16px; }
  .publish-notice { padding: 12px 14px; font-size: 14px; }
  .checkin-manager { padding: 16px; }

  /* Mobile bottom nav */
  .mobile-nav { display: block; }
  body.has-mobile-nav .main { padding-bottom: calc(60px + var(--safe-bottom, 0px)); }

  /* My Center - show grid on mobile */
  .mycenter-grid { grid-template-columns: repeat(4, 1fr); }

  .bottom-tab { padding: 12px 8px; font-size: 14px; }
  .bottom-tab-body { padding: 16px; font-size: 14px; }
  .topic-grid { grid-template-columns: 1fr !important; }
  .topic-detail-header { padding: 28px 18px !important; }
  .topic-detail-header h1 { font-size: 24px !important; }

  .share-bar { gap: 8px; }
  .share-item { padding: 6px 12px; font-size: 13px; }

  .md-editor-toolbar { padding: 6px; gap: 2px; }
  .md-btn { padding: 4px 8px; font-size: 12px; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .banner-row { grid-template-columns: 1fr !important; }

  /* Better touch targets */
  .pagination button { width: 36px; height: 36px; }
  .modal-close { width: 36px; height: 36px; font-size: 24px; display: flex; align-items: center; justify-content: center; }
}

@media (max-width: 480px) {
  .hero-slider { height: 180px; }
  .hero-slide { width: 88%; }
  .hero-slide.prev { transform: translate(calc(-50% - 50%), -50%) scale(0.74); opacity: .4; }
  .hero-slide.next { transform: translate(calc(-50% + 50%), -50%) scale(0.74); opacity: .4; }
  .hero-content h1 { font-size: 19px; }
  .hero-content p { font-size: 13px; }
  .hero-nav-btn { width: 28px; height: 28px; }
  .event-card-cover .placeholder-icon { font-size: 40px; }
  .event-card-body { padding: 12px; }
  .event-card-title { font-size: 15px; }
  .event-card-meta { font-size: 12px; }
  .event-card-price { font-size: 17px; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .value { font-size: 24px; }
  .stat-card .label { font-size: 12px; }
  .category-item { padding: 8px 10px; }
  .category-item .emoji { font-size: 18px; }
  .filter-tag { padding: 5px 12px; font-size: 12px; }
  .container { padding: 12px; }
  .event-detail-title { font-size: 20px; }
  .form-input, .form-select, .form-textarea { height: 42px; }
  .mobile-nav-item svg { width: 20px; height: 20px; }
  .mobile-nav-item span { font-size: 10px; }
  .mobile-nav-icon-wrap { width: 20px; height: 20px; }
  .mobile-nav-icon-wrap svg { width: 20px; height: 20px; }
  .mobile-nav-badge { min-width: 13px; height: 13px; font-size: 8px; right: -6px; top: -5px; border-width: 1.5px; }
  .mobile-nav-publish-btn { width: 38px; height: 38px; margin-top: -2px; }
  .mobile-nav-publish-btn svg { width: 20px; height: 20px; }

  /* My Center responsive */
  .mycenter-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .mycenter-grid-item { padding: 14px 6px; }
  .mycenter-grid-item svg { width: 24px; height: 24px; }
  .mycenter-grid-item span { font-size: 11px; }
  .mycenter-card { padding: 16px; gap: 12px; }
  .mycenter-avatar { width: 48px; height: 48px; font-size: 20px; }
  .mycenter-name { font-size: 16px; }
  .mycenter-menu-item { padding: 14px 16px; }
}

/* ===== Mobile bottom nav ===== */
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: auto; min-height: 50px; background: rgba(255,255,255,.92); backdrop-filter: blur(24px) saturate(200%); -webkit-backdrop-filter: blur(24px) saturate(200%); box-shadow: 0 -1px 0 rgba(0,0,0,.06), 0 -4px 20px rgba(0,0,0,.05); z-index: 100; transition: transform .35s cubic-bezier(.4,0,.2,1); will-change: transform; -webkit-overflow-scrolling: touch; }
.mobile-nav.nav-hidden { transform: translateY(110%); }
.mobile-nav-inner { display: flex; align-items: stretch; min-height: 50px; max-width: 480px; margin: 0 auto; padding: 0 4px; padding-bottom: constant(safe-area-inset-bottom, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.mobile-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 500; color: var(--text-muted); cursor: pointer; padding: 6px 0; transition: color .25s ease; -webkit-tap-highlight-color: transparent; position: relative; width: 20%; min-width: 0; flex-shrink: 1; box-sizing: border-box; }
.mobile-nav-item::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%) scale(0); width: 20px; height: 3px; border-radius: 0 0 4px 4px; background: var(--primary); transition: transform .3s cubic-bezier(.4,0,.2,1); box-shadow: 0 1px 4px rgba(0,200,83,.3); }
.mobile-nav-item.active { color: var(--primary); font-weight: 700; }
.mobile-nav-item.active::before { transform: translateX(-50%) scale(1); }
.mobile-nav-item svg { width: 22px; height: 22px; flex-shrink: 0; transition: all .25s ease; }
.mobile-nav-item.active svg { transform: scale(1.05); }
.mobile-nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; line-height: 1.2; transition: font-weight .2s; }
.mobile-nav-icon-wrap { position: relative; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; transition: all .25s ease; }
.mobile-nav-icon-wrap svg { width: 22px; height: 22px; }
.mobile-nav-badge { position: absolute; top: -6px; right: -8px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1; border: 2px solid rgba(255,255,255,.95); pointer-events: none; box-shadow: 0 1px 4px rgba(255,82,82,.4); }
/* Publish button in tab */
.mobile-nav-publish-wrap::before { display: none; }
.mobile-nav-publish-btn { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #00bfa5); color: #fff; margin-top: -4px; box-shadow: none; transition: all .2s cubic-bezier(.4,0,.2,1); flex-shrink: 0; border: none; }
.mobile-nav-publish-btn:active { transform: scale(.92); opacity: .85; }
.mobile-nav-publish-btn svg { width: 22px; height: 22px; }
.mobile-nav-publish-wrap.active .mobile-nav-publish-btn { background: linear-gradient(135deg, #00bfa5, var(--primary)); transform: scale(1.06); }
.mobile-nav-publish-wrap.active { color: var(--primary); }

/* Re-declare mobile-nav display in a later media query block to win the cascade over the base `display:none` above */
@media (max-width: 768px) {
  .mobile-nav { display: block !important; }
  /* When nav is hidden, remove bottom padding so content fills space */
  body.has-mobile-nav-hidden .main { padding-bottom: 0 !important; }
}

/* ===== WeChat & Huawei browser compat ===== */
body.is-wechat .mobile-nav,
body.is-huawei .mobile-nav {
  background: rgba(255,255,255,.96);
  box-shadow: 0 -1px 0 rgba(0,0,0,.08), 0 -2px 12px rgba(0,0,0,.06);
}
/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(1px)) {
  .mobile-nav { background: rgba(255,255,255,.98); }
}
@supports not (-webkit-backdrop-filter: blur(1px)) {
  .mobile-nav { background: rgba(255,255,255,.98); }
}
/* WeChat may not handle env() well, use JS-injected --safe-bottom */
body.is-wechat .mobile-nav-inner,
body.is-huawei .mobile-nav-inner {
  padding-bottom: var(--safe-bottom, 0px);
}
body.is-wechat .main,
body.is-huawei .main {
  padding-bottom: calc(60px + var(--safe-bottom, 20px)) !important;
}
/* WeChat/Huawei: ensure publish button doesn't get cut off */
body.is-wechat .mobile-nav-publish-btn,
body.is-huawei .mobile-nav-publish-btn {
  margin-top: 0;
  width: 38px;
  height: 38px;
}
/* WeChat/Huawei: ensure tab text always visible */
body.is-wechat .mobile-nav-item span,
body.is-huawei .mobile-nav-item span {
  font-size: 10px;
  line-height: 1.3;
}

/* ===== My Center Page ===== */
.mycenter-card { display: flex; align-items: center; gap: 16px; background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; cursor: pointer; transition: box-shadow .2s; }
.mycenter-card:active { box-shadow: var(--shadow-sm); }
.mycenter-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #667eea); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; flex-shrink: 0; position: relative; }
.mycenter-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.mycenter-info { flex: 1; min-width: 0; }
.mycenter-name { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.mycenter-desc { font-size: 13px; color: var(--text-muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mycenter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.mycenter-grid-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; transition: all .2s; -webkit-tap-highlight-color: transparent; }
.mycenter-grid-item:active { background: var(--bg); transform: scale(.97); }
.mycenter-grid-item svg { width: 28px; height: 28px; color: var(--primary); }
.mycenter-grid-item span { font-size: 12px; font-weight: 600; color: var(--text); }
.mycenter-menu { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.mycenter-menu-item { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; transition: background .15s; -webkit-tap-highlight-color: transparent; border-bottom: 1px solid var(--border); }
.mycenter-menu-item:last-child { border-bottom: none; }
.mycenter-menu-item:active { background: var(--bg); }
.mycenter-menu-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mycenter-menu-icon svg { width: 20px; height: 20px; color: var(--primary); }
.mycenter-menu-item span { flex: 1; font-size: 15px; font-weight: 500; }

/* ===== Notifications Page ===== */
.notif-page-item { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; -webkit-tap-highlight-color: transparent; }
.notif-page-item:last-child { border-bottom: none; }
.notif-page-item:active { background: var(--bg); }
.notif-page-item.unread { background: #f0f9f0; }
.notif-page-dot { width: 8px; padding-top: 6px; flex-shrink: 0; }
.notif-page-dot span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.notif-page-content { flex: 1; min-width: 0; }
.notif-page-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.notif-page-body { font-size: 13px; color: var(--text-secondary); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-page-time { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ===== Publish Page ===== */
.publish-notice { background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--radius-sm); padding: 14px 18px; font-size: 15px; color: #f57f17; margin-bottom: 24px; line-height: 1.6; }
.publish-form { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }

/* ===== Check-in ===== */
.checkin-manager { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.checkin-qr-modal { text-align: center; }
.checkin-qr-modal canvas { border-radius: 8px; }
.checkin-success-icon { width: 68px; height: 68px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
#scanQRReader { border-radius: var(--radius-sm); overflow: hidden; }

/* ===== Notification Bell ===== */
.navbar-notification { position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; transition: all .2s; }
.navbar-notification:hover { background: var(--primary-light); }
.navbar-notification svg { width: 20px; height: 20px; color: var(--text-secondary); transition: color .2s; }
.navbar-notification:hover svg { color: var(--primary); }
.notif-badge { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1; border: 2px solid var(--white); }

/* ===== Notification Panel ===== */
.notif-panel { position: absolute; top: 44px; right: 0; width: 360px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--border); display: none; z-index: 200; overflow: hidden; }
.notif-panel.show { display: block; }
.notif-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 16px; }
.notif-panel-list { max-height: 400px; overflow-y: auto; }
.notif-item { padding: 14px 20px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.notif-item:hover { background: var(--primary-light); }
.notif-item.unread { background: #f0f9f0; }
.notif-item-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.notif-item-content { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.notif-item-time { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.notif-loading, .notif-empty { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ===== Follow Button ===== */
.follow-btn { margin-left: 8px; font-size: 13px !important; padding: 4px 14px !important; }
.follow-btn.following { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* ===== Share Bar ===== */
.event-detail-share { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.share-bar { display: flex; gap: 12px; flex-wrap: wrap; }
.share-item { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 22px; background: var(--bg); color: var(--text-secondary); font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); transition: all .2s; }
.share-item:hover { transform: translateY(-1px); }
.share-icon-circle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.share-copy:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.share-wechat:hover { color: #07c160; border-color: #07c160; }
.share-weibo:hover { color: #e6162d; border-color: #e6162d; }
.share-qzone:hover { color: #f5a623; border-color: #f5a623; }
.share-qq:hover { color: #12b7f5; border-color: #12b7f5; }
.share-twitter:hover { color: #000; border-color: #000; }

/* ===== Event Page QR Code ===== */
.event-detail-qr { margin-top: 24px; text-align: center; padding: 24px; background: var(--bg); border-radius: var(--radius); }
.qr-label { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.qr-canvas { display: flex; justify-content: center; margin-bottom: 8px; }
.qr-canvas canvas { border-radius: 8px !important; }
.qr-hint { font-size: 13px; color: var(--text-muted); }

/* ===== Bottom Tabs (æ´»åŠ¨è¯¦æƒ…é¡µåº•éƒ? ===== */
.event-detail-bottom { margin-top: 32px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.bottom-tabs { display: flex; background: var(--bg); border-bottom: 1px solid var(--border); }
.bottom-tab { flex: 1; text-align: center; padding: 14px 20px; font-size: 15px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all .2s; border-bottom: 3px solid transparent; }
.bottom-tab:hover { color: var(--primary); background: rgba(0,200,83,.04); }
.bottom-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--white); }
.bottom-tab-content { padding: 0; }
.bottom-tab-panel { display: none; }
.bottom-tab-panel.active { display: block; }
.bottom-tab-body { padding: 24px; font-size: 15px; line-height: 1.8; color: var(--text-secondary); }

/* ===== Back to Top Floating Button ===== */
.back-to-top { position: fixed; right: 28px; bottom: 90px; width: 44px; height: 44px; border-radius: 50%; background: var(--white); border: 1px solid var(--border); box-shadow: 0 2px 12px rgba(0,0,0,.12); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all .3s cubic-bezier(.4,0,.2,1); z-index: 900; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary); border-color: var(--primary); box-shadow: 0 4px 16px rgba(0,200,83,.3); }
.back-to-top:hover svg { stroke: #fff; }
.back-to-top svg { width: 22px; height: 22px; stroke: var(--text-secondary); transition: stroke .2s; }
@media (max-width: 768px) {
  .back-to-top { right: 16px; bottom: 80px; width: 40px; height: 40px; }
  .back-to-top svg { width: 20px; height: 20px; }
}

/* ===== Responsiveè¡¥å…… ===== */
@media (max-width: 768px) {
  .notif-panel { width: calc(100vw - 24px); right: -8px; max-width: 360px; }
}

/* ===== Topic Cards ===== */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.topic-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05); transition: all .35s cubic-bezier(.4,0,.2,1); cursor: pointer; border: 1px solid rgba(0,0,0,.04); }
.topic-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.topic-card-cover { position: relative; aspect-ratio: 16/8; background: linear-gradient(135deg, #e8f5e9, #c8e6c9); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.topic-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.topic-card-cover .placeholder-icon { font-size: 48px; opacity: .5; }
.topic-card-body { padding: 18px; }
.topic-card-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.topic-card-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.topic-card-footer { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-muted); }

/* ===== Topic Detail ===== */
.topic-detail-header { background: linear-gradient(135deg, #00c853, #00bfa5); color: #fff; padding: 48px 32px; border-radius: var(--radius); margin-bottom: 28px; }
.topic-detail-header h1 { font-size: 32px; font-weight: 900; margin-bottom: 12px; }
.topic-detail-header p { font-size: 16px; opacity: .9; line-height: 1.7; max-width: 700px; }

/* ===== Site Logo in Navbar ===== */
.navbar-brand-logo { height: 40px; width: auto; border-radius: 8px; object-fit: contain; }

/* ===== ICP / Footer Filing ===== */
.footer-icp { margin-top: 8px; }
.footer-icp a { font-size: 13px; color: var(--text-muted); transition: color .2s; }
.footer-icp a:hover { color: var(--primary); }

/* ===== Banner Management Row ===== */
.banner-row { margin-bottom: 0; }
.banner-row .form-input { font-size: 14px; }

/* ===== Markdown Editor ===== */
.md-editor { border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.md-editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,200,83,.1); }
.md-editor-toolbar { display: flex; gap: 2px; padding: 8px 10px; background: var(--bg); border-bottom: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.md-btn { padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--text-secondary); background: var(--white); border: 1px solid var(--border); cursor: pointer; transition: all .15s; white-space: nowrap; }
.md-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.md-btn.active { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.md-editor-textarea { border: none !important; border-radius: 0 !important; min-height: 240px; resize: vertical; }
.md-editor-textarea:focus { box-shadow: none !important; border-color: transparent !important; }
.md-editor-preview { padding: 16px; min-height: 240px; max-height: 500px; overflow-y: auto; background: var(--white); font-size: 15px; line-height: 1.7; }

/* ===== Markdown Rendered Content ===== */
.markdown-body { line-height: 1.8; }
.markdown-body h1 { font-size: 28px; font-weight: 800; margin: 24px 0 16px; border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.markdown-body h2 { font-size: 22px; font-weight: 700; margin: 20px 0 12px; }
.markdown-body h3 { font-size: 18px; font-weight: 700; margin: 16px 0 10px; }
.markdown-body p { margin: 8px 0; }
.markdown-body ul, .markdown-body ol { padding-left: 24px; margin: 8px 0; }
.markdown-body li { margin: 4px 0; }
.markdown-body code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 14px; font-family: 'Menlo', 'Consolas', monospace; }
.markdown-body pre { background: #1e1e1e; color: #d4d4d4; padding: 16px; border-radius: 8px; overflow-x: auto; margin: 12px 0; }
.markdown-body pre code { background: none; padding: 0; color: inherit; }
.markdown-body blockquote { border-left: 4px solid var(--primary); padding: 8px 16px; margin: 12px 0; background: var(--primary-light); border-radius: 0 8px 8px 0; color: var(--text-secondary); }
.markdown-body img { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.markdown-body video { max-width: 100%; border-radius: 8px; margin: 12px 0; }
.markdown-body a { color: var(--primary); text-decoration: underline; }
.markdown-body table { border-collapse: collapse; width: 100%; margin: 12px 0; }
.markdown-body th, .markdown-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.markdown-body th { background: var(--bg); font-weight: 700; }

/* ===== Media Management ===== */
.media-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px; align-items: center; }
.media-tab { padding: 10px 24px; font-size: 15px; font-weight: 600; color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.media-tab:hover { color: var(--primary); }
.media-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.media-item { background: var(--white); border-radius: var(--radius-sm); border: 1px solid var(--border); overflow: hidden; transition: all .2s; position: relative; }
.media-item:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.media-item-thumb { aspect-ratio: 16/10; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.media-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-item-icon { font-size: 36px; opacity: .5; }
.media-item-info { padding: 10px 14px; }
.media-item-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-item-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.media-item-actions { padding: 0 14px 10px; display: flex; gap: 4px; }

/* ===== Responsive for new components ===== */
/* (merged into main responsive block above) */

/* ===== Mail Config ===== */
.mail-config-info { background: var(--primary-light); border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.mail-config-info strong { color: var(--primary); }

/* ===== Checkin Filter Buttons ===== */
.checkin-filter-btn { border: 1.5px solid var(--border) !important; border-radius: 18px !important; padding: 5px 16px !important; font-size: 13px !important; font-weight: 600; }
.checkin-filter-btn.active { color: var(--primary) !important; border-color: var(--primary) !important; background: var(--primary-light) !important; }

/* ===== Verified Badge ===== */
.verified-badge { display: inline-flex; align-items: center; justify-content: center; }
.verified-badge svg { width: 14px; height: 14px; }
.verified-badge-inline { display: inline-flex; align-items: center; margin-left: 3px; vertical-align: middle; }
.verified-badge-inline svg { width: 15px; height: 15px; }
.verified-badge-small { display: inline-flex; align-items: center; margin-left: 3px; vertical-align: middle; }
.verified-badge-small svg { width: 16px; height: 16px; }
.event-card-verified { display: inline-flex; align-items: center; margin-left: 3px; vertical-align: middle; }
.event-card-verified svg { width: 14px; height: 14px; }
.mycenter-avatar .verified-badge { position: absolute; bottom: -3px; right: -3px; z-index: 2; background: #fff; border-radius: 50%; padding: 1.5px; line-height: 1; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.mycenter-avatar .verified-badge svg { width: 16px; height: 16px; }

/* ===== User Type Cards (Register) ===== */
.user-type-card { display: block; cursor: pointer; position: relative; }
.user-type-card input[type="radio"] { position: absolute; opacity: 0; }
.user-type-card-body { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px; border: 2px solid var(--border); border-radius: 12px; text-align: center; transition: all .25s; }
.user-type-card input:checked + .user-type-card-body { border-color: var(--primary); background: var(--primary-light); }
.user-type-card:hover .user-type-card-body { border-color: var(--primary); }

/* ===== Interest Chips ===== */
.interest-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.interest-chip { display: inline-flex; cursor: pointer; position: relative; }
.interest-chip input[type="checkbox"] { position: absolute; opacity: 0; }
.interest-chip span { display: inline-block; padding: 6px 14px; border: 1.5px solid var(--border); border-radius: 18px; font-size: 13px; font-weight: 500; color: var(--text-secondary); transition: all .2s; user-select: none; }
.interest-chip:hover span { border-color: var(--primary); color: var(--primary); }
.interest-chip.selected span, .interest-chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== Verify Status ===== */
.verify-status { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 12px; background: var(--bg); }
.verify-status.verified { background: var(--primary-light); }
.verify-status.unverified { background: #fff8e1; }
.verify-icon { flex-shrink: 0; }

/* ===== Tag Cloud ===== */
.tag-cloud { display: inline-block; padding: 5px 14px; border: 1.5px solid var(--border); border-radius: 18px; font-size: 13px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: all .2s; background: var(--white); }
.tag-cloud:hover { border-color: var(--primary); color: var(--primary); }
.tag-cloud.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== Event Card Tags ===== */
.event-card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0; }
.event-card-tag { display: inline-block; padding: 2px 8px; background: var(--bg); border-radius: 4px; font-size: 11px; color: var(--text-muted); cursor: pointer; transition: all .2s; }
.event-card-tag:hover { background: var(--primary-light); color: var(--primary); }

/* ===== Login Divider ===== */
.login-divider { text-align: center; margin: 16px 0 12px; position: relative; }
.login-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--border); }
.login-divider span { position: relative; background: var(--white); padding: 0 12px; font-size: 12px; color: var(--text-muted); }

/* ===== Social Login ===== */
.social-login-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; background: transparent; border: none; cursor: pointer; padding: 8px; border-radius: 10px; transition: all .2s; }
.social-login-btn:hover { background: var(--bg); transform: translateY(-2px); }

/* ===== WeChat Admin Menu Items ===== */
.wx-menu-item { transition: box-shadow .2s; }
.wx-menu-item:hover { box-shadow: var(--shadow); }

/* Badge Red */
.badge-red { background: #fef2f2 !important; color: #dc2626 !important; }

