/* ===== 液态玻璃设计系统 — RiPPLE ===== */
 
:root {
  /* 暖调底色 */
  --bg-deep: #18141c;
  --bg-surface: rgba(30, 27, 38, 0.65);
 
  /* 玻璃层级 */
  --glass-strong: rgba(42, 38, 52, 0.72);
  --glass-medium: rgba(42, 38, 52, 0.48);
  --glass-light: rgba(42, 38, 52, 0.28);
  --glass-input: rgba(22, 20, 28, 0.55);
 
  /* 边框 */
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-medium: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.04);
 
  /* 强调色 — 避开蓝紫，用琥珀/珊瑚/青灰 */
  --accent-amber: #e8a859;
  --accent-coral: #d4726a;
  --accent-teal: #5b9a8b;
  --accent-rose: #c48793;
  --accent-gold: #c9a96e;
 
  /* 文字 */
  --text-primary: rgba(245, 240, 235, 0.92);
  --text-secondary: rgba(220, 210, 200, 0.62);
  --text-muted: rgba(200, 188, 176, 0.38);
 
  /* 圆角 */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
 
  /* 阴影 */
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.28);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
 
  --blur-strong: blur(24px);
  --blur-medium: blur(16px);
  --blur-light: blur(10px);
 
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
 
/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
 
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
 
/* ===== 动态背景光晕 ===== */
.bg-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.38;
  animation: orbFloat 18s ease-in-out infinite alternate;
}
.orb-1 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(200, 148, 108, 0.55), transparent 70%);
  top: -15%; left: -10%;
  animation-delay: 0s; animation-duration: 22s;
}
.orb-2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(91, 154, 139, 0.45), transparent 70%);
  top: 40%; right: -12%;
  animation-delay: -6s; animation-duration: 20s;
}
.orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(196, 135, 147, 0.4), transparent 70%);
  bottom: -10%; left: 30%;
  animation-delay: -11s; animation-duration: 24s;
}
.orb-4 {
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(201, 169, 110, 0.35), transparent 70%);
  top: 60%; left: 55%;
  animation-delay: -4s; animation-duration: 19s;
}
 
@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(60px, -30px) scale(1.08); }
  50%  { transform: translate(-30px, 50px) scale(0.94); }
  75%  { transform: translate(-50px, -20px) scale(1.05); }
  100% { transform: translate(40px, 40px) scale(0.97); }
}
 
/* ===== 玻璃面板 ===== */
.glass-panel {
  background: var(--glass-strong);
  backdrop-filter: var(--blur-strong);
  -webkit-backdrop-filter: var(--blur-strong);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
}
 
.glass-input {
  background: var(--glass-input);
  backdrop-filter: var(--blur-medium);
  -webkit-backdrop-filter: var(--blur-medium);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
}
 
.glass-card {
  background: var(--glass-medium);
  backdrop-filter: var(--blur-medium);
  -webkit-backdrop-filter: var(--blur-medium);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
}
.glass-card:hover {
  background: var(--glass-strong);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
 
/* ===== 应用外壳 ===== */
.app-shell {
  position: relative; z-index: 1;
  display: flex;
  min-height: 100vh;
  padding: 16px;
  gap: 16px;
}
 
/* ===== 侧边导航 ===== */
.side-nav {
  width: 200px; flex-shrink: 0;
  display: flex; flex-direction: column;
  padding: 20px 14px;
  align-self: stretch;
  position: sticky; top: 16px;
  max-height: calc(100vh - 32px);
}
 
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--border-medium);
  margin-bottom: 16px;
}
.brand-icon {
  font-size: 22px; color: var(--accent-amber);
  filter: drop-shadow(0 0 8px rgba(232, 168, 89, 0.4));
}
.brand-text {
  font-size: 20px; font-weight: 700;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-coral));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
 
.nav-tabs {
  list-style: none; display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.nav-tab {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-md);
  cursor: pointer; font-size: 15px; font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-smooth);
  position: relative;
  user-select: none;
}
.nav-tab:hover {
  color: var(--text-primary);
  background: var(--glass-light);
}
.nav-tab.active {
  color: var(--accent-amber);
  background: var(--glass-light);
  box-shadow: inset 0 0 0 1px rgba(232, 168, 89, 0.25);
}
.tab-icon { font-size: 18px; width: 24px; text-align: center; }
 
.nav-footer {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 8px 0;
  border-top: 1px solid var(--border-medium);
  margin-top: 12px;
}
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-coral), var(--accent-rose));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.user-name { font-size: 14px; color: var(--text-secondary); }
 
/* ===== 主内容区 ===== */
.main-content { flex: 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
 
/* ===== 顶部栏 ===== */
.top-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
  position: sticky; top: 16px; z-index: 10;
}
 
.search-box {
  flex: 1; max-width: 480px;
  display: flex; align-items: center; padding: 0 16px; height: 44px;
}
.search-box input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 14px; font-family: inherit;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-btn {
  background: none; border: none; color: var(--text-secondary);
  font-size: 20px; cursor: pointer; padding: 4px; transition: color var(--transition-smooth);
}
.search-btn:hover { color: var(--accent-amber); }
 
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--glass-light); border: 1px solid var(--border-medium);
  color: var(--text-secondary); font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-smooth);
}
.icon-btn:hover { background: var(--glass-medium); color: var(--text-primary); border-color: var(--border-strong); }
 
.publish-btn {
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-coral));
  color: #fff; border: none; font-weight: 700; font-size: 20px;
}
.publish-btn:hover {
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-coral));
  filter: brightness(1.15); color: #fff;
}
 
/* ===== 视图容器 ===== */
.views-container { flex: 1; position: relative; }
.view { display: none; padding-bottom: 40px; }
.view.active { display: block; }
 
/* ===== 动态广场 ===== */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
 
.feed-card {
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.feed-card-header { display: flex; align-items: center; gap: 12px; }
.feed-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
}
.feed-user-info { flex: 1; min-width: 0; }
.feed-username { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.feed-time { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.feed-badge {
  font-size: 10px; padding: 3px 8px; border-radius: 20px;
  font-weight: 500; letter-spacing: 0.04em;
}
.feed-card-body { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
.feed-card-body p { margin-bottom: 8px; }
.feed-card-body p:last-child { margin-bottom: 0; }
.feed-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.feed-tag {
  font-size: 11px; padding: 4px 10px; border-radius: 20px;
  color: var(--accent-teal); background: rgba(91, 154, 139, 0.12);
  border: 1px solid rgba(91, 154, 139, 0.18);
}
.feed-card-media {
  width: 100%; aspect-ratio: 16/10; border-radius: var(--radius-sm);
  background: var(--glass-light); overflow: hidden;
  position: relative;
}
.feed-card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.feed-card-media .media-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--text-muted);
}
.feed-card-actions { display: flex; gap: 20px; padding-top: 4px; }
.feed-action {
  display: flex; align-items: center; gap: 5px;
  color: var(--text-muted); font-size: 13px; cursor: pointer;
  background: none; border: none; font-family: inherit;
  transition: color var(--transition-smooth);
}
.feed-action:hover { color: var(--text-secondary); }
.feed-action.liked { color: var(--accent-coral); }
 
/* ===== 论坛 ===== */
.forum-layout { display: flex; gap: 16px; align-items: flex-start; }
.forum-categories {
  width: 180px; flex-shrink: 0; padding: 18px;
  position: sticky; top: 100px;
}
 
.section-title {
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px;
}
 
.category-list { display: flex; flex-direction: column; gap: 3px; }
.category-item {
  padding: 9px 14px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-secondary); cursor: pointer;
  transition: all var(--transition-smooth); user-select: none;
}
.category-item:hover { background: var(--glass-light); color: var(--text-primary); }
.category-item.active {
  background: var(--glass-light); color: var(--accent-teal);
  box-shadow: inset 0 0 0 1px rgba(91, 154, 139, 0.2);
}
 
.forum-posts { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.forum-post {
  padding: 18px 20px; display: flex; gap: 16px; cursor: pointer;
}
.forum-post-left { text-align: center; flex-shrink: 0; width: 48px; }
.forum-post-votes { font-size: 16px; font-weight: 700; color: var(--accent-amber); }
.forum-post-votes-label { font-size: 11px; color: var(--text-muted); }
.forum-post-main { flex: 1; min-width: 0; }
.forum-post-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.forum-post-excerpt { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 10px; }
.forum-post-meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); align-items: center; }
.forum-post-cat {
  padding: 2px 8px; border-radius: 20px; font-size: 11px;
  background: rgba(91, 154, 139, 0.12); color: var(--accent-teal);
}
.forum-post-comments {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-muted);
}
 
/* ===== 短视频 ===== */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
 
.video-card {
  padding: 0; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column;
}
.video-thumb {
  width: 100%; aspect-ratio: 9/16; position: relative;
  background: var(--glass-light); overflow: hidden;
}
.video-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.video-thumb .thumb-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: var(--text-muted);
}
.video-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  transition: background var(--transition-smooth);
}
.video-play-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  transition: transform var(--transition-smooth);
}
.video-card:hover .video-play-icon { transform: scale(1.1); }
.video-duration {
  position: absolute; bottom: 8px; right: 8px;
  padding: 2px 8px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.6); font-size: 11px; color: #fff;
}
.video-info { padding: 14px 16px; }
.video-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; line-height: 1.4; }
.video-author { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.video-stats { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; }
 
/* ===== 商品 ===== */
.shop-layout { display: flex; gap: 16px; align-items: flex-start; }
.shop-categories {
  width: 160px; flex-shrink: 0; padding: 18px;
  position: sticky; top: 100px;
}
.shop-products {
  flex: 1; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
 
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-img {
  width: 100%; aspect-ratio: 1/1; background: var(--glass-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 52px; color: var(--text-muted); position: relative; overflow: hidden;
}
.product-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.product-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  background: var(--accent-coral); color: #fff;
}
.product-info { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.product-name { font-size: 14px; font-weight: 500; color: var(--text-primary); line-height: 1.4; }
.product-price-row { display: flex; align-items: baseline; gap: 8px; }
.product-price { font-size: 20px; font-weight: 700; color: var(--accent-coral); }
.product-price-original { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.product-shop { font-size: 12px; color: var(--text-muted); }
.product-action {
  width: 100%; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-medium);
  background: var(--glass-light); color: var(--text-primary); font-size: 14px; cursor: pointer;
  font-family: inherit; transition: all var(--transition-smooth);
  margin-top: 4px;
}
.product-action:hover {
  background: var(--accent-coral); border-color: var(--accent-coral); color: #fff;
}
 
/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.14); }
 
/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .app-shell { flex-direction: column; padding: 10px; gap: 10px; }
  .side-nav {
    width: 100%; flex-direction: row; flex-wrap: wrap;
    position: static; max-height: none; padding: 12px 16px;
    align-items: center; gap: 4px;
  }
  .nav-brand { padding: 0 12px 0 0; margin: 0; border: none; border-right: 1px solid var(--border-medium); }
  .nav-tabs { flex-direction: row; flex: 1; gap: 2px; }
  .nav-tab { padding: 8px 14px; font-size: 13px; }
  .nav-footer { display: none; }
  .top-bar { top: 0; border-radius: var(--radius-md); }
  .forum-layout, .shop-layout { flex-direction: column; }
  .forum-categories, .shop-categories { width: 100%; position: static; }
  .category-list { flex-direction: row; flex-wrap: wrap; }
  .feed-grid { grid-template-columns: 1fr; }
  .videos-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
 
@media (max-width: 560px) {
  .brand-text { display: none; }
  .tab-label { display: none; }
  .nav-tab { padding: 10px; justify-content: center; }
  .tab-icon { font-size: 20px; }
  .search-box { max-width: 100%; }
}