/* ============================================
   太极拳空间 App - 主样式表
   主题: 太极 · 阴阳 · 水墨 · 东方美学
   ============================================ */

/* ========== CSS Variables ========== */
:root {
  --primary: #c9a84c;
  --primary-dark: #a8892e;
  --primary-light: #e8d48b;
  --accent: #e94560;
  --accent-dark: #c73a52;
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a2e;
  --bg-section: #0e0e15;
  --text-primary: #f0ece4;
  --text-secondary: #a09888;
  --text-muted: #6b6358;
  --border-color: #1e1e30;
  --border-light: #2a2a40;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
  --font-cn: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', sans-serif;
  --gradient-gold: linear-gradient(135deg, #c9a84c, #e8d48b, #c9a84c);
  --gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
}

/* ========== Reset & Base ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

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

input, textarea {
  font-family: inherit;
  outline: none;
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ========== App Container ========== */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ========== Sidebar Navigation ========== */
.sidebar {
  width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 24px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.logo-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: conic-gradient(from 0deg, #fff 0deg, #000 180deg, #fff 360deg);
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin 20s linear infinite;
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.3);
}

.logo-icon::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logo-icon-inner {
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border-radius: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--primary);
}

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

.logo-text {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(201, 168, 76, 0.1);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

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

.nav-label {
  font-size: 14px;
  font-weight: 500;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #000;
  font-weight: 700;
}

.user-info-small {
  flex: 1;
}

.user-name-small {
  font-size: 13px;
  font-weight: 600;
}

.user-level-small {
  font-size: 11px;
  color: var(--text-muted);
}

/* ========== Main Content Area ========== */
.main-content {
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
}

/* ========== Top Header ========== */
.top-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-title {
  font-size: 18px;
  font-weight: 600;
}

.header-title span {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-search {
  display: flex;
  align-items: center;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 16px;
  gap: 8px;
  width: 240px;
}

.header-search input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
}

.header-search input::placeholder {
  color: var(--text-muted);
}

.header-icon {
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.header-icon:hover {
  color: var(--primary);
}

.header-icon .badge-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

/* ========== Page Sections ========== */
.page-section {
  display: none;
  padding: 24px 32px 80px;
  animation: fadeIn 0.4s ease;
}

.page-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  margin-bottom: 24px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* ========== Module 1: 名师教练展示台 ========== */
.master-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}

.master-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.master-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.master-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-light);
}

.master-card-header {
  display: flex;
  padding: 20px;
  gap: 16px;
  background: linear-gradient(135deg, var(--bg-card-hover), var(--bg-card));
}

.master-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}

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

.master-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.master-title {
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 8px;
}

.master-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.master-badge {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  background: rgba(201, 168, 76, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.master-card-body {
  padding: 16px 20px;
}

.master-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.master-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.master-meta-item .icon {
  font-size: 14px;
}

.master-achievements {
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
}

.master-achievements h4 {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.master-achievements ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.master-achievements li {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 2px 8px;
  background: var(--bg-card);
  border-radius: 4px;
}

.master-contact {
  display: flex;
  gap: 8px;
}

.master-contact-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
}

.master-contact-btn.primary {
  background: var(--primary);
  color: #000;
}

.master-contact-btn.primary:hover {
  background: var(--primary-dark);
}

.master-contact-btn.secondary {
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.master-contact-btn.secondary:hover {
  color: var(--text-primary);
  border-color: var(--primary);
}

/* ========== Module 2: 拳理资料图书馆 ========== */
.library-categories {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.category-btn {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.category-btn:hover, .category-btn.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.book-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-light);
}

.book-cover {
  width: 100%;
  aspect-ratio: 280/380;
  object-fit: cover;
  background: var(--bg-card-hover);
}

.book-info {
  padding: 14px;
}

.book-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.book-author {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.book-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.book-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.book-price::before {
  content: '¥';
  font-size: 12px;
}

.book-rating {
  font-size: 12px;
  color: var(--primary);
}

.book-sales {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.book-out-of-stock {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
}

/* ========== Module 3: 教学模块 ========== */
.teaching-categories {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.teaching-cat-btn {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.teaching-cat-btn:hover, .teaching-cat-btn.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-light);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.05);
}

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
}

.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(201, 168, 76, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .video-play-icon {
  opacity: 1;
}

.video-level {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.video-level.beginner {
  background: rgba(76, 175, 80, 0.8);
  color: #fff;
}

.video-level.intermediate {
  background: rgba(255, 193, 7, 0.8);
  color: #000;
}

.video-level.advanced {
  background: rgba(233, 69, 96, 0.8);
  color: #fff;
}

.video-info {
  padding: 14px;
}

.video-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.video-instructor {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.video-views::before {
  content: '👁 ';
}

.video-rating {
  color: var(--primary);
}

/* ========== Module 4: 社区模块 ========== */
.community-feed {
  max-width: 680px;
  margin: 0 auto;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.post-card:hover {
  border-color: var(--border-light);
}

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

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.post-user-info {
  flex: 1;
}

.post-username {
  font-size: 14px;
  font-weight: 600;
}

.post-user-level {
  font-size: 11px;
  color: var(--text-muted);
}

.post-time {
  font-size: 12px;
  color: var(--text-muted);
}

.post-content {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.post-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.post-tag {
  font-size: 12px;
  color: var(--primary);
  background: rgba(201, 168, 76, 0.1);
  padding: 2px 10px;
  border-radius: 10px;
}

.post-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.post-images img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.post-images img:hover {
  opacity: 0.9;
}

.post-actions {
  display: flex;
  gap: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
  background: none;
  padding: 4px 8px;
  border-radius: 6px;
}

.post-action-btn:hover {
  color: var(--primary);
  background: rgba(201, 168, 76, 0.05);
}

.post-action-btn.liked {
  color: var(--accent);
}

.post-action-btn .icon {
  font-size: 16px;
}

/* ========== Module 5: 创作模块 ========== */
.creation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.creation-tabs {
  display: flex;
  gap: 8px;
}

.creation-tab {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.creation-tab:hover, .creation-tab.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-light);
}

.template-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 3/2;
  overflow: hidden;
}

.template-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-type-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.template-type-badge.image {
  background: rgba(76, 175, 80, 0.8);
  color: #fff;
}

.template-type-badge.video {
  background: rgba(233, 69, 96, 0.8);
  color: #fff;
}

.template-popular {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: var(--primary);
  color: #000;
}

.template-info {
  padding: 14px;
}

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

.template-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.template-actions {
  display: flex;
  gap: 8px;
}

.template-use-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  background: var(--primary);
  color: #000;
  transition: var(--transition);
}

.template-use-btn:hover {
  background: var(--primary-dark);
}

.template-preview-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.template-preview-btn:hover {
  color: var(--text-primary);
  border-color: var(--primary);
}

/* Upload Area */
.upload-area {
  margin-top: 24px;
  background: var(--bg-card);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.upload-area:hover {
  border-color: var(--primary);
  background: rgba(201, 168, 76, 0.03);
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.upload-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== Module 6: 交互模块 ========== */
.interaction-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  height: calc(100vh - 160px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.contact-list {
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
}

.contact-search {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.contact-search input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 20px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 13px;
}

.contact-search input::placeholder {
  color: var(--text-muted);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.contact-item:hover {
  background: var(--bg-card-hover);
}

.contact-item.active {
  background: rgba(201, 168, 76, 0.08);
  border-left: 3px solid var(--primary);
}

.contact-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.contact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.contact-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #4caf50;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

.contact-online.offline {
  background: var(--text-muted);
}

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

.contact-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.group-indicator {
  font-size: 10px;
  color: var(--primary);
  background: rgba(201, 168, 76, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.contact-last-msg {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-unread {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Chat Area */
.chat-area {
  display: flex;
  flex-direction: column;
  background: var(--bg-dark);
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-name {
  font-size: 15px;
  font-weight: 600;
}

.chat-header-status {
  font-size: 12px;
  color: var(--text-muted);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 70%;
}

.message.self {
  align-self: flex-end;
  align-items: flex-end;
}

.message.other {
  align-self: flex-start;
  align-items: flex-start;
}

.message.system {
  align-self: center;
  max-width: 100%;
}

.message-system-text {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 4px 16px;
  border-radius: 10px;
}

.message-sender {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.message-bubble {
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.message.self .message-bubble {
  background: var(--primary);
  color: #000;
  border-bottom-right-radius: 4px;
}

.message.other .message-bubble {
  background: var(--bg-card);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-color);
}

.message-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-input-area {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-input {
  flex: 1;
  padding: 10px 16px;
  border-radius: 20px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 14px;
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}

.chat-send-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.chat-emoji-btn {
  font-size: 20px;
  background: none;
  color: var(--text-muted);
  transition: var(--transition);
}

.chat-emoji-btn:hover {
  color: var(--primary);
}

/* ========== Mobile Menu Toggle ========== */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 20px;
  align-items: center;
  justify-content: center;
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .top-header {
    padding-left: 60px;
  }
  .interaction-layout {
    grid-template-columns: 1fr;
  }
  .contact-list {
    display: none;
  }
  .contact-list.show {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
  }
  .interaction-layout {
    position: relative;
  }
  .master-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-section {
    padding: 16px 16px 80px;
  }
  .top-header {
    padding: 12px 16px 12px 60px;
  }
  .header-search {
    width: 160px;
  }
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .video-grid {
    grid-template-columns: 1fr;
  }
  .template-grid {
    grid-template-columns: 1fr;
  }
  .master-grid {
    grid-template-columns: 1fr;
  }
  .master-card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .master-badges {
    justify-content: center;
  }
  .post-images {
    grid-template-columns: 1fr;
  }
  .post-actions {
    justify-content: space-around;
  }
}

/* ========== Utility Classes ========== */
.text-center { text-align: center; }
.text-gold { color: var(--primary); }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 14px;
}

/* ========== Loading Spinner ========== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ========== Toast Notification ========== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 14px;
  box-shadow: var(--shadow);
  transform: translateY(100px);
  opacity: 0;
  z-index: 3000;
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: #4caf50;
}

.toast.error {
  border-color: var(--accent);
}

/* ========== Modal Overlay ========== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.show {
  display: flex;
}
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-hover);
  animation: modalIn 0.3s ease;
}
.auth-modal-content {
  max-width: 420px;
}
@keyframes modalIn {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}
.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}
.modal-close {
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
}
.modal-close:hover {
  color: var(--accent);
}
.modal-body {
  padding: 20px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  outline: none;
}
.form-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}
.form-submit-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #000;
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
  margin-top: 4px;
}
.form-submit-btn:hover {
  background: var(--primary-dark);
}

/* ========== Auth Modal ========== */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}
.auth-tab-btn {
  flex: 1;
  padding: 10px;
  background: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.auth-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.auth-tab-btn:hover {
  color: var(--text-primary);
}

/* 内联错误提示（登录/注册） */
.form-error {
  display: none;
  padding: 10px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: rgba(233, 69, 96, 0.12);
  border: 1px solid rgba(233, 69, 96, 0.5);
  color: #ff7d92;
  font-size: 13px;
  line-height: 1.4;
}

.auth-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 12px;
}

.chat-back-btn {
  display: none;
  background: none;
  color: var(--text-secondary);
  font-size: 20px;
  margin-right: 8px;
  padding: 4px 8px;
  transition: var(--transition);
}
.chat-back-btn:hover {
  color: var(--primary);
}

/* ========== Master Tabs ========== */
.master-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.master-tab-btn {
  padding: 8px 20px;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.master-tab-btn:hover, .master-tab-btn.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}
.master-tab-btn.cert-apply-btn {
  margin-left: auto;
  background: rgba(233, 69, 96, 0.1);
  color: var(--accent);
  border-color: var(--accent);
}
.master-tab-btn.cert-apply-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ========== Verified Badge ========== */
.master-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}
.verified-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #4caf50;
  color: #fff;
  white-space: nowrap;
}
.verified-badge.unverified {
  background: #ff9800;
}

/* ========== Pagination ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  padding: 16px 0;
}
.page-btn {
  padding: 8px 20px;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.page-btn:hover:not(:disabled) {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.page-info {
  font-size: 14px;
  color: var(--text-muted);
  min-width: 60px;
  text-align: center;
}

/* ========== Cert List ========== */
.cert-list-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}
.cert-list-section h4 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}
.cert-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.cert-name {
  font-weight: 600;
  font-size: 13px;
}
.cert-title-text {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
}
.cert-status {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 500;
}
.cert-status.status-pending {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}
.cert-status.status-approved {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}
.cert-status.status-rejected {
  background: rgba(233, 69, 96, 0.2);
  color: var(--accent);
}
.cert-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* ========== Teaching Toolbar ========== */
.teaching-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.course-upload-btn {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #000;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.course-upload-btn:hover {
  background: var(--primary-dark);
}

/* ========== Video Status Badge ========== */
.video-status {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.video-status.pending {
  background: rgba(255, 193, 7, 0.8);
  color: #000;
}
.video-status.rejected {
  background: rgba(233, 69, 96, 0.8);
  color: #fff;
}

/* ========== Approval Section ========== */
.approval-section {
  margin-top: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.approval-title {
  font-size: 16px;
  font-weight: 600;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card-hover);
}
.approval-list {
  padding: 12px 20px;
}
.approval-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}
.approval-item:last-child {
  border-bottom: none;
}
.approval-info {
  flex: 1;
  min-width: 150px;
}
.approval-course-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.approval-instructor {
  font-size: 12px;
  color: var(--text-muted);
}
.approval-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}
.approval-cat {
  font-size: 12px;
  color: var(--text-secondary);
}
.approval-time {
  font-size: 11px;
  color: var(--text-muted);
}
.approval-status-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.approval-feedback {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  max-width: 160px;
  text-align: right;
}

/* ========== Contact Actions ========== */
.contact-actions {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
}
.create-group-btn {
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(201, 168, 76, 0.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  border: 1px dashed var(--primary);
  transition: var(--transition);
}
.create-group-btn:hover {
  background: var(--primary);
  color: #000;
}

/* ========== Responsive Modal ========== */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-width: none;
  }
  .master-tab-btn.cert-apply-btn {
    margin-left: 0;
    width: 100%;
  }
  .cert-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .approval-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .approval-status-wrap {
    align-items: flex-start;
    width: 100%;
  }
}

/* ========== Language Switch ========== */
.lang-switch-btn {
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid var(--primary);
  background: transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.lang-switch-btn:hover {
  background: var(--primary);
  color: #000;
}

/* ========== Resource Center ========== */
.resource-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.resource-tab-btn {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  white-space: nowrap;
}
.resource-tab-btn:hover, .resource-tab-btn.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}
.resource-grid {
  min-height: 200px;
}
.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-light);
}
.resource-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, var(--bg-card-hover), var(--bg-card));
}
.resource-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}
.resource-card-name {
  font-size: 16px;
  font-weight: 700;
}
.resource-card-title {
  font-size: 12px;
  color: var(--primary);
  margin-top: 2px;
}
.resource-card-body {
  padding: 14px;
}
.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.resource-achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.resource-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(201, 168, 76, 0.1);
  color: var(--primary-light);
  border: 1px solid rgba(201, 168, 76, 0.2);
}
.resource-contact-btn {
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #000;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}
.resource-contact-btn:hover {
  background: var(--primary-dark);
}
.resource-school-grid,
.resource-coach-grid,
.resource-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.school-card .resource-school-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.resource-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}
.resource-movement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.movement-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}
.movement-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}
.movement-icon {
  font-size: 36px;
  margin-bottom: 8px;
}
.movement-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.movement-type {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.movement-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.resource-theory-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.theory-card {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  transition: var(--transition);
  cursor: pointer;
}
.theory-card:hover {
  border-color: var(--primary);
}
.theory-type {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  background: rgba(201, 168, 76, 0.15);
  color: var(--primary);
  white-space: nowrap;
  height: fit-content;
}
.theory-info {
  flex: 1;
}
.theory-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}
.theory-author {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.theory-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.resource-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.mv-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}
.mv-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
}
.mv-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.mv-info {
  padding: 12px;
}
.mv-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.mv-master {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== Mall ========== */
.mall-categories {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.mall-cat-btn {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.mall-cat-btn:hover, .mall-cat-btn.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}
.mall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.mall-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.mall-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-light);
}
.mall-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-card-hover);
}
.mall-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.mall-card:hover .mall-img {
  transform: scale(1.05);
}
.mall-cat-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 4px;
  background: rgba(0,0,0,0.7);
  color: var(--primary-light);
}
.mall-info {
  padding: 14px;
}
.mall-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.mall-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}
.mall-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mall-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}
.mall-rating {
  font-size: 12px;
  color: var(--primary);
}
.mall-actions {
  display: flex;
  gap: 8px;
}
.mall-buy-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #000;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}
.mall-buy-btn:hover {
  background: var(--primary-dark);
}
.mall-cart-btn {
  width: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  font-size: 18px;
  border: 1px solid var(--border-light);
  transition: var(--transition);
}
.mall-cart-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ========== Tournament ========== */
.tournament-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.tournament-tab-btn {
  padding: 8px 20px;
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 14px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}
.tournament-tab-btn:hover, .tournament-tab-btn.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
}
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}
.event-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-light);
}
.event-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.event-status {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 500;
}
.event-status.status-ongoing {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}
.event-status.status-upcoming {
  background: rgba(33, 150, 243, 0.2);
  color: #2196f3;
}
.event-status.status-ended {
  background: rgba(158, 158, 158, 0.2);
  color: #9e9e9e;
}
.event-type {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  background: rgba(201, 168, 76, 0.15);
  color: var(--primary);
}
.event-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}
.event-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.event-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 10px 0;
  line-height: 1.5;
}
.event-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.event-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-dark);
  border-radius: 3px;
  overflow: hidden;
}
.event-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.event-progress span {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.tournament-btn {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #000;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.tournament-btn:hover {
  background: var(--primary-dark);
}
.tournament-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}
.vote-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
}
.vote-card:hover {
  border-color: var(--border-light);
}
.vote-header {
  margin-bottom: 14px;
}
.vote-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.vote-event {
  font-size: 12px;
  color: var(--text-muted);
}
.vote-candidates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.vote-candidate {
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 20px;
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.vote-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* ========== Responsive additions ========== */
@media (max-width: 1024px) {
  .resource-school-grid,
  .resource-coach-grid,
  .resource-course-grid,
  .resource-video-grid,
  .event-grid,
  .vote-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .resource-tabs {
    gap: 4px;
  }
  .resource-tab-btn {
    font-size: 11px;
    padding: 4px 10px;
  }
  .mall-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .event-grid,
  .vote-grid {
    grid-template-columns: 1fr;
  }
  .resource-movement-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== 移动端头部与消息中心适配 ========== */
@media (max-width: 768px) {
  .header-search {
    display: none;
  }
  .header-title {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 38vw;
  }
  .header-actions {
    gap: 10px;
  }
  .lang-switch-btn {
    padding: 3px 8px;
    font-size: 12px;
  }
  .chat-back-btn {
    display: block;
  }
  .interaction-layout {
    height: calc(100vh - 200px);
  }
}
/* ========== Course Detail Modal ========== */
.course-detail-content {
  max-width: 720px;
}
.course-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.course-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.course-player .player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
  background: linear-gradient(135deg, #1a1a2e, #0a0a0f);
}
.course-player .player-placeholder .play-big {
  font-size: 48px;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}
.course-player .player-placeholder .play-big:hover {
  transform: scale(1.15);
  color: var(--primary-light);
}
.course-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.course-detail-meta span {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-card-hover);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}
.course-detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-section);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}
.course-sections h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.section-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
}
.section-item:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}
.section-item.active {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}
.section-index {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gradient-gold);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.section-info {
  flex: 1;
  min-width: 0;
}
.section-info .section-title {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.section-info .section-duration {
  font-size: 12px;
  color: var(--text-muted);
}
.course-detail-approve {
  margin-top: 16px;
  padding: 14px;
  background: var(--bg-section);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}
.course-detail-approve .approve-btns {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.approve-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.approve-btn.approve {
  background: #2e7d32;
  color: #fff;
}
.approve-btn.approve:hover {
  background: #388e3c;
}
.approve-btn.reject {
  background: var(--accent);
  color: #fff;
}
.approve-btn.reject:hover {
  background: var(--accent-dark);
}

/* ========== Mall (商城交互) ========== */
.mall-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.mall-tool-btn {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}
.mall-tool-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-card-hover);
}
.mall-modal-content {
  max-width: 640px;
}
/* 购物车条目 */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--bg-card);
}
.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card-hover);
}
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-name {
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 4px;
}
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-card-hover);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.cart-qty-btn:hover { border-color: var(--primary); }
.cart-item-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}
.cart-item-del:hover { color: var(--accent); }
.mall-cart-footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-total {
  font-size: 15px;
  color: var(--text-primary);
}
.cart-total b {
  color: var(--accent);
  font-size: 18px;
}
/* 商品详情 */
.mall-detail-images {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 16px;
}
.mall-detail-images img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.mall-detail-price {
  font-size: 24px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}
.mall-detail-meta {
  display: flex;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
}
.mall-detail-text {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.mall-detail-actions {
  display: flex;
  gap: 10px;
}
.mall-detail-actions button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.mall-add-cart-btn {
  background: var(--bg-card-hover);
  color: var(--primary);
  border: 1px solid var(--primary) !important;
}
.mall-add-cart-btn:hover { background: var(--primary); color: #000; }
.mall-buy-now-btn {
  background: var(--accent);
  color: #fff;
}
.mall-buy-now-btn:hover { background: var(--accent-dark); }
/* 地址 */
.address-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  background: var(--bg-card);
  transition: var(--transition);
}
.address-item:hover { border-color: var(--primary); }
.address-item.selected { border-color: var(--primary); background: var(--bg-card-hover); }
.address-item .addr-info { flex: 1; }
.address-item .addr-name { font-size: 14px; color: var(--text-primary); }
.address-item .addr-detail { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.addr-default-badge {
  font-size: 11px;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 6px;
}
/* 订单 */
.order-item {
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: var(--bg-card);
}
.order-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.order-no {
  font-size: 12px;
  color: var(--text-muted);
}
.order-status {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 12px;
}
.order-goods {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.6;
}
.order-amount {
  text-align: right;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.order-amount b { color: var(--accent); }
.order-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.order-action-btn {
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
}
.order-action-btn:hover { border-color: var(--primary); color: var(--primary); }
.order-action-btn.primary {
  background: var(--accent);
  color: #fff;
  border: none;
}
/* 评价 */
.review-star-row {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.review-star {
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.review-star.on { color: var(--primary); }
.review-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
  margin-bottom: 14px;
}

/* ========== Community (社区) ========== */
.community-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.community-publish-btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.community-publish-btn:hover { background: var(--accent-dark); }
.community-mine-btn {
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}
.community-mine-btn:hover { border-color: var(--primary); color: var(--primary); }
.community-detail-img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.community-comments {
  margin-top: 14px;
  max-height: 320px;
  overflow-y: auto;
}
.community-comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.community-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--bg-card-hover);
}
.community-comment-body { flex: 1; min-width: 0; }
.community-comment-user {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.community-comment-user b { color: var(--primary); }
.community-comment-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  word-break: break-word;
}
.community-comment-input {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.community-comment-input input {
  flex: 1;
  padding: 10px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
}

/* ========== Tournament (赛事) ========== */
.event-cover {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.tournament-detail-cover {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.tournament-detail-row {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.6;
}
.tournament-detail-row b { color: var(--text-primary); }
.tournament-detail-actions { flex-wrap: wrap; }
.contestant-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--bg-card);
}
.contestant-info { flex: 1; min-width: 0; }
.contestant-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contestant-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========== Chat (消息中心) ========== */
.chat-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.chat-tab-btn {
  padding: 8px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}
.chat-tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.chat-tab-btn.active {
  background: var(--primary);
  color: #000;
  border-color: var(--primary);
  font-weight: 600;
}
.friend-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}
.friend-search-item .contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-card-hover);
}
.friend-search-item .contact-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}
.contact-add-btn {
  padding: 5px 12px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  transition: var(--transition);
}
.contact-add-btn:hover { background: var(--primary); color: #000; }
.contact-add-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.announcement-item {
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  background: var(--bg-card);
  transition: var(--transition);
}
.announcement-item:hover { border-color: var(--primary); }
.announcement-title {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 6px;
}
.announcement-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== 全局搜索下拉 ========== */
.header-search {
  position: relative;
}
.global-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-width: 90vw;
  max-height: 420px;
  overflow-y: auto;
  background: var(--bg-card, #1a1a2e);
  border: 1px solid var(--border-color, #2a2a3e);
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  padding: 8px 0;
}
.gsearch-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted, #888);
  font-size: 13px;
}
.gsearch-group-title {
  padding: 8px 14px 4px;
  font-size: 12px;
  color: var(--text-muted, #888);
  font-weight: 600;
}
.gsearch-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.gsearch-item:hover {
  background: var(--bg-card-hover, #22223a);
}
.gsearch-item-img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card-hover, #22223a);
}
.gsearch-item-body {
  flex: 1;
  min-width: 0;
}
.gsearch-item-title {
  font-size: 13px;
  color: var(--text-primary, #eee);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gsearch-item-sub {
  font-size: 11px;
  color: var(--text-muted, #888);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gsearch-item-arrow {
  color: var(--text-muted, #888);
  font-size: 13px;
  flex-shrink: 0;
}

/* ========== 创作工坊占位横幅 ========== */
.creation-coming-banner {
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm, 8px);
  background: var(--bg-section, #1a1a2e);
  border: 1px dashed var(--border-color, #2a2a3e);
  border-left: 3px solid var(--primary, #e94560);
  color: var(--text-secondary, #aaa);
  font-size: 13px;
  line-height: 1.6;
}

/* ========== 联系弹窗 ========== */
.contact-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: var(--bg-section, #1a1a2e);
}
.contact-label {
  color: var(--text-secondary, #aaa);
  font-size: 14px;
}
.contact-value {
  color: var(--text-primary, #eee);
  font-size: 16px;
  font-weight: 600;
}

/* ========== 教练详情 ========== */
.coach-detail-content { max-width: 560px; }
.coach-detail-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.coach-detail-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary, #e94560);
  flex-shrink: 0;
}
.coach-detail-head { flex: 1; }
.coach-detail-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary, #e94560);
  margin-bottom: 6px;
}
.coach-detail-meta {
  font-size: 13px;
  color: var(--text-secondary, #aaa);
}
.coach-detail-section {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bg-section, #1a1a2e);
}
.coach-detail-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text-primary, #eee);
}
.coach-detail-section p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary, #bbb);
}
.coach-detail-contact { text-align: center; margin-top: 16px; }
.resource-coach-card { cursor: pointer; }
.resource-coach-card:hover { border-color: var(--primary, #e94560); }
.resource-detail-img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color, #2a2a3e);
}
.master-detail-cover {
  width: 120px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color, #2a2a3e);
}

/* ========== 理论详情（电子书阅读） ========== */
.theory-detail-content { max-width: 720px; }
.theory-detail-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary, #aaa);
}
.ebook-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color, #2a2a3e);
}
.ebook-toolbar-label {
  font-size: 12px;
  color: var(--text-secondary, #aaa);
}
.ebook-font-btn {
  min-width: 36px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color, #2a2a3e);
  background: var(--bg-section, #1a1a2e);
  color: var(--text-primary, #eee);
  cursor: pointer;
  font-size: 13px;
}
.ebook-font-btn:hover { border-color: var(--primary, #e94560); color: var(--primary, #e94560); }
.ebook-content {
  max-height: 480px;
  overflow-y: auto;
  padding: 20px 22px;
  border-radius: 8px;
  background: var(--bg-section, #1a1a2e);
  line-height: 2.0;
  color: var(--text-primary, #ddd);
  font-size: 16px;
  margin-bottom: 14px;
}
.ebook-section-title {
  font-size: 1.15em;
  font-weight: 700;
  color: var(--primary, #e94560);
  margin: 18px 0 10px;
  padding-left: 8px;
  border-left: 3px solid var(--primary, #e94560);
}
.ebook-para {
  margin: 0 0 12px;
  text-indent: 2em;
  text-align: justify;
}
.ebook-gap { height: 10px; }
.ebook-empty { color: var(--text-secondary, #aaa); text-align: center; padding: 20px; }
.theory-download { text-align: center; margin-top: 12px; }
.ebook-page-view {
  text-align: center;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 12px;
}
.ebook-page-img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 4px;
}
.ebook-page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.ebook-page-num {
  font-size: 13px;
  color: var(--text-secondary, #aaa);
}

/* ========== 赛事报名动态行 ========== */
.event-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.event-select {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border-color, #2a2a3e);
  border-radius: 6px;
  background: #12121a;
  color: #eee;
  font-size: 14px;
}
.event-remove {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: rgba(233, 69, 96, 0.15);
  color: #e94560;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
}
.event-add-btn {
  margin-top: 6px;
  padding: 8px 16px;
  border: 1px dashed var(--border-color, #2a2a3e);
  border-radius: 6px;
  background: transparent;
  color: #c9a84c;
  cursor: pointer;
  font-size: 13px;
}
.event-add-btn:hover { border-color: #c9a84c; }

/* ========== 报名内联错误横幅 ========== */
.reg-error-banner {
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid #e94560;
  background: rgba(233, 69, 96, 0.12);
  color: #e94560;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

/* ========== 课程播放器 ========== */
.player-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #eee);
  margin-bottom: 10px;
}
.player-video-wrap video {
  width: 100%;
  border-radius: 8px;
  background: #000;
}
.player-controlbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.player-nav-btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-color, #2a2a3e);
  background: var(--bg-section, #1a1a2e);
  color: var(--text-primary, #eee);
  cursor: pointer;
  font-size: 13px;
}
.player-nav-btn:hover:not(:disabled) { border-color: var(--primary, #e94560); color: var(--primary, #e94560); }
.player-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.player-rate-label {
  margin-left: 8px;
  font-size: 13px;
  color: var(--text-secondary, #aaa);
}
.player-rate-btn {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color, #2a2a3e);
  background: transparent;
  color: var(--text-secondary, #bbb);
  cursor: pointer;
  font-size: 12px;
}
.player-rate-btn:hover { border-color: var(--primary, #e94560); color: var(--primary, #e94560); }
.section-play { color: var(--primary, #e94560); font-size: 13px; }
.section-item.no-video { opacity: 0.55; }
