/* =========================================================
   NG游戏管理系统 - 自定义样式（配合 Bootstrap 5）
   ========================================================= */
:root {
  --sidebar-width: 230px;
  --sidebar-bg: #1b2a3a;
  --sidebar-active: #2563eb;
  --topbar-height: 56px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f6f9;
  color: #1f2937;
}

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
}
.sidebar-brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  font-weight: 600;
  color: #fff;
  font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-brand i { font-size: 20px; color: #60a5fa; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all .15s;
}
.nav-item i { font-size: 16px; width: 20px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: rgba(37, 99, 235, .18);
  color: #fff;
  border-left-color: var(--sidebar-active);
}
.sidebar-footer { padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }

.main { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 90;
}
.topbar-title { font-size: 16px; font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.content { padding: 20px; flex: 1; }
.footer { background: #fff; border-top: 1px solid #e5e7eb; }

/* ---------- 统计卡片 ---------- */
.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.stat-value { font-size: 18px; font-weight: 700; word-break: break-all; line-height: 1.3; }

.bg-primary-soft { background: #dbeafe; }
.bg-success-soft { background: #d1fae5; }
.bg-warning-soft { background: #fef3c7; }
.bg-danger-soft  { background: #fee2e2; }
.bg-info-soft    { background: #e0f2fe; }

/* ---------- 卡片 ---------- */
.card { border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { border-bottom: 1px solid #e5e7eb; font-size: 14px; font-weight: 600; }

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1b2a3a 0%, #2563eb 100%);
}
.login-card {
  width: 400px;
  max-width: calc(100vw - 40px);
  background: #fff;
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.login-logo {
  width: 60px; height: 60px;
  margin: 0 auto;
  border-radius: 14px;
  background: #2563eb;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
}

/* ---------- 表格 ---------- */
.table > :not(caption) > * > * { padding: .55rem .75rem; }
.table thead th { font-size: 13px; font-weight: 600; color: #4b5563; white-space: nowrap; }
.table tbody td { font-size: 13.5px; }

/* ---------- 其他 ---------- */
.badge { font-weight: 500; }
code { font-size: 12.5px; }
pre { font-size: 12px; }
.sticky-top { top: 0; z-index: 5; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .content { padding: 14px; }
}

/* =========================================================
   玩家前台（home/）
   ========================================================= */
.player-topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 18px;
  height: 58px; padding: 0 20px;
  background: linear-gradient(90deg, #16222e 0%, #1f3a5f 60%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .18);
}
.player-brand {
  display: flex; align-items: center; gap: 8px;
  color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
}
.player-brand i { font-size: 20px; color: #7dd3fc; }
.player-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.player-nav-item {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  color: rgba(255,255,255,.78); text-decoration: none; font-size: 14px; white-space: nowrap;
  transition: all .15s;
}
.player-nav-item:hover { background: rgba(255,255,255,.12); color: #fff; }
.player-nav-item.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.player-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.player-wallet-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.14); border-radius: 999px;
  padding: 5px 14px; color: #fff; text-decoration: none; font-size: 14px;
}
.player-wallet-badge:hover { background: rgba(255,255,255,.24); color: #fff; }
.player-wallet-badge strong { color: #fde68a; }
.player-account { font-size: 13px; color: rgba(255,255,255,.75); }

.player-content { max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; }
.player-footer { padding: 18px; border-top: 1px solid #e5e7eb; background: #fff; }

/* 钱包/大厅 主卡片 */
.player-hero {
  background: linear-gradient(135deg, #1f3a5f 0%, #2563eb 100%);
  color: #fff; border-radius: 14px; padding: 22px 24px; height: 100%;
  box-shadow: 0 6px 20px rgba(37, 99, 235, .18);
}
.player-hero-alt {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  box-shadow: 0 6px 20px rgba(20, 184, 166, .18);
}
.player-hero-label { font-size: 13px; opacity: .85; margin-bottom: 6px; }
.player-hero-value { font-size: 30px; font-weight: 800; letter-spacing: .5px; }
.player-hero-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.player-hero-note { margin-top: 10px; font-size: 12px; opacity: .82; }

/* 游戏类型条 */
.player-typebar {
  display: flex; gap: 8px; overflow-x: auto;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 8px; margin-bottom: 16px;
}
.player-type-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; white-space: nowrap;
  color: #4b5563; text-decoration: none; font-size: 14px; font-weight: 500;
}
.player-type-item:hover { background: #f3f4f6; color: #1f2937; }
.player-type-item.active { background: #2563eb; color: #fff; }

/* 平台卡片 */
.plat-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 16px; height: 100%;
  transition: all .15s;
}
.plat-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .10);
  transform: translateY(-2px);
}
.plat-card-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.plat-card-balance { font-size: 12px; color: #6b7280; margin-bottom: 12px; }
.plat-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 576px) {
  .player-hero-value { font-size: 24px; }
  .player-content { padding: 14px 10px 30px; }
}
