/* ============================================
   竞伴管理后台 - 自定义样式
   电竞紫色主题 主色 #6c5ce7
   ============================================ */

:root {
  --jb-primary: #6c5ce7;
  --jb-primary-dark: #5a4bd4;
  --jb-primary-light: #a29bfe;
  --jb-bg: #f5f6fb;
  --jb-text: #2d3436;
  --jb-text-light: #636e72;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--jb-bg);
  color: var(--jb-text);
}

#app {
  height: 100%;
}

/* ---------- 登录页 ---------- */
.login-wrap {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6c5ce7 0%, #4834d4 50%, #341f97 100%);
  position: relative;
  overflow: hidden;
}

/* 登录页背景装饰光晕 */
.login-wrap::before,
.login-wrap::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.35;
}
.login-wrap::before {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #a29bfe, transparent 70%);
  top: -120px;
  left: -80px;
}
.login-wrap::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #00cec9, transparent 70%);
  bottom: -160px;
  right: -120px;
}

.login-card {
  position: relative;
  z-index: 2;
  width: 400px;
  padding: 44px 40px 36px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(52, 31, 151, 0.35);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo .logo-emoji {
  font-size: 46px;
  line-height: 1;
}
.login-logo h1 {
  margin: 12px 0 4px;
  font-size: 24px;
  font-weight: 700;
  color: var(--jb-primary);
  letter-spacing: 2px;
}
.login-logo p {
  margin: 0;
  font-size: 13px;
  color: var(--jb-text-light);
}

.login-card .el-button {
  width: 100%;
  margin-top: 8px;
}

.login-tip {
  margin-top: 18px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--jb-text-light);
  background: #f3f2ff;
  border-radius: 8px;
  text-align: center;
}

/* ---------- 主布局 ---------- */
.layout {
  height: 100vh;
}

.layout-aside {
  background: linear-gradient(180deg, #2d2b55 0%, #1f1d3a 100%);
  color: #fff;
  transition: width 0.25s;
  overflow: hidden;
}

.aside-logo {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  background: rgba(108, 92, 231, 0.25);
  white-space: nowrap;
}
.aside-logo .logo-emoji {
  font-size: 24px;
}

/* 覆盖 el-menu 深色风格 */
.layout-aside .el-menu {
  border-right: none;
  background: transparent;
}
.layout-aside .el-menu-item {
  color: #c7c5e0;
  height: 52px;
}
.layout-aside .el-menu-item .el-icon,
.layout-aside .el-menu-item .menu-emoji {
  margin-right: 8px;
}
.layout-aside .el-menu-item:hover {
  background: rgba(108, 92, 231, 0.18);
  color: #fff;
}
.layout-aside .el-menu-item.is-active {
  color: #fff;
  background: linear-gradient(90deg, var(--jb-primary), rgba(108, 92, 231, 0.4));
  border-left: 3px solid var(--jb-primary-light);
}
.menu-emoji {
  font-size: 17px;
}

/* 顶部 header */
.layout-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: #fff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--jb-text);
}
.header-left .collapse-btn {
  cursor: pointer;
  font-size: 20px;
  color: var(--jb-text-light);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--jb-text);
}

/* 内容区 */
.layout-main {
  padding: 20px;
  background: var(--jb-bg);
  overflow-y: auto;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--jb-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-title .bar {
  width: 4px;
  height: 20px;
  background: var(--jb-primary);
  border-radius: 2px;
}

/* ---------- 数据统计卡片 ---------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.stat-card {
  position: relative;
  padding: 22px 24px;
  border-radius: 14px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.stat-card .stat-emoji {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 52px;
  opacity: 0.28;
}
.stat-card .stat-label {
  font-size: 14px;
  opacity: 0.92;
  margin-bottom: 10px;
}
.stat-card .stat-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
}
.stat-card .stat-sub {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.85;
}
.stat-card.c1 {
  background: linear-gradient(135deg, #6c5ce7, #8e7bff);
}
.stat-card.c2 {
  background: linear-gradient(135deg, #00b894, #00cec9);
}
.stat-card.c3 {
  background: linear-gradient(135deg, #0984e3, #74b9ff);
}
.stat-card.c4 {
  background: linear-gradient(135deg, #e17055, #fab1a0);
}

/* 仪表盘图表区 */
.dash-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
.chart-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
.chart-card .chart-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--jb-text);
}

/* CSS 柱状图 */
.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 220px;
  padding-top: 10px;
}
.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}
.bar-item .bar-value {
  font-size: 12px;
  color: var(--jb-primary);
  font-weight: 600;
}
.bar-item .bar-column {
  width: 60%;
  max-width: 36px;
  background: linear-gradient(180deg, #a29bfe, #6c5ce7);
  border-radius: 6px 6px 0 0;
  transition: height 0.6s ease;
  min-height: 4px;
}
.bar-item .bar-label {
  font-size: 12px;
  color: var(--jb-text-light);
}

/* 游戏占比列表 */
.dist-item {
  margin-bottom: 16px;
}
.dist-item .dist-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--jb-text);
}

/* ---------- 通用内容卡片 ---------- */
.content-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar .spacer {
  flex: 1;
}

/* 表格战绩缩略图 */
.shot-thumb {
  width: 72px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #eee;
}

/* 费率表单卡片 */
.fee-form {
  max-width: 560px;
}
.fee-tip {
  margin-top: 4px;
  font-size: 12px;
  color: var(--jb-text-light);
}

/* 合规提示条 */
.compliance-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #fff0f0, #fff8f0);
  border: 1px solid #ffd8d8;
  border-radius: 10px;
  font-size: 13px;
  color: #d63031;
}

/* 主题按钮覆盖 */
.el-button--primary {
  --el-button-bg-color: var(--jb-primary);
  --el-button-border-color: var(--jb-primary);
  --el-button-hover-bg-color: var(--jb-primary-light);
  --el-button-hover-border-color: var(--jb-primary-light);
  --el-button-active-bg-color: var(--jb-primary-dark);
  --el-button-active-border-color: var(--jb-primary-dark);
}

/* 响应式：小屏下卡片自适应 */
@media (max-width: 1200px) {
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-row {
    grid-template-columns: 1fr;
  }
}
