/* ==================== 首页全局样式 ==================== */
.home-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==================== 模块卡片通用 ==================== */
.home-section {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f0f0f0;
  overflow: hidden;
}

.home-section-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: '14px 24px';
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-section-header .header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-section-header .header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-section-body {
  padding: 20px;
}

/* ==================== 在线人数区域 ==================== */
.online-number {
  font-size: 56px;
  font-weight: 800;
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

/* ==================== 统计卡片 ==================== */
.stat-card {
  border-radius: 14px;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.04);
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 24px;
  color: #fff;
}

.stat-card .stat-label {
  font-size: 13px;
  color: #8c8c8c;
  margin-bottom: 6px;
  font-weight: 500;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.stat-card .stat-suffix {
  font-size: 14px;
  font-weight: 400;
  margin-left: 2px;
}

/* ==================== 图表卡片 ==================== */
.chart-section {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #f0f0f0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-section:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.chart-section .chart-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-section .chart-header-title {
  font-size: 15px;
  font-weight: 600;
  color: #262626;
}

.chart-section .chart-body {
  padding: 16px 20px 20px;
  height: 300px;
  position: relative;
}

/* ==================== 数字动画 ==================== */
.number-animation {
  display: inline-block;
  transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.number-animation.loading {
  opacity: 0.5;
}

.number-animation.animating {
  transition: none;
}

@keyframes numberChange {
  0% {
    transform: translateY(-20%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f0f2f5;
}

.logo {
  height: 32px;
  margin: 16px;
  background: rgba(255, 255, 255, 0.2);
}

.site-layout .site-layout-background {
  background: #fff;
}

.ant-layout {
  min-height: 100vh;
}

.ant-layout-sider {
  position: fixed;
  height: 100vh;
  left: 0;
  transition: all 0.2s;
}

.ant-layout-header {
  padding: 0;
  background: #fff;
  position: fixed;
  width: 100%;
  z-index: 1;
}

.ant-layout-content {
  margin: 24px 16px;
  padding: 24px;
  background: #fff;
  margin-top: 64px;
}

/* 添加一些动画效果 */
.ant-card {
  transition: all 0.3s;
}

.ant-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ant-statistic-content {
  transition: all 0.3s;
}

/* 菜单展开/收起动画 */
.ant-menu {
  transition: width 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
}

.ant-menu-inline .ant-menu-item,
.ant-menu-inline .ant-menu-submenu-title {
  transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
}

.ant-menu-inline-collapsed .ant-menu-item,
.ant-menu-inline-collapsed .ant-menu-submenu-title {
  padding: 0 calc(50% - 16px) !important;
}

.ant-menu-inline .ant-menu-submenu {
  transition: padding-bottom 0.2s cubic-bezier(0.645, 0.045, 0.355, 1),
              border-bottom-width 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
}

.ant-menu-submenu-inline > .ant-menu-submenu-title .ant-menu-submenu-arrow {
  transition: transform 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
}

.ant-menu-inline .ant-menu-item::after {
  transition: transform 0.2s cubic-bezier(0.645, 0.045, 0.355, 1),
              opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1),
              border-width 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
}

/* 优化子菜单展开/收起动画 */
.ant-menu-sub.ant-menu-inline {
  transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
}

.ant-menu-inline > .ant-menu-item,
.ant-menu-inline > .ant-menu-submenu > .ant-menu-submenu-title {
  transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1),
              margin 0.2s cubic-bezier(0.645, 0.045, 0.355, 1),
              padding 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
}
