/* LINGSCAN C 端 WEB 站 · 应用外壳（左侧三组导航 + 顶部创作/分析切换）
   版式取自 docs/refs/音乐分析页-完整还原.html，只做工程化拆分，不改设计。
   本文件只服务 C 端 WEB 站，与酒吧那套（客人 H5 / 控台 / 总控）物理隔离。 */

:root {
  --cw-bg: #151618;
  --cw-surface: #1e1f22;
  --cw-surface-2: #26272b;
  --cw-surface-3: #2f3035;
  --cw-line: rgba(255, 255, 255, .08);
  --cw-line-2: rgba(255, 255, 255, .12);
  --cw-t-1: #f2f0ea;
  --cw-t-2: #c8c6bf;
  --cw-t-3: #8a8a83;
  --cw-t-4: #6a6a64;
  --cw-brass: #e8862a;
  --cw-brass-light: #f3a55d;
  --cw-teal: #4a9d8f;
  --cw-rose: #b85c5c;
  --cw-radius: 8px;
  --cw-radius-lg: 12px;
}

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

html, body {
  background: var(--cw-bg);
  color: var(--cw-t-2);
  font-family: "PingFang SC", "Microsoft YaHei", "HarmonyOS Sans SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

body.cw-app { display: flex; min-height: 100vh; }

a { text-decoration: none; color: inherit; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ===== 左侧导航 ===== */
.cw-side {
  width: 240px;
  flex-shrink: 0;
  background: var(--cw-bg);
  border-right: 1px solid var(--cw-line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.cw-side-brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cw-side-brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--cw-brass);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.cw-side-brand .brand-name { font-size: 16px; font-weight: 700; color: var(--cw-t-1); }
.cw-side-brand .brand-sub { font-size: 12px; color: var(--cw-t-3); margin-top: 2px; }

.cw-nav-group { padding: 12px 0; }

.cw-nav-title {
  padding: 8px 20px;
  font-size: 12px;
  color: var(--cw-t-3);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cw-nav-title .arrow { font-size: 10px; opacity: .6; }

.cw-nav-item {
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--cw-t-2);
  transition: background .15s, color .15s;
  border-right: 2px solid transparent;
}

.cw-nav-item:hover { background: rgba(255, 255, 255, .04); color: var(--cw-t-1); }

.cw-nav-item.active {
  background: rgba(232, 134, 42, .12);
  color: var(--cw-brass-light);
  border-right-color: var(--cw-brass);
}

.cw-nav-item .icon { width: 18px; height: 18px; opacity: .7; flex-shrink: 0; }
.cw-nav-item.active .icon { opacity: 1; }
.cw-nav-item .soon {
  margin-left: auto;
  font-size: 11px;
  color: var(--cw-t-4);
  border: 1px solid var(--cw-line-2);
  border-radius: 4px;
  padding: 0 5px;
}

.cw-side-footer { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--cw-line); }

.cw-credit-card { background: var(--cw-surface); border-radius: var(--cw-radius-lg); padding: 16px; }
.cw-credit-card .label { font-size: 12px; color: var(--cw-t-3); margin-bottom: 8px; }
.cw-credit-card .value { font-size: 24px; font-weight: 700; color: var(--cw-t-1); margin-bottom: 12px; line-height: 1.2; }

.cw-credit-card .recharge {
  display: block;
  width: 100%;
  padding: 10px;
  background: var(--cw-surface-2);
  border-radius: var(--cw-radius);
  color: var(--cw-t-1);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  transition: background .15s;
}

.cw-credit-card .recharge:hover { background: var(--cw-surface-3); }

.cw-user-card { display: flex; align-items: center; gap: 10px; padding: 16px 20px 8px; }

.cw-user-card .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cw-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--cw-t-2);
  font-size: 13px;
  flex-shrink: 0;
}

.cw-user-card .name { font-size: 14px; font-weight: 600; color: var(--cw-t-1); }
.cw-user-card .role { font-size: 11px; color: var(--cw-t-3); margin-top: 1px; }
.cw-user-card .name a { color: var(--cw-brass-light); }

/* ===== 主区 ===== */
.cw-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.cw-top {
  height: 56px;
  border-bottom: 1px solid var(--cw-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  background: var(--cw-bg);
  z-index: 10;
}

.cw-mode-switch { display: flex; background: var(--cw-surface); border-radius: var(--cw-radius); padding: 3px; }

.cw-mode-switch .tab {
  padding: 6px 16px;
  font-size: 13px;
  color: var(--cw-t-3);
  border-radius: 6px;
  display: inline-block;
}

.cw-mode-switch .tab.active { background: var(--cw-surface-3); color: var(--cw-t-1); font-weight: 600; }

.cw-top-right { display: flex; align-items: center; gap: 20px; font-size: 13px; color: var(--cw-t-3); }
.cw-top-right .credits b { color: var(--cw-brass-light); margin-left: 4px; }

.cw-top-right .user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cw-surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cw-t-2);
  font-size: 12px;
  font-weight: 600;
}

.cw-content {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 32px 96px;
}

/* 移动端：侧栏收起，顶部保留切换 */
@media (max-width: 900px) {
  .cw-side { display: none; }
  .cw-top { padding: 0 16px; }
  .cw-content { padding: 32px 20px 72px; }
}
