/* ═══ 全局隐藏滚动条（保留滚动/触摸滑动能力，仅去掉视觉滚动条）═══ */
html, body, * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent;
}

/* ============================================
   AI爱游播客 - 用户控制台样式
   暗色主题，侧边栏 + 内容区布局，毛玻璃效果
   ============================================ */

/* ---- CSS 变量（与 landing.css 同色系） ---- */
:root {
  --bg: #0a0a0f;
  --bg2: #12121a;
  --bg3: #1a1a26;
  --bg-card: #1a1a28;
  --bg-card-hover: #222234;
  --bg-glass: rgba(18, 18, 26, 0.85);
  --text: #e8e8f0;
  --text2: #9090a8;
  --text3: #5a5a72;
  --accent: #8b5cf6;
  --accent2: #06b6d4;
  --accent-light: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.4);
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --success: #00cec9;
  --success-bg: rgba(0, 206, 201, 0.12);
  --warning: #fdcb6e;
  --warning-bg: rgba(253, 203, 110, 0.12);
  --danger: #ff6b6b;
  --danger-bg: rgba(255, 107, 107, 0.12);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(139, 92, 246, 0.3);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --transition: 0.2s ease;
  --header-height: 56px;
  --sidebar-width: 220px;
  --player-height: 72px;
}

/* 日间主题 */
[data-theme="light"] {
  --bg: #f5f5f8;
  --bg2: #eaeaef;
  --bg3: #ffffff;
  --bg-card: #ffffff;
  --card: var(--bg-card);
  --bg-card-hover: #f0f0f5;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --text: #1a1a2e;
  --text2: #6b7280;
  --text3: #9ca3af;
  --accent: #7c3aed;
  --accent2: #0891b2;
  --accent-light: #8b5cf6;
  --accent-glow: rgba(124, 58, 237, 0.2);
  --gradient: linear-gradient(135deg, #7c3aed 0%, #0891b2 100%);
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.1);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.1);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.1);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(124, 58, 237, 0.3);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.12);
}

/* ---- 全局重置 ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow: hidden;
}

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

/* ---- 顶部导航栏 ---- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 200;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.header-left {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  transition: opacity var(--transition);
}

.logo:hover {
  opacity: 0.85;
}

.logo-img {
  height: 32px;
  width: auto;
  display: none;
}

/* 默认深色主题：显示白色 LOGO（logo-bai） */
.logo-hei { display: none; }
.logo-bai { display: block; }

/* 浅色主题：显示深色 LOGO（logo-hei） */
[data-theme="light"] .logo-hei { display: block; }
[data-theme="light"] .logo-bai { display: none; }

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-greeting {
  font-size: 0.85rem;
  color: var(--text2);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}
.user-greeting:hover {
  color: var(--primary, #8b5cf6);
}

/* ---- 播客广场入口链接 ---- */
.header-square-link {
  color: var(--primary, #8b5cf6);
  font-size: 0.85rem;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transition: background 0.2s;
}
.header-square-link:hover {
  background: rgba(139, 92, 246, 0.1);
}

/* ---- 配额徽章 ---- */
.quota-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition);
}

.quota-badge--green {
  background: var(--success-bg);
  color: var(--success);
}

.quota-badge--yellow {
  background: var(--warning-bg);
  color: var(--warning);
}

.quota-badge--red {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ---- 退出按钮 ---- */
.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text2);
  font-size: 0.8rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-logout:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-bg);
}

/* ---- 主题切换按钮 ---- */
.btn-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-theme:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
}

.logout-text {
  white-space: nowrap;
}

/* ==========================================
   主体布局：侧边栏 + 内容区
   ========================================== */

.layout {
  display: flex;
  height: 100vh;
  padding-top: var(--header-height);
}

/* ---- 侧边栏 ---- */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding-bottom: 100px;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 10px 0;
}

.sidebar-nav--bottom {
  padding: 0 10px 100px;
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text2);
  transition: all var(--transition);
  cursor: pointer;
  user-select: none;
  position: relative;
}

.sidebar-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-item.active {
  color: var(--text);
  background: rgba(139, 92, 246, 0.1);
  font-weight: 600;
}

.sidebar-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--gradient);
  border-radius: 0 2px 2px 0;
}

.sidebar-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 14px 6px;
}

/* ---- 数据表格 ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--bg2);
  color: var(--text2);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background 0.15s;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.data-table tbody tr:hover td {
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.admin-pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text2);
}

.admin-pager button {
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--bg2);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
}

.admin-pager button:hover {
  background: var(--bg3);
}

.admin-pager button:disabled {
  opacity: 0.4;
  cursor: default;
}

.admin-stats .stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  min-width: 140px;
  flex: 1;
  transition: all 0.2s;
  cursor: default;
}

.admin-stats .stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text3);
  margin-bottom: 6px;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.admin-search {
  display: flex;
  align-items: center;
}

.sidebar-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-label {
  white-space: nowrap;
}

/* ---- 内容区 ---- */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: var(--bg);
}

.content::-webkit-scrollbar {
  width: 6px;
}

.content::-webkit-scrollbar-track {
  background: transparent;
}

.content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.content::-webkit-scrollbar-thumb:hover {
  background: var(--text3);
}

/* ---- 页面标题 ---- */
.page-header {
  margin-bottom: 24px;
}
.page-header--flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header-left {
  min-width: 0;
}
.podcast-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.podcast-search-box input {
  padding: 6px 12px;
  border: 1px solid var(--card-border, #d1d5db);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-card, #1e1e2e);
  color: var(--text-primary, #e0e0e0);
  width: 180px;
  outline: none;
}
.podcast-search-box input:focus {
  border-color: var(--accent, #8b5cf6);
}

.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.page-desc {
  font-size: 0.85rem;
  color: var(--text2);
}

/* ---- 通用开关 switch（控制台多处复用） ---- */
.tp-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.tp-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.tp-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--card-border, #444);
  border-radius: 24px;
  transition: 0.3s;
}
.tp-slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.tp-switch input:checked + .tp-slider {
  background: var(--accent, #8b5cf6);
}
.tp-switch input:checked + .tp-slider:before {
  transform: translateX(20px);
}

/* ==========================================
   面板通用
   ========================================== */

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  transition: border-color 0.2s;
}

.panel:hover {
  border-color: var(--border-hover);
}

/* ==========================================
   通用按钮
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: var(--bg2);
  color: var(--text3);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-outline {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
  background: rgba(255, 107, 107, 0.2);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ==========================================
   表单控件
   ========================================== */

.form-group {
  margin-bottom: 20px;
}

.form-group--inline {
  margin-bottom: 0;
  min-width: 0;
}

/* 竖排创作表单里统一 20px 下间距：
   字数组带 .form-group--inline，被 JS 从 .options-row 挪进 #createFormItems 后 margin-bottom 变 0，
   会与下一项（如「拍照/上传照片」）贴死。ID 选择器优先级高于 .form-group--inline。 */
#createFormItems > .form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── 统一文本输入框 ── */
.input-text,
.input-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font);
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.input-text::placeholder,
.input-textarea::placeholder {
  color: var(--text3);
}

.input-text:hover,
.input-textarea:hover {
  border-color: var(--border-hover);
}

.input-text:focus,
.input-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
  background: var(--bg-card);
}

.input-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.input-hint {
  display: block;
  text-align: right;
  font-size: 0.7rem;
  color: var(--text3);
  margin-top: 4px;
}

/* 表单项标题内的提示：跟标题同一行显示（不再被 display:block 挤到下一行） */
.form-label .input-hint {
  display: inline;
  margin: 0 0 0 6px;
  text-align: left;
  font-weight: 400;
}

/* ── 统一下拉选择框 ── */
.input-select {
  padding: 10px 14px;
  padding-right: 32px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 80px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239090a8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  box-sizing: border-box;
}

.input-select:hover {
  border-color: var(--border-hover);
}

.input-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
  background: var(--bg-card);
}

.options-row {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.form-group--slider {
  flex: 1;
  min-width: 120px;
}

.input-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg2);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.input-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-card);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
  transition: transform var(--transition);
}

.input-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

#speedValue {
  font-weight: 600;
  color: var(--accent-light);
  margin-left: 4px;
}

/* ── 发布开关 ── */
.form-group--toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg2);
  border-radius: 24px;
  transition: background 0.25s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* ==========================================
   音色选择网格
   ========================================== */

.voice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.voice-chip {
  padding: 10px 8px;
  text-align: center;
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.voice-chip:hover {
  border-color: var(--accent-light);
  color: var(--text);
  background: var(--bg-card-hover);
}

.voice-chip--selected {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent-light);
  font-weight: 600;
}

.voice-chip--loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text3);
  cursor: default;
  border-style: dashed;
}

.voice-chip--loading:hover {
  border-color: var(--border);
  color: var(--text3);
  background: var(--bg2);
}

.voice-chip--custom {
  background: #00000003;
}
.voice-chip--custom:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: #818cf8;
}
.voice-chip--custom.voice-chip--selected {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
}
.voice-chip-tag {
  font-size: 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 3px;
}

/* ==========================================
   生成中状态卡片
   ========================================== */

.generating-card {
  margin-top: 20px;
  padding: 20px;
  background: var(--bg2);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: var(--accent-light); }
}

.generating-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.generating-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-light);
}

.generating-meta {
  font-size: 0.8rem;
  color: var(--text2);
  margin-bottom: 12px;
}

.generating-preview {
  max-height: 200px;
  overflow-y: auto;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text2);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.preview-placeholder {
  color: var(--text3);
  font-style: italic;
}

/* ---- 旋转加载器 ---- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- 提示消息 ---- */
.alert {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(0, 206, 201, 0.3);
}

/* ==========================================
   工具条
   ========================================== */

.voice-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ==========================================
   上传区域
   ========================================== */

.upload-zone {
  margin-bottom: 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.04);
}

.upload-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text2);
}

.upload-zone-inner svg {
  color: var(--text3);
  margin-bottom: 12px;
  transition: color var(--transition);
}

.upload-zone:hover .upload-zone-inner svg {
  color: var(--accent);
}

.upload-zone-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.upload-zone-hint {
  font-size: 0.78rem;
  color: var(--text3);
}

/* ==========================================
   波形编辑器
   ========================================== */

.waveform-editor {
  margin-top: 20px;
  margin-bottom: 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.waveform-editor-empty {
  margin-top: 20px;
  padding: 40px 20px;
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--text2);
  font-size: 0.9rem;
}

.waveform-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.waveform-editor-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.waveform-canvas-wrap {
  padding: 12px;
  background: var(--bg);
}

.waveform-canvas {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  touch-action: none;
}
.waveform-time {
  text-align: center;
  font-size: 13px;
  color: var(--text2);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.waveform-controls {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ==========================================
   音色列表
   ========================================== */

.voice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.voice-list-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 0;
  color: var(--text3);
  font-size: 0.85rem;
}

.voice-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.voice-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.1);
}

/* 「我的音色」右栏资料表单：emoji 点选（与 VoiceEditor 保存表单同款交互） */
.voice-info-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg2);
  transition: all var(--transition);
  user-select: none;
}

.voice-info-emoji:hover {
  border-color: rgba(139, 92, 246, 0.5);
}

.voice-info-emoji.active {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.18);
}

.voice-item-info {
  flex: 1;
  min-width: 0;
}

.voice-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.voice-item-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text3);
  min-width: 0;
}

/* 参考文本已按 15 字截断，这里再兜一层省略号：窄栏放不下时不会顶出去 */
.voice-item-transcript {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon-sm {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon-sm svg {
  width: 15px;
  height: 15px;
}

.btn-icon-sm:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(139, 92, 246, 0.1);
}

.btn-icon-sm--danger:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-bg);
}

/* ==========================================
   上传区域
   ========================================== */

/* 录制面板 */
.record-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}

.record-status {
  font-size: 0.85rem;
  color: var(--text2);
}

.record-status--recording {
  color: var(--danger);
  font-weight: 600;
}

.btn-record {
  min-width: 160px;
  padding: 12px 28px !important;
  font-size: 1rem !important;
  border-radius: var(--radius-lg) !important;
}
.btn-record.btn-danger {
  background: var(--danger-bg) !important;
  color: var(--danger) !important;
  border-color: rgba(255, 107, 107, 0.3) !important;
}

/* 录制提示文本 */
.record-hint {
  width: 100%;
  max-width: 680px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 12px;
  padding: 16px 20px;
  text-align: center;
}
.record-hint-label {
  font-size: 0.8rem;
  color: var(--accent-light);
  margin-bottom: 8px;
}
.record-hint-text {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.6;
  font-weight: 500;
}

/* 波形编辑器参考文本 */
.waveform-transcript {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}
.waveform-transcript-label {
  font-size: 0.78rem;
  color: var(--text2);
  margin-bottom: 6px;
}
.waveform-transcript-text {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
  word-break: break-all;
}

/* 保存对话框字段 */
.save-dialog-field label {
  display: block;
  font-size: 0.78rem;
  color: var(--text2);
  margin-bottom: 4px;
  font-weight: 500;
}
.save-dialog-field .custom-modal-input {
  margin-bottom: 10px;
}
.save-dialog-transcript {
  font-size: 0.82rem;
  color: var(--text2);
  background: var(--bg2);
  border-radius: 8px;
  padding: 8px 12px;
  line-height: 1.5;
  max-height: 72px;
  overflow-y: auto;
}

/* 音色列表——代号标签 */
.voice-item-code {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--text3);
  background: var(--bg2);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ==========================================
   播客列表
   ========================================== */

.podcast-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.podcast-list-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 0;
  color: var(--text3);
  font-size: 0.85rem;
}

.podcast-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer;
}

.podcast-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.podcast-item--playing {
  border-color: var(--accent);
  background: var(--accent-glow-bg, rgba(139, 92, 246, 0.06));
  box-shadow: 0 0 0 1px var(--accent), 0 4px 16px var(--accent-glow);
}

.podcast-item--playing .podcast-item-title {
  color: var(--accent);
}

.podcast-item-info {
  flex: 1;
  min-width: 0;
}

.podcast-item-user {
  font-size: 0.75rem;
  color: var(--text-secondary, #888);
  margin: 1px 0 2px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.podcast-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.podcast-item-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text3);
}

.podcast-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 2px;
}
.podcast-tag-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: var(--text2);
  white-space: nowrap;
}

.podcast-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  /* 视频卡片操作较多（发布/播放/重新生成/下载/分享/重新生成封面/修改标题/编辑内容/编辑标签/删除）：
     放不下就换行，避免溢出卡片 */
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 100%;
}

.btn-icon-sm--playing {
  border-color: var(--success);
  color: var(--success);
  background: var(--success-bg);
}

.podcast-more-wrap {
  margin-top: 16px;
}

/* 播客封面卡片（全高竖形，左侧铺满卡片高度） */
.podcast-cover {
  position: relative;
  width: 110px;
  max-height: 140px;
  flex-shrink: 0;
  overflow: hidden;
  align-self: stretch;
  border-radius: var(--radius) 0 0 var(--radius);
}
.podcast-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.podcast-cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}
.podcast-item:hover .podcast-cover-overlay {
  opacity: 1;
}
.podcast-cover-icon {
  width: 32px;
  height: 32px;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.podcast-cover--placeholder {
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.podcast-cover--placeholder::after {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  background: var(--text3);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 8h-4v4h-4v-4H6l6-6 6 6z'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 8h-4v4h-4v-4H6l6-6 6 6z'/%3E%3C/svg%3E") no-repeat center;
  mask-size: contain;
  -webkit-mask-size: contain;
  opacity: 0.4;
}
.podcast-item--has-cover {
  padding-left: 0;
}
.podcast-item--has-cover .podcast-item-info {
  padding-left: 18px;
}
.podcast-item--has-cover .podcast-item-actions {
  padding-right: 18px;
}

/* 表格封面占位符 */
.td-cover--placeholder {
  background: var(--bg3);
  border-radius: 6px;
}

/* 表格封面缩略图 */
.td-cover {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
}
.td-cover-wrap {
  position: relative;
  width: 40px;
  height: 40px;
}
.td-cover-wrap .td-cover {
  position: absolute;
  inset: 0;
}
.td-cover-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
}

/* 播客空状态 */
.podcast-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text3);
}

.podcast-empty svg {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.podcast-empty p {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.podcast-empty-sub {
  font-size: 0.78rem;
  color: var(--text3);
  opacity: 0.6;
}

/* ==========================================
   底部音频播放器
   ========================================== */

.audio-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 200;
  animation: slide-up 0.3s ease;
}

@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.player-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.player-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.player-btn--close:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.player-info {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-time {
  font-size: 0.7rem;
  color: var(--text3);
  font-variant-numeric: tabular-nums;
}

.player-progress {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.player-progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ==========================================
   订阅页面
   ========================================== */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.plan-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}

.plan-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.plan-card--current {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
}

.plan-card--current::before {
  content: "当前";
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.plan-card-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.plan-card-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-light);
  margin-bottom: 4px;
}

.plan-card-price .currency {
  font-size: 1rem;
  font-weight: 500;
}

.plan-card-price .original {
  font-size: 0.85rem;
  color: var(--text3);
  text-decoration: line-through;
  margin-left: 6px;
}

.plan-card-quota {
  font-size: 0.8rem;
  color: var(--text2);
  margin-bottom: 12px;
}

.plan-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  text-align: left;
  font-size: 0.78rem;
  color: var(--text2);
}

.plan-card-features li {
  padding: 3px 0;
  padding-left: 18px;
  position: relative;
}

.plan-card-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.plan-card .btn {
  width: 100%;
}

/* ==========================================
   支付弹窗
   ========================================== */

.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-modal-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  min-width: 360px;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.payment-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.payment-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.payment-methods {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.payment-method-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.payment-method-btn:hover {
  border-color: var(--accent);
}

.payment-method-btn.selected {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
}

.payment-method-icon {
  font-size: 1.5rem;
}

.payment-info {
  font-size: 0.8rem;
  color: var(--text2);
  margin-bottom: 16px;
  text-align: center;
}

/* ==========================================
   订阅记录
   ========================================== */

.subscription-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subscription-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.subscription-history-item .sub-plan {
  font-weight: 600;
  color: var(--text);
}

.subscription-history-item .sub-amount {
  color: var(--accent-light);
  font-weight: 600;
}

.subscription-history-item .sub-time {
  font-size: 0.75rem;
  color: var(--text3);
}

/* ==========================================
   用量管理
   ========================================== */

.usage-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.usage-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.usage-card-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-light);
  margin-bottom: 4px;
}

.usage-card-label {
  font-size: 0.78rem;
  color: var(--text3);
}

.chart-container {
  position: relative;
}

.chart-empty {
  text-align: center;
  padding: 60px 0;
  color: var(--text3);
}

/* ==========================================
   响应式布局
   ========================================== */

@media (max-width: 768px) {
  body {
    overflow: auto;
  }

  .layout {
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
  }

  .sidebar {
    width: 100%;
    flex-shrink: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .sidebar-nav {
    flex-direction: row;
    gap: 0;
    padding: 0;
  }

  .sidebar-item {
    flex-shrink: 0;
    border-radius: 0;
    padding: 10px 16px;
    font-size: 0.82rem;
  }

  .sidebar-item.active::before {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    height: 3px;
    border-radius: 2px 2px 0 0;
  }

  .content {
    padding: 20px 16px 80px;
    -webkit-overflow-scrolling: touch;
  }

  .panel {
    padding: 20px;
  }

  .voice-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .options-row {
    gap: 12px;
  }

  .player-inner {
    padding: 0 12px;
    gap: 8px;
  }

  .player-info {
    max-width: 120px;
  }

  /* ── 播客列表移动端适配 ── */
  .podcast-item {
    flex-wrap: wrap;
    gap: 10px;
  }

  .podcast-item-info {
    flex: 1;
    min-width: 80px;
  }

  .podcast-item-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .podcast-item-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 0 18px 12px;
  }

  .podcast-item--has-cover .podcast-item-actions {
    padding-left: 120px;
  }

  .btn-icon-sm {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding: 0 12px;
  }

  .logo-text {
    font-size: 0.95rem;
  }

  .logout-text {
    display: none;
  }

  .user-greeting {
    display: none;
  }

  .options-row {
    flex-direction: column;
    gap: 12px;
  }

  .form-group--slider {
    width: 100%;
  }

  .voice-toolbar {
    flex-direction: column;
  }

  .voice-toolbar .btn {
    width: 100%;
  }

  .sidebar-item {
    padding: 8px 12px;
    font-size: 0.75rem;
    gap: 6px;
  }

  .sidebar-icon {
    font-size: 0.95rem;
  }

  .plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .usage-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .podcast-cover {
    width: 70px;
  }

  .podcast-item--has-cover .podcast-item-actions {
    padding-left: 84px;
  }

  .btn-icon-sm {
    width: 28px;
    height: 28px;
  }

  .btn-icon-sm svg {
    width: 13px;
    height: 13px;
  }
}

/* ============================================================
   播客模板选择页
   ============================================================ */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.template-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.template-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.15);
}

.template-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--tc-color, var(--accent));
  opacity: 0;
  transition: opacity 0.25s;
}

.template-card:hover::before {
  opacity: 1;
}

.template-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 24px;
  background: var(--tc-color-bg, rgba(139, 92, 246, 0.1));
  color: var(--tc-color, var(--accent));
}

.template-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.template-desc {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 12px;
}

.template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.template-tags span {
  font-size: 0.7rem;
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--tc-color-bg, rgba(139, 92, 246, 0.08));
  color: var(--tc-color, var(--accent));
  font-weight: 500;
}

@media (max-width: 900px) {
  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .template-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   内容编辑面板（右侧滑出）
   ========================================== */
.content-panel {
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: 0;
  height: calc(100vh - var(--header-height) - var(--player-height));
  background: var(--bg3);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transition: width 0.3s ease;
  overflow: hidden;
  z-index: 150;
  display: flex;
  flex-direction: column;
}

.content-panel--active {
  width: 560px;
}

.content-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.content-panel-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.content-panel-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
}

.content-panel-close:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.content-panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow: hidden;
}

/* 标题编辑行（改标题飘窗用） */
.content-panel-field {
  flex-shrink: 0;
  margin-bottom: 12px;
}

.content-panel-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text2);
  margin-bottom: 6px;
}

.content-panel-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.88rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.content-panel-input:hover {
  border-color: var(--border-hover);
}

.content-panel-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.content-panel-hint {
  font-size: 0.72rem;
  color: var(--text2);
  opacity: 0.75;
  margin-top: 5px;
}

.content-panel-textarea {
  flex: 1;
  width: 100%;
  min-height: 200px;
  padding: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.88rem;
  font-family: var(--font);
  line-height: 1.7;
  resize: none;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.content-panel-textarea:hover {
  border-color: var(--border-hover);
}

.content-panel-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.content-panel-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-shrink: 0;
}

.content-panel-actions .btn {
  flex: 1;
}

/* 播客列表项编辑图标 */
.btn-icon-sm.btn-podcast-edit {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 0.75rem;
}

.btn-icon-sm.btn-podcast-edit:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
}

/* ==========================================
   视频播放右栏面板
   ========================================== */
.vp-player-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
}
.vp-player-panel {
  width: 100%;
  max-width: 640px;
  height: 100%;
  background: var(--bg2, #12121a);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 48px rgba(0, 0, 0, 0.5);
  animation: vpSlideIn 0.25s ease;
}
@keyframes vpSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.vp-player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.vp-player-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vp-player-close {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.vp-player-close:hover {
  background: var(--bg3, #1a1a26);
  color: var(--text);
}
.vp-player-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.vp-player-body video {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 10px;
  background: #000;
  margin: 0 auto;
}
/* 视频播客列表内嵌视频预览（合成结果区）等比缩放 */
#vpResultBox video,
.vp-result-video {
  display: block;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #000;
  margin: 0 auto;
}
.vp-player-meta {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text2);
  flex-shrink: 0;
}
/* 视频播客列表卡片复用音频播客的 podcast-item 样式 */

/* 内容面板打开时，调整内容区宽度 */
.content--panel-open {
  margin-right: 420px !important;
  transition: margin-right 0.3s ease;
}

/* 排行榜标签 */
.square-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.square-tab {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text2);
  background: var(--bg2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.square-tab:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.square-tab--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* 排行榜表格 */
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.ranking-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg2);
  color: var(--text2);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--border);
}

.ranking-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.ranking-table tbody tr {
  transition: background 0.15s;
}

.ranking-table tbody tr:hover {
  background: var(--bg-card-hover);
}

.ranking-rank {
  font-weight: 700;
  font-size: 0.9rem;
}

.ranking-rank--gold { color: #f59e0b; }
.ranking-rank--silver { color: #94a3b8; }
.ranking-rank--bronze { color: #d97706; }

@media (max-width: 1100px) {
  .square-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .square-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   个人资料页 Tab 样式
   ========================================== */
.profile-tab {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text2);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  white-space: nowrap;
}
.profile-tab:hover {
  border-color: var(--border-hover);
  color: var(--text);
}
.profile-tab--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.profile-tab-content {
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================
   预置音色上传弹窗
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 560px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: modalSlideIn 0.2s ease;
}

.modal-content--wide {
  max-width: 640px;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.15s;
}
.modal-close:hover {
  background: var(--bg2);
  color: var(--text);
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.upload-zone--sm .upload-zone-inner {
  padding: 20px;
}

.upload-zone--sm svg {
  width: 36px;
  height: 36px;
}

.upload-zone--sm .upload-zone-text {
  font-size: 0.85rem;
}

.upload-zone--sm .upload-zone-hint {
  font-size: 0.75rem;
}

/* ==========================================
   标签选择弹窗（overlay + 内容区）
   ========================================== */
.custom-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
}

.drawer-tag-chip {
  padding: 8px 16px;
  border-radius: 18px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
}
.drawer-tag-chip:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(139,92,246,0.08);
}
.drawer-tag-chip.selected {
  border-color: var(--accent);
  background: rgba(139,92,246,0.15);
  color: var(--accent);
}

/* AI标签配置页：枚举点选标签（高亮=已选配，灰色=未选配） */
.ai-tag-pick {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text3);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: all .15s;
}
.ai-tag-pick:hover {
  border-color: var(--accent);
  color: var(--text2);
  background: rgba(139,92,246,0.06);
}
.ai-tag-pick--on {
  border-color: var(--accent);
  background: rgba(139,92,246,0.18);
  color: var(--accent);
  font-weight: 600;
}
.ai-tag-pick--on:hover {
  background: rgba(139,92,246,0.28);
  color: var(--accent);
}

/* 个人资料设置页：卡片/标题/标签 chip（自适应白天/夜晚主题） */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  max-width: 680px;
}
.profile-card + .profile-card { margin-top: 16px; }
.profile-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
.profile-card-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.profile-card-hint {
  color: var(--text2);
  font-size: 13px;
}
.profile-tag-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text2);
  user-select: none;
  transition: all .15s;
}
.profile-tag-chip:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(139,92,246,0.08);
}
.profile-tag-chip.selected {
  border-color: var(--accent);
  background: rgba(139,92,246,0.18);
  color: var(--accent);
  font-weight: 600;
}
.profile-tag-chip.ai-tag-chip {
  border-color: rgba(16,185,129,0.4);
  background: rgba(16,185,129,0.1);
  color: #10b981;
  font-weight: 500;
}
.profile-save-bar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  max-width: 680px;
}

/* ==========================================
   联网配置 - 左右栏响应式
   ========================================== */
@media (max-width: 768px) {
  .api-config-layout {
    flex-direction: column !important;
  }
  .api-config-left {
    width: 100% !important;
    max-height: none !important;
    max-width: 100%;
  }
  .api-config-right {
    max-height: none !important;
  }
}

/* ===== 视频播客页面样式 ===== */
.vmode-card {
  padding: 12px 6px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}
.vmode-card:hover { border-color: var(--border-hover); }
.vmode-card.active {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
}
.vmode-card.active .vmode-name { color: var(--accent); }
@media (max-width: 768px) {
  .vmode-card { padding: 10px 4px; }
}

.vtag {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}
.vtag:hover { border-color: var(--border-hover); }
.vtag.active {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent);
}
/* 禁用态（如「生成视频模式」在 direct_video 风格下禁用「纯音频播客」）：置灰且不可点 */
.vtag.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.vdrawer-item {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
}
.vdrawer-item:hover { border-color: var(--border-hover); }
.vdrawer-item.selected {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.06);
}
.vdrawer-arrow { font-size: 22px; color: var(--text2); line-height: 1; }

/* 右侧滑出面板 */
.ppicker-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
}
.ppicker-overlay.show { display: block; }
.ppicker-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 440px;
  max-width: 90vw;
  background: var(--bg2);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.ppicker-panel.show { transform: translateX(0); }
.ppicker-tab {
  padding: 6px 16px;
  border: none;
  background: none;
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.ppicker-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.ppicker-item {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
}
.ppicker-item:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.ppicker-item.selected {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
}
.ppicker-play {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 8px;
}
.ppicker-play:hover {
  background: var(--accent);
  color: #fff;
}
.ppicker-play.playing {
  background: var(--accent);
  color: #fff;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ==========================================
   视频播客生成：左右栏布局 + 实时预览
   ========================================== */
.video-create-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.video-create-left {
  flex: 1;
  min-width: 0;
}
.video-create-right {
  width: 340px;
  flex-shrink: 0;
  position: sticky;
  top: 16px;
}
.video-preview-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
/* 视频画面预览框 */
.vp-frame-wrapper {
  margin-bottom: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.vp-frame {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: aspect-ratio 0.3s ease;
}
.vp-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  transition: background 0.3s ease;
}
.vp-subtitle {
  position: relative;
  z-index: 2;
  padding: 20px 16px;
  font-weight: 900;
  margin-top: 110px;
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  max-height: 80%;
  overflow: hidden;
  word-break: break-word;
}

/* AI 分身广场三栏布局 */
.sq-cat-item:hover, .sq-star-item:hover {
  background: rgba(139,92,246,0.06) !important;
}
.vp-template-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  color: #fff;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
/* 预览信息列表 */
.vp-info-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.vp-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(139,92,246,0.04);
  border-radius: 6px;
  font-size: 12px;
}
.vp-info-label {
  color: var(--text2);
  flex-shrink: 0;
}
.vp-info-value {
  color: var(--text);
  font-weight: 500;
  text-align: right;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 响应式：窄屏改为上下布局 */
@media (max-width: 1100px) {
  .video-create-layout {
    flex-direction: column;
  }
  .video-create-right {
    width: 100%;
    position: static;
  }
}

/* ===== 生成播客浮窗（gen-overlay） ===== */
.gen-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; display: flex; align-items: center; justify-content: center; }
.gen-overlay-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); }
.gen-overlay-content { position: relative; width: 90%; max-width: 600px; max-height: 80vh; background: var(--bg-card, #1a1a2e); border-radius: 16px; border: 1px solid var(--border, #2a2a3a); box-shadow: 0 20px 60px rgba(0,0,0,0.4); display: flex; flex-direction: column; overflow: hidden; }
.gen-overlay-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border, #2a2a3a); }
.gen-overlay-title { font-size: 16px; font-weight: 700; color: var(--text, #fff); }
.gen-overlay-close { background: none; border: none; color: var(--text2, #888); font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all 0.2s; }
.gen-overlay-close:hover { background: rgba(255,255,255,0.1); color: var(--text, #fff); }
.gen-overlay-body { flex: 1; overflow-y: auto; padding: 20px; }
.gen-overlay-meta { font-size: 13px; color: var(--text2, #888); margin-bottom: 12px; }
.gen-overlay-preview { background: var(--bg, #0a0a12); border-radius: 8px; padding: 16px; min-height: 100px; font-size: 14px; color: var(--text, #fff); line-height: 1.6; }
.gen-overlay-footer { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--border, #2a2a3a); }
.gen-overlay-spinner { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2, #888); }

/* ===== 播客标签页（podcast-tabs） ===== */
.podcast-tabs { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid var(--card-border, #2a2a3a); }
.podcast-tab { padding: 8px 20px; border: none; background: none; color: var(--text-secondary, #6b7280); font-size: 14px; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.2s; }
.podcast-tab.active { color: var(--accent-primary, #0bb5e5); font-weight: 600; border-bottom-color: var(--accent-primary, #0bb5e5); }
.podcast-data-pane { margin-top: 16px; }

/* ===== AI角色标签页（ai-tab） ===== */
.ai-tab-bar { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.ai-tab-btn { padding: 10px 18px; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--text2); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.ai-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== 我的AI 页面：左栏列表 + 右栏飘窗（点击查看/编辑时弹出） ===== */
.ai-characters-layout { display: flex; gap: 20px; align-items: stretch; }
.ai-characters-list-col { flex: 1; min-width: 0; }
/* 右栏飘窗：默认隐藏在屏幕右侧，.open 时滑入 */
.ai-character-detail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 560px;
  max-width: 92vw;
  background: var(--bg-card, #12121a);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 1000;
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.3s ease, visibility 0.3s ease;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
}
.ai-character-detail.open { visibility: visible; transform: translateX(0); }
.ai-detail-view { display: none; }

/* AI 列表工具条：搜索框 + 统计（列表顶部/底部各一条） */
.ai-list-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.ai-list-search {
  flex: 1;
  min-width: 0;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card, #12121a);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}
.ai-list-search:focus { border-color: var(--accent); }
.ai-list-count { font-size: 12px; color: var(--text3); white-space: nowrap; }
/* 分页条 */
.ai-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.ai-pager-btns { display: flex; align-items: center; gap: 6px; }
.ai-pager-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card, #12121a);
  color: var(--text2);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.ai-pager-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.ai-pager-btn.active { background: rgba(139, 92, 246, 0.15); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.ai-pager-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.ai-pager-ellipsis { font-size: 13px; color: var(--text3); }
/* 窄栏（「我的音色」左栏 380px）用的紧凑分页条：信息一行、按钮一行居中 */
.ai-pager--compact {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 8px 0 0;
}
.ai-pager--compact .ai-pager-btns { justify-content: center; }

/* 「我的订阅」记录：一个卡片三栏，点某栏在右栏飘窗看该类记录 */
.sub-rec-col:hover { background: var(--bg2); }

/* AI分身广场：明星/用户作者栏 */
.sq-author-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  font-size: 13px;
  color: var(--text2);
  transition: all 0.15s;
}
.sq-author-item:hover { background: rgba(139, 92, 246, 0.06); }
.sq-author-item--active {
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent-light, #a78bfa);
  font-weight: 600;
}
.sq-author-count {
  font-size: 11px;
  color: var(--text3);
  background: var(--bg2);
  border-radius: 10px;
  padding: 1px 8px;
  flex-shrink: 0;
}
.ai-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card, #12121a);
  z-index: 1;
}
.ai-detail-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--bg2);
  color: var(--text2);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.ai-detail-close:hover { background: var(--bg3); color: var(--text); }
.ai-detail-body { padding: 18px; }

/* AI 角色卡片头像（48px 圆形） */
.ai-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.ai-card-avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, #06b6d4);
}

/* AI 角色卡片样式（基于 .podcast-item 微调） */
.ai-character-card { padding: 12px 14px; }
.ai-character-card .podcast-item-title { font-size: 14px; }
.ai-character-card .podcast-item-actions { gap: 6px; }

/* 手机端：右栏飘窗改为底部弹出（满宽，点击查看/编辑时滑入） */
@media (max-width: 900px) {
  .ai-characters-layout { flex-direction: column; gap: 12px; }
  .ai-character-detail {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 82vh;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
  }
  .ai-character-detail.open { transform: translateY(0); }
}

/* ===== 音色标签页（voice-tab） ===== */
.voice-tab-bar { display: flex; gap: 8px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.voice-tab-btn { padding: 8px 16px; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--text2); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.voice-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-voice-tab-btn { padding: 8px 16px; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--text2); font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.admin-voice-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== 筛选标签（filter-tags） ===== */
.filter-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.filter-tag { padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; color: var(--text2); background: var(--bg-card); border: 1px solid var(--border); cursor: pointer; transition: all 0.2s; user-select: none; }
.filter-tag:hover { border-color: var(--accent); color: var(--accent); }
.filter-tag.active { background: rgba(11,181,229,0.12); border-color: var(--accent-primary, #0bb5e5); color: var(--accent-primary, #0bb5e5); }

/* ===== 播放器按钮（player-btn--play） ===== */
.player-btn--play { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-primary, #0bb5e5); border: none; color: #fff; cursor: pointer; transition: all 0.2s; flex-shrink: 0; }
.player-btn--play:hover { transform: scale(1.05); }
.icon-play, .icon-pause { display: flex; align-items: center; justify-content: center; }

/* ===== 侧边栏导航分组（sidebar-nav变体） ===== */
.sidebar-nav--top { padding-top: 8px; }
.sidebar-nav--admin { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
.sidebar-nav--operator { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }

/* ===== 主题切换图标（theme-icon） ===== */
.theme-icon { display: flex; align-items: center; justify-content: center; }

/* ===== 用量管理控件（usage-controls） ===== */
.usage-controls { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }

/* ===== 波形工具栏（waveform-toolbar） ===== */
.waveform-toolbar { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: var(--bg-card); border-radius: 8px; border: 1px solid var(--border); }

/* ===== 字数选择标签（word-count-tags） ===== */
.word-count-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.word-count-tag { padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text2); background: var(--bg-card); border: 1px solid var(--border); cursor: pointer; transition: all 0.2s; user-select: none; }
.word-count-tag:hover { border-color: var(--accent); color: var(--accent); }
.word-count-tag.active { background: rgba(139,92,246,0.12); border-color: var(--accent); color: var(--accent-light, #c4b5fd); font-weight: 600; }

/* ===== 主题切换图标显示控制（theme-icon-dark/light） ===== */
.theme-icon-dark { display: flex; }
.theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: flex; }

/* ============================================================
   可复用音色编辑器组件（voice-editor.js）样式已抽至 voice-editor.css
   ============================================================ */

/* AI 歌手列表项 + 试听按钮（生成我们的歌 · 选择歌手飘窗） */
.ai-lib-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; transition: background 0.15s, border-color 0.15s; }
.ai-lib-item:hover { background: rgba(255,255,255,0.05); }
.ai-lib-item.selected { background: rgba(139,92,246,0.14); border-color: rgba(139,92,246,0.4); }
.ai-lib-emoji { font-size: 20px; flex-shrink: 0; }
.ai-lib-name { flex: 1; min-width: 0; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-lib-play { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,0.06); color: var(--text3); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.15s; padding: 0; }
.ai-lib-play:hover { background: var(--accent); color: #fff; border-color: transparent; }
.ai-lib-play.playing { background: var(--accent); color: #fff; border-color: transparent; }

/* ==========================================
   歌曲生成进度飘窗（right-drawer 风格） + 时间轴
   ========================================== */
.song-progress-drawer {
  /* right-drawer 的 position/transform/transition 已在 HTML 行内样式设置 */
}
.song-progress-drawer.done .song-float-spinner { display: none; }
.song-progress-drawer.done .song-float-title::before { content: '✅ '; }

.song-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.song-float-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.song-float-spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
}
.song-float-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.song-float-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--bg2);
  color: var(--text2);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.song-float-close:hover {
  background: var(--danger-bg);
  color: var(--danger);
}
.song-float-meta {
  font-size: 12px;
  color: var(--text2);
  padding: 10px 16px;
  margin: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

/* 时间轴 */
.song-step-list {
  display: flex;
  flex-direction: column;
  padding: 12px 16px 8px;
}
.song-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  position: relative;
}
.song-step-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg2);
  border: 2px solid var(--border);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all 0.3s;
  margin-top: 1px;
}
.song-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 30px;
  bottom: -4px;
  width: 2px;
  background: var(--border);
  z-index: 0;
  transition: background 0.3s;
}
/* 状态：active */
.song-step.active .song-step-dot {
  background: var(--accent);
  border-color: var(--accent);
  animation: songStepPulse 1.4s ease-in-out infinite;
}
@keyframes songStepPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 6px transparent; }
}
.song-step.active .song-step-name { color: var(--accent-light); }
/* 状态：done */
.song-step.done .song-step-dot {
  background: var(--success);
  border-color: var(--success);
}
.song-step.done .song-step-dot::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.song-step.done:not(:last-child)::before { background: var(--success); }
.song-step.done .song-step-name { color: var(--text2); }
/* 状态：error */
.song-step.error .song-step-dot {
  background: var(--danger);
  border-color: var(--danger);
}
.song-step.error .song-step-dot::after {
  content: '!';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.song-step.error .song-step-name { color: var(--danger); }
/* 状态：skipped（用户已提供歌词等场景） */
.song-step.skipped .song-step-dot {
  background: var(--bg2);
  border-color: var(--text3);
  opacity: 0.6;
}
.song-step.skipped .song-step-dot::after {
  content: '–';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text3);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.song-step.skipped .song-step-name { color: var(--text3); }

.song-step-info { flex: 1; min-width: 0; }
.song-step-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  line-height: 1.4;
  transition: color 0.3s;
}
.song-step-msg {
  font-size: 12px;
  color: var(--text3);
  margin-top: 3px;
  line-height: 1.4;
  word-break: break-word;
}
.song-step.active .song-step-msg { color: var(--accent-light); }
.song-step.done .song-step-msg { color: var(--success); }
.song-step.error .song-step-msg { color: var(--danger); }
.ai-lib-badge { flex-shrink: 0; font-size: 11px; color: #fff; background: var(--accent); border-radius: 10px; padding: 1px 7px; }

/* 订阅套餐管理页内的 tab 栏（订阅套餐 / 免付费用户） */
.ap-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.ap-tab {
  background: none; border: none; cursor: pointer;
  padding: 10px 18px; font-size: 14px; color: var(--text2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ap-tab:hover { color: var(--text); }
.ap-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* 创作表单：多照片上传网格（自适应，每行按容器宽度自动排列） */
.cf-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 10px; }
.cf-photo-cell { position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg); }
.cf-photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cf-photo-del {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; padding: 0;
  border: none; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 12px; line-height: 20px; text-align: center; cursor: pointer;
}
.cf-photo-del:hover { background: rgba(239, 68, 68, .9); }
.cf-photo-desc-item { margin: 2px 0; line-height: 1.55; word-break: break-word; }
.cf-photo-desc-item b { color: var(--text); }
@media (max-width: 520px) { .cf-photo-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); } }