/* 主题变量 */
:root {
  /* 主题色 */
  --primary-color: #ff2442;
  --primary-color-dark: #b31f35;
  --primary-color-shadow: rgba(254, 40, 67, 0.3);
  /* 文本颜色 */
  --text-color-primary: #333;
  --text-color-secondary: #5c5c5c;
  --text-color-tertiary: #858585;
  --text-color-quaternary: #bbbbbb;
  --text-color-inverse: #fff;
  --text-color-tag: #13386c;
  /* 背景颜色 */
  --bg-color-primary: #fff;
  --bg-color-secondary: #f7f7f7;
  --bg-color-tertiary: #e8e4e4;
  --bg-color-inverse: #474747;
  /* 边框颜色 */
  --border-color-primary: #ebebeb;
  --border-color-secondary: #eee;

  /* 禁用状态颜色 */
  --disabled-bg: #ccc;
  --disabled-text: #ffffff;

  /* 阴影颜色 */
  --shadow-color: rgba(0, 0, 0, 0.08);
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

  /* 通用遮罩背景（半透明） */
  --overlay-bg: rgba(18, 18, 18, 0.5);

  /* 按钮文字颜色 */
  --button-text-color: #fff;

  /* 危险颜色 */
  --danger-color: #ff0c30;
  --danger-color-dark: rgb(201, 9, 37);
}

/* 深色主题 */
[data-theme="dark"] {
  /* 主题色 */
  --primary-color: #ff2442;
  --primary-color-dark: #b31f35;
  --primary-color-shadow: rgba(254, 40, 67, 0.3);

  /* 文本颜色 */
  --text-color-primary: #e0e0e0;
  --text-color-secondary: #b0b0b0;
  --text-color-tertiary: #909090;
  --text-color-quaternary: #707070;
  --text-color-inverse: #0a0a0a;
  --text-color-tag: #c7daef;

  /* 背景颜色 */
  --bg-color-primary: #121212;
  --bg-color-secondary: #1e1e1e;
  --bg-color-tertiary: #2a2a2a;
  --bg-color-inverse: #e7e7e7;

  /* 边框颜色 */
  --border-color-primary: #242424;
  --border-color-secondary: #252525;

  /* 禁用状态颜色 */
  --disabled-bg: #ccc;
  --disabled-text: #ffffff;

  /* 阴影颜色 */
  --shadow-color: rgba(0, 0, 0, 0.3);

  /* 通用遮罩背景（半透明） */
  --overlay-bg: rgba(27, 27, 27, 0.6);

  /* 按钮文字颜色 */
  --button-text-color: #fff;

  /* 危险颜色 */
  --danger-color: #ff0c30;
  --danger-color-dark: rgb(201, 9, 37);
}

/* 基础样式 */
* {
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: var(--font-family);
  background-color: var(--bg-color-primary);
  color: var(--text-color-primary);
  overflow-x: hidden;
  width: 100vw;
  min-width: 100%;
  min-height: 100vh;
  max-width: 100vw;
}

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

/* 侧边栏遮罩层 */
.sidebar-mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--overlay-bg);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-mobile-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* 侧边栏 */
.sidebar {
  display: flex;
  flex-direction: column;
  width: 240px;
  background: var(--bg-color-primary);
  position: fixed;
  z-index: 100;
  left: 0;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  padding: 16px;
  justify-content: space-between;
  transition: border-color .2s ease, background-color .2s ease, transform .3s ease, width .3s ease;
  border-right: 1px solid var(--border-color-primary);
  box-shadow: 2px 0 10px var(--shadow-color);
}

.sidebar-menu {
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  height: 52px;
  margin-bottom: 8px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.sidebar-menu li:hover {
  background-color: var(--bg-color-secondary);
}

.sidebar-footer-item {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  height: 52px;
  margin-bottom: 8px;
  border-radius: 12px;
  list-style: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-footer-item:hover {
  background: var(--bg-color-secondary);
}

.sidebar-link {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 16px;
  color: var(--text-color-primary);
  text-decoration: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sidebar-link:hover {
  background: var(--bg-color-secondary);
}

.sidebar-link.active {
  background: var(--bg-color-secondary);
  color: var(--primary-color);
}

.sidebar-footer-item .sidebar-link:hover {
  background: transparent;
}

.sidebar-icon {
  margin-right: 16px;
  display: flex;
  align-items: center;
  width: 24px;
  height: 24px;
  justify-content: center;
}

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

.sidebar-footer {
  margin-top: auto;
  margin-bottom: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color-primary);
}

.sidebar-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color-primary);
}

/* 顶部导航栏 */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background-color: var(--bg-color-primary);
  border-bottom: 1px solid var(--border-color-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 101;
  box-shadow: 0 2px 10px var(--shadow-color);
}

.top-nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.top-nav-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-color-primary);
  letter-spacing: 0.5px;
}

.top-nav-search {
  flex: 1;
  max-width: 480px;
  margin: 0 30px;
}

.top-nav-search input {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid var(--border-color-primary);
  border-radius: 24px;
  background-color: var(--bg-color-secondary);
  color: var(--text-color-primary);
  font-size: 14px;
  transition: all 0.3s ease;
}

.top-nav-search input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-color-shadow);
  transform: translateY(-1px);
}

.top-nav-actions {
  display: flex;
  gap: 16px;
}

.top-nav-action {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.top-nav-action:hover {
  background-color: var(--bg-color-tertiary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-color);
}

.top-nav-action.notification::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--primary-color);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-color-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn:hover {
  background-color: var(--bg-color-tertiary);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  /* 移动端菜单按钮显示 */
  .mobile-menu-btn {
    display: flex;
  }
}

/* 主内容区域 */
.main-content {
  flex: 1;
  padding: 24px;
  padding-top: 96px;
  min-height: 100vh;
  margin-left: 240px;
}

/* 容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* 玩家展示 - 列表页 */
.players-showcase {
  padding: 24px 0;
}

/* 头部 */
.showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color-primary);
}

.showcase-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color-primary);
  letter-spacing: 1px;
}

.filter-btn {
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px var(--primary-color-shadow);
}

.filter-btn:hover {
  background-color: var(--primary-color-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--primary-color-shadow);
}

/* 玩家网格 */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

/* 玩家卡片 */
.player-card {
  background-color: var(--bg-color-primary);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color-primary);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--shadow-color);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-color-primary);
}

.player-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px var(--shadow-color);
  border-color: var(--primary-color);
}

/* 玩家头像 */
.player-avatar {
  position: relative;
  height: 220px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-color-secondary);
}

.player-avatar img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.player-card:hover .player-avatar img {
  transform: scale(1.1);
}

/* 玩家信息 */
.player-info {
  padding: 16px;
  text-align: center;
}

.player-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color-primary);
  line-height: 1.4;
  margin: 0;
  margin-bottom: 6px;
}

.player-title {
  font-size: 14px;
  color: var(--primary-color);
  margin: 0;
  line-height: 1.4;
}

/* 面包屑 - 详情页 */
.breadcrumb {
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-color-secondary);
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* 玩家详情 - 详情页 */
.player-detail {
  padding: 24px 0;
  display: flex;
  justify-content: center;
}

/* 玩家详情卡片 */
.player-detail-card {
  background-color: var(--bg-color-primary);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color-primary);
  box-shadow: 0 4px 12px var(--shadow-color);
  padding: 32px;
  margin-bottom: 32px;
  max-width: 1100px;
  width: 100%;
}

/* 玩家内容容器 */
.player-content-wrapper {
  display: flex;
  gap: 32px;
}

/* 玩家侧边栏 */
.player-sidebar {
  flex-shrink: 0;
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-right: 32px;
  border-right: 1px solid var(--border-color-primary);
}

/* 玩家主内容 */
.player-main-content {
  flex: 1;
  min-width: 0;
}

/* 玩家详情页 - 玩家头像 */
.player-sidebar .player-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
  width: 100%;
}

.player-sidebar .player-avatar img {
  width: 260px;
  height: 260px;
  border-radius: 16px;
  object-fit: contain;
  background-color: var(--bg-color-secondary);
  box-shadow: 0 4px 12px var(--shadow-color);
}

/* 玩家信息 */
.player-info {
  flex: 1;
}

.player-header .player-name {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-color-primary);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.player-header .player-title {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.player-meta {
  margin-bottom: 24px;
  line-height: 1.8;
}

.player-meta p {
  margin: 8px 0;
  font-size: 16px;
  color: var(--text-color-secondary);
}

.player-region,
.player-occupation {
  display: block;
}

/* 玩家统计 */
.player-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color-primary);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-color-secondary);
}

/* 玩家介绍 */
.player-bio {
  margin-bottom: 32px;
}

.player-bio p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-color-secondary);
  margin-bottom: 16px;
}

.player-bio p:last-child {
  margin-bottom: 0;
}

.player-bio strong {
  font-weight: 600;
  color: var(--text-color-primary);
}

.player-bio em {
  font-style: italic;
}

.player-bio u {
  text-decoration: underline;
}

.player-bio s {
  text-decoration: line-through;
}

.player-bio ul,
.player-bio ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.player-bio li {
  margin-bottom: 8px;
  line-height: 1.8;
}

.player-bio div {
  margin-bottom: 12px;
}

.player-bio div:empty {
  display: none;
}

.player-bio br {
  line-height: 1.5;
}

.player-bio img {
  max-width: 200px;
  height: auto;
  float: left;
  margin-right: 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color-primary);
}

.player-introduction-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-color-secondary);
}

/* 返回按钮 */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px var(--primary-color-shadow);
}

.back-button:hover {
  background-color: var(--primary-color-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--primary-color-shadow);
}

/* 加载状态 */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  font-size: 18px;
  color: var(--text-color-secondary);
}

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

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 错误状态 */
.error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  text-align: center;
}

.error-icon {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.error-message {
  font-size: 18px;
  margin-bottom: 24px;
  color: var(--text-color-primary);
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
}

.page-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color-primary);
  background-color: var(--bg-color-primary);
  color: var(--text-color-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-item:hover {
  background-color: var(--bg-color-secondary);
  transform: translateY(-1px);
}

.page-item.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px var(--primary-color-shadow);
}

.page-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-item.disabled:hover {
  transform: none;
  background-color: var(--bg-color-primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
  /* 移动端侧边栏 */
  .sidebar {
    width: 260px;
    left: -260px;
    transform: translateX(0);
    box-shadow: 4px 0 20px var(--shadow-color);
  }

  .sidebar.mobile-open {
    transform: translateX(100%);
  }

  /* 主内容区域 */
  .main-content {
    margin-left: 0;
    padding: 16px;
    padding-top: 96px;
  }

  /* 顶部导航栏 */
  .top-nav {
    padding: 0 16px;
  }

  .top-nav-title {
    font-size: 18px;
  }

  .top-nav-search {
    display: none;
  }

  /* 玩家网格 */
  .players-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .player-image-container {
    height: 180px;
  }

  .showcase-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* 玩家内容容器 */
  .player-content-wrapper {
    flex-direction: column;
  }

  .player-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color-primary);
    padding-right: 0;
    padding-bottom: 24px;
  }

  .player-sidebar .player-avatar {
    height: 250px;
  }

  .player-sidebar .player-avatar img {
    width: 250px;
    height: 250px;
  }

  .player-stats {
    justify-content: center;
    gap: 24px;
  }

  /* 玩家详情卡片 */
  .player-detail-card {
    padding: 24px;
  }

  .player-name {
    font-size: 24px;
  }

  .section-title {
    font-size: 18px;
  }

  .player-introduction-text {
    font-size: 14px;
  }
}

/* 平板设备适配 */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    left: 0;
    width: 220px;
  }

  .main-content {
    margin-left: 220px;
  }

  .players-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .player-image-container {
    height: 200px;
  }

  .player-header {
    gap: 24px;
  }

  .player-header .player-avatar {
    height: 300px;
  }

  .player-header .player-avatar img {
    width: 300px;
    height: 300px;
  }

  .player-name {
    font-size: 28px;
  }
}