/* ============================================
   我是小红帽 · Design System v2.0
   ============================================ */

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif; background: #0a0a12; color: #e8e8f0; min-height: 100vh; line-height: 1.5; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; outline: none; cursor: pointer; background: none; }
img { max-width: 100%; display: block; }
input, textarea { font-family: inherit; outline: none; border: none; }

/* === CSS Variables === */
:root {
  --c-primary: #FF6B9D;
  --c-primary-dark: #E8558A;
  --c-primary-light: rgba(255,107,157,0.15);
  --c-accent: #9C88FF;
  --c-accent-light: rgba(156,136,255,0.15);
  --c-success: #4CAF50;
  --c-success-light: rgba(76,175,80,0.15);
  --c-warning: #FFB74D;
  --c-danger: #EF5350;
  --c-bg-dark: #0a0a12;
  --c-bg-card: #141420;
  --c-bg-elevated: #1a1a2e;
  --c-bg-input: #1e1e30;
  --c-border: rgba(255,255,255,0.06);
  --c-border-light: rgba(255,255,255,0.1);
  --c-text-primary: #e8e8f0;
  --c-text-secondary: #999;
  --c-text-muted: #666;
  --c-text-dim: #444;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 50%;
  --shadow-card: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-popup: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-btn: 0 4px 15px rgba(255,107,157,0.25);
  --transition: 0.2s ease;
}

/* === Page Container === */
.page { max-width: 420px; min-height: 100vh; margin: 0 auto; background: var(--c-bg-dark); position: relative; padding-bottom: 70px; }

/* === Typography === */
.text-xl { font-size: 20px; font-weight: 700; }
.text-lg { font-size: 16px; font-weight: 600; }
.text-md { font-size: 14px; font-weight: 500; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--c-text-secondary); }
.text-dim { color: var(--c-text-muted); }
.text-pink { color: var(--c-primary); }
.text-purple { color: var(--c-accent); }
.text-center { text-align: center; }

/* === Top Navigation === */
.top-nav { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: var(--c-bg-dark); position: sticky; top: 0; z-index: 100; }
.top-nav .nav-title { font-size: 17px; font-weight: 700; }
.top-nav .nav-btn { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--c-bg-elevated); display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--c-text-primary); transition: var(--transition); }
.top-nav .nav-btn:active { transform: scale(0.92); background: var(--c-bg-input); }
.top-nav .nav-actions { display: flex; gap: 8px; }
.top-nav .logo { display: flex; align-items: center; gap: 8px; }
.top-nav .logo-dot { width: 8px; height: 8px; border-radius: var(--r-full); background: var(--c-success); }

/* === Bottom Navigation (Floating 3-Icon Bar) === */
.bottom-nav { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); width: auto; max-width: 420px; height: auto; background: transparent; border: none; border-radius: 0; display: flex; align-items: center; gap: 16px; z-index: 200; padding: 10px 20px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0)); }
.nav-item { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: rgba(10,10,18,0.9); cursor: pointer; transition: all 0.25s ease; position: relative; }
.nav-item:active { transform: scale(0.92); }
.nav-item .nav-icon { font-size: 24px; line-height: 1; color: #fff; display: flex; align-items: center; justify-content: center; }
.nav-item .nav-icon svg { width: 26px; height: 26px; fill: #fff; }
.nav-item.active { background: rgba(255,107,157,0.2); border: 1px solid rgba(255,107,157,0.3); }
.nav-item.active .nav-icon svg { fill: var(--c-primary); }
.nav-item .nav-badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--c-accent); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; font-weight: 700; padding: 0 5px; border: 2px solid rgba(10,10,18,0.9); }
.nav-item .nav-label { display: none; }

/* === Buttons === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; transition: var(--transition); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, var(--c-primary), #C44DFF); color: #fff; box-shadow: var(--shadow-btn); }
.btn-secondary { background: var(--c-bg-elevated); color: var(--c-text-primary); }
.btn-outline { background: transparent; border: 1px solid var(--c-border-light); color: var(--c-text-primary); }
.btn-ghost { background: transparent; color: var(--c-text-secondary); }
.btn-block { display: flex; width: 100%; }
.btn-lg { height: 46px; border-radius: 23px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 16px; }

/* === Cards === */
.card { background: var(--c-bg-card); border-radius: var(--r-md); border: 1px solid var(--c-border); overflow: hidden; }
.card-body { padding: 16px; }

/* === Tags === */
.tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--r-sm); font-size: 11px; font-weight: 500; }
.tag-pink { background: var(--c-primary-light); color: var(--c-primary); }
.tag-purple { background: var(--c-accent-light); color: var(--c-accent); }
.tag-green { background: var(--c-success-light); color: var(--c-success); }
.tag-default { background: rgba(255,255,255,0.06); color: var(--c-text-secondary); }

/* === Avatar === */
.avatar { width: 44px; height: 44px; border-radius: var(--r-full); overflow: hidden; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; font-size: 14px; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar-xl { width: 80px; height: 80px; font-size: 30px; }
.avatar-pink { background: linear-gradient(135deg, #FFB6C1, var(--c-primary)); }
.avatar-purple { background: linear-gradient(135deg, #C4B5FD, var(--c-accent)); }
.avatar-blue { background: linear-gradient(135deg, #93C5FD, #3B82F6); }

/* === Match Score Bar === */
.score-bar { display: flex; align-items: center; gap: 8px; }
.score-track { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.score-fill.high { background: linear-gradient(90deg, var(--c-primary), #C44DFF); }
.score-fill.mid { background: linear-gradient(90deg, var(--c-warning), var(--c-primary)); }
.score-fill.low { background: linear-gradient(90deg, #64748B, #94A3B8); }
.score-value { font-size: 13px; font-weight: 700; min-width: 36px; text-align: right; }

/* === User Card (for popup & list) === */
.user-card { padding: 14px; }
.user-card .uc-header { display: flex; gap: 12px; align-items: center; }
.user-card .uc-name { font-size: 15px; font-weight: 700; }
.user-card .uc-age { font-size: 12px; color: var(--c-text-secondary); margin-left: 6px; }
.user-card .uc-meta { display: flex; gap: 8px; font-size: 11px; color: var(--c-text-muted); margin-top: 3px; }
.user-card .uc-bio { font-size: 12px; color: var(--c-text-secondary); margin-top: 8px; line-height: 1.4; }
.user-card .uc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.user-card .uc-actions { display: flex; gap: 8px; margin-top: 12px; }
.user-card .uc-actions .btn { flex: 1; height: 36px; font-size: 13px; border-radius: 18px; }

/* === List Item === */
.list-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--c-border); }
.list-item:active { background: var(--c-bg-elevated); }
.list-content { flex: 1; min-width: 0; }
.list-title { font-size: 14px; font-weight: 600; }
.list-subtitle { font-size: 12px; color: var(--c-text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-right { text-align: right; flex-shrink: 0; }
.list-time { font-size: 10px; color: var(--c-text-dim); }

/* === Empty State === */
.empty-state { text-align: center; padding: 60px 20px; color: var(--c-text-muted); }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state .empty-text { font-size: 14px; }

/* === Toast === */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.85); color: #fff; padding: 12px 24px; border-radius: var(--r-sm); font-size: 14px; z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.3s; pointer-events: none; }
.toast.show { opacity: 1; visibility: visible; }

/* === Loading === */
.loading { display: flex; align-items: center; justify-content: center; height: 200px; color: var(--c-text-muted); }

/* === Map-specific (Leaflet) === */
.leaflet-container { background: #0a0a12 !important; }
.map-marker { width: 48px; height: 48px; border-radius: 50%; border: 3px solid rgba(255,107,157,0.6); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #fff; position: relative; cursor: pointer; }
.map-marker .pulse { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(255,107,157,0.3); animation: pulse-ring 2s ease-out infinite; pointer-events: none; }
@keyframes pulse-ring { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

/* Leaflet popup override */
.leaflet-popup-content-wrapper { background: var(--c-bg-card) !important; border-radius: var(--r-md) !important; border: 1px solid var(--c-border) !important; box-shadow: var(--shadow-popup) !important; color: var(--c-text-primary) !important; }
.leaflet-popup-content { margin: 0 !important; width: 260px !important; }
.leaflet-popup-tip { background: var(--c-bg-card) !important; border: 1px solid var(--c-border) !important; }
.leaflet-popup-close-button { color: var(--c-text-muted) !important; font-size: 20px !important; }

/* === Utilities === */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.p-16 { padding: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.w-full { width: 100%; }
.hide { display: none !important; }

/* === Modal Popup === */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 300; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-popup { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95); width: calc(100% - 32px); max-width: 400px; height: 55vh; background: transparent; backdrop-filter: blur(40px) saturate(1.6); -webkit-backdrop-filter: blur(40px) saturate(1.6); border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; z-index: 301; transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); overflow: hidden; display: flex; flex-direction: column; opacity: 0; visibility: hidden; }
.modal-popup.half { height: 55vh; }
.modal-popup.no-header .modal-header { display: none; }
.modal-popup.show { transform: translate(-50%, -50%) scale(1); opacity: 1; visibility: visible; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); flex-shrink: 0; background: rgba(255,255,255,0.03); }
.modal-header .modal-title { font-size: 16px; font-weight: 700; }
.modal-header .modal-close { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--c-text-muted); cursor: pointer; transition: var(--transition); }
.modal-header .modal-close:active { background: rgba(255,255,255,0.2); }
.modal-body { flex: 1; overflow-y: auto; padding: 0; -webkit-overflow-scrolling: touch; }

/* === AI Chat === */
.ai-chat-body { padding: 12px 16px !important; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; word-break: break-word; animation: fadeIn 0.2s ease; }
.ai-msg.bot { align-self: flex-start; background: rgba(255,255,255,0.08); color: var(--c-text-primary); border-bottom-left-radius: 4px; }
.ai-msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--c-primary), #C44DFF); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.typing { opacity: 0.6; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity:0.4; } 50% { opacity:0.8; } }
.ai-input-bar { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid rgba(255,255,255,0.08); background: transparent; flex-shrink: 0; }
.ai-input-bar input { flex: 1; height: 38px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 19px; padding: 0 16px; color: var(--c-text-primary); font-size: 14px; }
.ai-input-bar input::placeholder { color: var(--c-text-muted); }
.ai-input-bar button { height: 38px; padding: 0 18px; background: linear-gradient(135deg, var(--c-primary), #C44DFF); color: #fff; border-radius: 19px; font-size: 14px; font-weight: 600; }
.ai-input-bar button:active { transform: scale(0.95); }

/* === WeChat-Style Message List === */
.msg-conv-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer; transition: var(--transition); }
.msg-conv-item:active { background: rgba(255,255,255,0.04); }
.msg-avatar { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; color: #fff; flex-shrink: 0; }
.msg-conv-content { flex: 1; min-width: 0; }
.msg-conv-name { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.msg-conv-last { font-size: 12px; color: var(--c-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-conv-time { font-size: 10px; color: var(--c-text-dim); flex-shrink: 0; align-self: flex-start; margin-top: 2px; }

/* === Feed Panel === */
.feed-handle { padding: 10px 0 4px; display: flex; justify-content: center; cursor: pointer; }
.feed-handle-bar { width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.2); }
.feed-tabs { display: flex; gap: 0; padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.feed-tab { flex: 1; text-align: center; padding: 10px 0; font-size: 15px; font-weight: 500; color: var(--c-text-muted); cursor: pointer; position: relative; transition: var(--transition); }
.feed-tab.active { color: var(--c-primary); font-weight: 700; }
.feed-tab.active::after { content: ''; position: absolute; bottom: 0; left: 30%; width: 40%; height: 2px; background: var(--c-primary); border-radius: 1px; }

/* === Feed Items === */
.feed-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.feed-item-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: #fff; flex-shrink: 0; }
.feed-item-body { flex: 1; min-width: 0; }
.feed-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.feed-item-name .feed-item-time { font-size: 11px; color: var(--c-text-dim); font-weight: 400; margin-left: 8px; }
.feed-item-text { font-size: 14px; color: var(--c-text-secondary); line-height: 1.5; margin-bottom: 6px; }
.feed-item-actions { display: flex; gap: 16px; font-size: 12px; color: var(--c-text-muted); }

/* === Event Cards === */
.event-card { margin: 12px 16px; padding: 16px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; }
.event-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; background: var(--c-primary-light); color: var(--c-primary); margin-bottom: 8px; }
.event-badge.hot { background: rgba(255,183,77,0.15); color: var(--c-warning); }
.event-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.event-info { font-size: 12px; color: var(--c-text-muted); margin-bottom: 6px; }
.event-desc { font-size: 13px; color: var(--c-text-secondary); line-height: 1.4; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.anim-fade { animation: fadeIn 0.3s ease; }
.anim-slide { animation: slideUp 0.3s ease; }

/* === Slide Drawer (Me page) === */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 500; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.drawer-overlay.show { opacity: 1; pointer-events: auto; }
.drawer-panel { position: fixed; top: 0; right: -320px; width: 300px; height: 100%; background: rgba(15,15,25,0.95); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border-left: 1px solid rgba(255,255,255,0.06); z-index: 501; transition: right 0.35s cubic-bezier(0.4,0,0.2,1); overflow-y: auto; padding-bottom: env(safe-area-inset-bottom, 0); }
.drawer-panel.show { right: 0; }
.drawer-header { padding: 20px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.drawer-avatar { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #C4B5FD, #9C88FF); }
.drawer-name { font-size: 16px; font-weight: 700; }
.drawer-id { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px; }
.drawer-stats { display: flex; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.drawer-stats .ds-item { flex: 1; text-align: center; cursor: pointer; }
.drawer-stats .ds-num { font-size: 16px; font-weight: 700; }
.drawer-stats .ds-label { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 2px; }
.drawer-menu { padding: 8px 0; }
.drawer-menu .dm-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; transition: background 0.2s; }
.drawer-menu .dm-item:active { background: rgba(255,255,255,0.05); }
.drawer-menu .dm-icon { font-size: 20px; width: 32px; text-align: center; }
.drawer-menu .dm-text { flex: 1; font-size: 14px; }
.drawer-menu .dm-arrow { color: rgba(255,255,255,0.2); font-size: 12px; }
.drawer-menu .dm-badge { background: var(--c-danger); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.drawer-vip { margin: 12px 16px; padding: 12px; border-radius: 12px; background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(255,165,0,0.08)); border: 1px solid rgba(255,215,0,0.2); display: flex; align-items: center; gap: 10px; cursor: pointer; }
.drawer-vip-icon { font-size: 24px; }
.drawer-vip-text { flex: 1; }
.drawer-vip-title { font-size: 13px; font-weight: 700; color: #FFD700; }
.drawer-vip-desc { font-size: 10px; color: rgba(255,215,0,0.5); }

/* === Game Popup === */
.game-popup { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); width: 90%; max-width: 400px; height: 55vh; background: transparent; backdrop-filter: blur(40px) saturate(1.6); -webkit-backdrop-filter: blur(40px) saturate(1.6); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; z-index: 401; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: all 0.3s ease; overflow: hidden; }
.game-popup.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.game-list { padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; }
.game-card { padding: 14px; background: rgba(255,255,255,0.04); border-radius: 14px; border: 1px solid rgba(255,255,255,0.06); cursor: pointer; transition: all 0.2s; }
.game-card:active { transform: scale(0.97); background: rgba(255,255,255,0.08); }
.game-card-top { display: flex; align-items: center; gap: 10px; }
.game-card-icon { font-size: 28px; }
.game-card-title { font-size: 15px; font-weight: 700; }
.game-card-tag { font-size: 9px; padding: 2px 6px; border-radius: 6px; background: rgba(255,107,157,0.15); color: var(--c-primary); font-weight: 600; }
.game-card-desc { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 8px; line-height: 1.5; }
.game-card-meta { display: flex; gap: 12px; margin-top: 8px; font-size: 10px; color: rgba(255,255,255,0.3); }

/* === How-to-play Popup === */
.howto-popup { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); width: 90%; max-width: 400px; height: 55vh; background: transparent; backdrop-filter: blur(40px) saturate(1.6); -webkit-backdrop-filter: blur(40px) saturate(1.6); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; z-index: 401; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: all 0.3s ease; overflow: hidden; }
.howto-popup.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.howto-steps { padding: 16px; overflow-y: auto; flex: 1; }
.howto-step { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.howto-num { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--c-primary), #9C88FF); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.howto-content { flex: 1; }
.howto-title { font-size: 14px; font-weight: 600; }
.howto-desc { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 4px; line-height: 1.5; }

/* === WeChat-style Chat Bubbles === */
.ai-msg { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 8px; padding: 0 4px; }
.ai-msg.user { flex-direction: row-reverse; }
.ai-avatar { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.ai-avatar.bot-av { background: linear-gradient(135deg, #C4B5FD, #9C88FF); }
.ai-avatar.user-av { background: linear-gradient(135deg, #34D399, #10B981); color: #fff; }
.ai-bubble { max-width: 60%; padding: 6px 10px; border-radius: 10px; font-size: 12px; line-height: 1.5; word-break: break-word; position: relative; }
.ai-msg.bot .ai-bubble { background: rgba(255,255,255,0.08); border-top-left-radius: 3px; color: var(--c-text); }
.ai-msg.user .ai-bubble { background: linear-gradient(135deg, #07C160, #06AD56); color: #fff; border-top-right-radius: 3px; }
.ai-msg.bot .ai-bubble::before { content: ''; position: absolute; left: -5px; top: 8px; border: 5px solid transparent; border-right-color: rgba(255,255,255,0.08); }
.ai-msg.user .ai-bubble::after { content: ''; position: absolute; right: -5px; top: 8px; border: 5px solid transparent; border-left-color: #07C160; }

/* === Quick Messages === */
.ai-quick-msgs { display: flex; gap: 8px; padding: 8px 12px; overflow-x: auto; border-top: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; }
.quick-msg { white-space: nowrap; padding: 6px 14px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; font-size: 12px; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.quick-msg:active { background: rgba(255,107,157,0.15); border-color: var(--c-primary); color: var(--c-primary); }

/* === Daily Tips === */
.ai-daily-tip { margin: 8px 12px; padding: 12px; background: linear-gradient(135deg, rgba(107,142,235,0.1), rgba(156,136,255,0.1)); border: 1px solid rgba(156,136,255,0.15); border-radius: 12px; }
.daily-tip-label { font-size: 11px; font-weight: 700; color: #C4B5FD; margin-bottom: 4px; }
.daily-tip-text { font-size: 12px; color: rgba(255,255,255,0.6); line-height: 1.6; }

/* === Profile Popup (iframe) === */
.profile-popup-wrap { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9); width: 92%; max-width: 420px; height: 75vh; background: var(--c-bg); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px; z-index: 501; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transition: all 0.3s ease; overflow: hidden; }
.profile-popup-wrap.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.profile-popup-wrap iframe { flex: 1; width: 100%; border: none; border-radius: 0 0 20px 20px; }

/* === Game Banner (notification) === */
.game-banner { position: fixed; top: -100px; left: 50%; transform: translateX(-50%); width: 92%; max-width: 400px; padding: 14px 16px; background: rgba(15,15,25,0.95); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid rgba(255,215,0,0.2); border-radius: 16px; z-index: 600; display: flex; align-items: center; gap: 12px; transition: top 0.5s cubic-bezier(0.4,0,0.2,1); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.game-banner.show { top: 20px; }
.game-banner-icon { font-size: 28px; flex-shrink: 0; }
.game-banner-body { flex: 1; }
.game-banner-title { font-size: 14px; font-weight: 700; color: #FFD700; }
.game-banner-desc { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.game-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
.game-banner-join { padding: 6px 16px; background: linear-gradient(135deg, #FFD700, #FFA500); color: #000; font-size: 12px; font-weight: 700; border: none; border-radius: 10px; cursor: pointer; }
.game-banner-dismiss { padding: 6px 10px; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5); font-size: 12px; border: none; border-radius: 10px; cursor: pointer; }

/* === Drift Bottle === */
.drift-bottle { position: fixed; bottom: 100px; left: 20px; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(147,197,253,0.2)); border: 1px solid rgba(147,197,253,0.3); display: flex; align-items: center; justify-content: center; font-size: 24px; cursor: pointer; z-index: 100; transition: all 0.3s; animation: bottleBob 3s ease-in-out infinite; }
.drift-bottle:active { transform: scale(0.9); }
@keyframes bottleBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
