body {
  margin: 0;
  font-family: 'Helvetica Neue', sans-serif;
  background: #0d1117;
  color: #c9d1d9;
}

.container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* 侧边栏 */
.sidebar {
  width: 220px;
  background: #161b22;
  padding: 20px;
  transition: width 0.3s ease;
}

.sidebar h2 {
  margin-top: 0;
  font-size: 20px;
  color: #58a6ff;
}

.sidebar ul {
  list-style: none;
  padding-left: 0;
}

.sidebar li {
  padding: 10px 5px;
  cursor: pointer;
  border-bottom: 1px solid #30363d;
  font-size: 15px;
}

.sidebar li:hover {
  background: #21262d;
  color: #ffffff;
}

.sidebar.collapsed {
  width: 0;
  padding: 0;
  overflow: hidden;
}

/* 主内容区 */
.main {
  flex: 1;
  padding: 20px;
  background: #0d1117;
  overflow-y: auto;
  position: relative;
}

/* 折叠按钮 */
.toggle-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 12px;
  background: #21262d;
  color: #58a6ff;
  border: none;
  cursor: pointer;
  font-size: 18px;
  border-radius: 4px;
}

.toggle-btn:hover {
  background: #30363d;
}

/* 选项卡 */
.tab {
  display: none;
}
.tab.active {
  display: block;
}

/* 卡片布局：每行4个 */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
  margin-top: 16px;
    min-width: 23%;
}

.card-grid .card {
  flex: 1 1 calc(25% - 16px); /* 4个每行，减去间距 */
  background: #1c2128;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  box-sizing: border-box;
  color: #c9d1d9;
  position: relative;
  transition: transform 0.2s ease;

  max-width: 320px;
}
.card-grid .card:hover {
  transform: scale(1.02);
}
.card h3 {
  margin-top: 0;
  color: #58a6ff;
}
.card p {
  margin: 5px 0;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .card-grid .card {
    flex: 1 1 calc(50% - 16px); /* 平板：每行2个 */
  }
}
@media (max-width: 640px) {
  .card-grid .card {
    flex: 1 1 100%; /* 小屏：每行1个 */
  }
}



/* 串关标签角标 */
.card.tag-combo::before {
  content: "串关";
  position: absolute;
  top: -10px;
  right: -10px;
  background: #d364ff;
  color: #fff;
  padding: 3px 8px;
  font-size: 12px;
  border-radius: 4px;
}

/* EV 色条 */
.ev-bar {
  margin-top: 8px;
  background: #30363d;
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}
.ev-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2ea043, #40c463);
  transition: width 0.3s ease;
}

/* 命中率 Tooltip */
.tooltip {
  position: relative;
  cursor: help;
  color: #58a6ff;
  text-decoration: underline dotted;
}
.tooltip:hover::after {
  content: attr(data-tip);
  position: absolute;
  top: 120%;
  left: 0;
  background: #21262d;
  color: #c9d1d9;
  padding: 6px 10px;
  font-size: 12px;
  white-space: pre-line;
  border-radius: 5px;
  z-index: 999;
  width: max-content;
  max-width: 240px;
}

/* 收藏按钮 */
.fav-toggle {
  position: absolute;
  top: 8px;
  left: 10px;
  cursor: pointer;
  font-size: 16px;
  color: #888;
}
.fav-toggle:hover {
  color: #fff;
}
.card.fav .fav-toggle {
  color: #f0c674;
}
