/* ===== 新音院AUDIO - 全局样式 ===== */
:root {
  --bg-color: #f0f2f5;
  --sidebar-bg: #ffffff;
  --sidebar-width: 220px;
  --primary: #4a9eff;
  --primary-light: #e8f1ff;
  --text-main: #333333;
  --text-sub: #888888;
  --card-bg: #ffffff;
  --card-radius: 12px;
  --border-color: #e8e8e8;
}

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

html, body {
  font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg-color);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===== 侧边栏 ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px 18px 12px;
}

.sidebar-header .logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
}

.user-block {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #333;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.user-info .user-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.user-info .user-stat {
  font-size: 11px;
  color: var(--text-sub);
  line-height: 1.3;
}

/* 导航菜单 */
.nav-menu {
  list-style: none;
  padding: 0 0 8px;
  flex: 1;
}

.nav-divider {
  margin: 8px 18px;
  border-top: 1px solid var(--border-color);
}

.nav-item {
  padding: 10px 18px 10px 22px;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item:hover {
  background: #f5f7fa;
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  -webkit-overflow-scrolling: touch;
}

/* 顶部栏 */
.top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.top-icon-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-sub);
  transition: all 0.15s;
}

.top-icon-btn:hover {
  background: #e8e8e8;
  color: var(--text-main);
}

/* ===== 区块标题 ===== */
.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-main);
}

/* ===== 视频区块 ===== */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.video-card {
  border-radius: var(--card-radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.video-card .video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.video-card.video-sound .video-bg {
  background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
}

.video-card.video-nosound .video-bg {
  background: linear-gradient(135deg, #b21f1f, #1a1a2e, #16222e);
}

.video-card video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.video-card .video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.video-card .video-title {
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.video-card .video-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  margin-top: 6px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* 视频无源时的占位 */
.video-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  gap: 8px;
}

.video-placeholder .play-icon {
  font-size: 48px;
  opacity: 0.5;
}

.video-placeholder .hint-text {
  font-size: 13px;
}

/* ===== 工具卡片区块 ===== */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.tool-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
  position: relative;
}

.tool-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.tool-card .tool-dot {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.tool-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: var(--primary);
}

.tool-info .tool-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.tool-info .tool-desc {
  font-size: 12px;
  color: var(--text-sub);
}

/* ===== 收费卡片区块 ===== */
.fee-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.fee-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  position: relative;
}

.fee-card .fee-dot {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.fee-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  color: var(--primary);
}

.fee-info .fee-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.fee-info .fee-desc {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ===== 移动端汉堡菜单按钮 ===== */
.menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  width: 40px;
  height: 40px;
  border: none;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* 遮罩层（手机端侧边栏打开时） */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
}

.sidebar-overlay.show {
  display: block;
}

/* ========================================
   平板适配 (769px ~ 1024px)
   ======================================== */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 180px;
  }

  .main-content {
    padding: 16px 18px;
  }

  .video-card .video-title {
    font-size: 28px;
  }
}

/* ========================================
   手机适配 (≤ 768px)
   ======================================== */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  /* --- 侧边栏变抽屉 --- */
  .menu-toggle {
    display: flex;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 240px;
    z-index: 200;
    transform: translateX(-100%);
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  /* --- 主内容区 --- */
  .main-content {
    flex: 1;
    width: 100%;
    padding: 56px 14px 24px;
    overflow-y: auto;
  }

  .top-bar {
    position: fixed;
    top: 12px;
    right: 14px;
    z-index: 100;
    gap: 6px;
    margin-bottom: 0;
  }

  .top-icon-btn {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  /* --- 区块标题 --- */
  .section-title {
    font-size: 15px;
    margin-bottom: 10px;
  }

  /* --- 视频卡片：单列 --- */
  .video-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 22px;
  }

  .video-card {
    aspect-ratio: 16 / 10;
  }

  .video-card .video-title {
    font-size: 24px;
  }

  .video-card .video-subtitle {
    font-size: 12px;
  }

  /* --- 工具卡片：单列 --- */
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 22px;
  }

  .tool-card {
    padding: 12px 14px;
    gap: 12px;
  }

  .tool-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .tool-info .tool-name {
    font-size: 14px;
  }

  .tool-info .tool-desc {
    font-size: 11px;
  }

  /* --- 收费卡片：单列 --- */
  .fee-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 22px;
  }

  .fee-card {
    padding: 14px;
    gap: 12px;
  }

  .fee-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .fee-info .fee-name {
    font-size: 14px;
  }

  .fee-info .fee-desc {
    font-size: 11px;
    line-height: 1.5;
  }
}

/* ========================================
   小屏手机适配 (≤ 375px)
   ======================================== */
@media (max-width: 375px) {
  .main-content {
    padding: 56px 10px 20px;
  }

  .video-card .video-title {
    font-size: 20px;
  }

  .video-card .video-subtitle {
    font-size: 11px;
  }

  .sidebar-header .logo {
    font-size: 16px;
  }
}
