/* ── 分组统计 chip ── */
.sb-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: rgb(var(--mdui-color-on-surface-variant));
  background: rgb(var(--mdui-color-surface-container-high));
  border: 1px solid rgb(var(--mdui-color-outline-variant));
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.sb-stat-chip mdui-icon {
  font-size: 14px;
  opacity: 0.7;
}

.sb-stat-chip.glass {
  background: var(--glass-bg, rgba(255, 255, 255, 0.2));
  border-color: var(--glass-border, rgba(255, 255, 255, 0.3));
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  transition: background 0.2s, border-color 0.2s,
              backdrop-filter 260ms cubic-bezier(0.2, 0, 0, 1),
              -webkit-backdrop-filter 260ms cubic-bezier(0.2, 0, 0, 1);
}

.sb-stat-chip--muted {
  color: rgb(var(--mdui-color-outline));
  background: transparent;
  border-color: transparent;
}

.sb-stat-chip--muted.sb-stat-chip--active {
  color: rgb(var(--mdui-color-on-primary));
  border-color: rgb(var(--mdui-color-primary));
  background: rgb(var(--mdui-color-primary));
}

.sb-stat-chip--muted.glass {
  background: rgba(128, 128, 128, 0.1);
  border-color: rgba(128, 128, 128, 0.2);
}

.sb-stat-chip--danger {
  color: rgb(var(--mdui-color-on-error-container));
  background: rgb(var(--mdui-color-error-container));
  border-color: rgba(var(--mdui-color-error), 0.28);
}

.sb-stat-chip--danger.glass {
  color: rgb(var(--mdui-color-error));
  background: rgba(var(--mdui-color-error-container), 0.62);
  border-color: rgba(var(--mdui-color-error), 0.32);
}

.sb-card-item {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  padding: calc(12px * var(--sb-scale, 1.0)) calc(16px * var(--sb-scale, 1.0));
  min-height: calc(130px * var(--sb-scale, 1.0));
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.sb-card-map-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.2s ease;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.03) 3%, rgba(0, 0, 0, 0.08) 12%, rgba(0, 0, 0, 0.18) 28%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.65) 62%, rgba(0, 0, 0, 0.9) 78%, #000 88%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.03) 3%, rgba(0, 0, 0, 0.08) 12%, rgba(0, 0, 0, 0.18) 28%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.65) 62%, rgba(0, 0, 0, 0.9) 78%, #000 88%);
}

.sb-card-item--map-image .sb-card-map-image {
  opacity: 0.5;
}

/* 状态圆�?- 行内显示 */
.sb-card-status-corner {
  display: inline-block;
  flex: 0 0 8px;
  align-self: center;
  vertical-align: middle;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin: 3px 4px 0 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  will-change: box-shadow;
}

/* 状态圆灯颜色与增强的发�?脉冲动画 */
.sb-card-status-corner.online {
  background-color: #00e676 !important;
  /* 极亮霓虹�?*/
  box-shadow: 0 0 6px #00e676;
  /* 常驻发光 */
  animation: pulse-green 2s infinite;
}

/* Filtered card preview style */
.sb-card-item--filtered-preview {
  border: 1px dashed rgba(var(--mdui-color-outline), 0.5) !important;
  position: relative;
  overflow: hidden;
}
.sb-card-item--filtered-preview::before {
  content: '已过滤';
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 12px;
  padding: 3px 8px;
  background: rgb(var(--mdui-color-error-container));
  color: rgb(var(--mdui-color-on-error-container));
  border-radius: 6px;
  font-weight: 500;
  z-index: 2;
}

.sb-card-status-corner.near-full {
  background-color: #ffd600 !important;
  box-shadow: 0 0 8px #ffd600, 0 0 0 0 rgba(255, 214, 0, 0.72);
  animation: pulse-yellow 1.6s infinite cubic-bezier(0.2, 0, 0.2, 1);
}

.sb-card-status-corner.full {
  background-color: #ff0000 !important;
  /* RGB 纯红 */
  box-shadow: 0 0 8px #ff0000;
  /* 强力常驻发光 */
  animation: pulse-red 2s infinite;
}

.sb-card-status-corner.offline {
  background-color: #9e9e9e !important;
  /* 灰色 */
  box-shadow: none !important;
}

.sb-card-status-corner.pending {
  background-color: #bdbdbd !important;
  /* 灰色 */
  box-shadow: none !important;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 6px #00e676, 0 0 0 0 rgba(0, 230, 118, 0.6);
  }

  70% {
    box-shadow: 0 0 6px #00e676, 0 0 0 6px rgba(0, 230, 118, 0);
  }

  100% {
    box-shadow: 0 0 6px #00e676, 0 0 0 0 rgba(0, 230, 118, 0);
  }
}

@keyframes pulse-yellow {
  0% {
    box-shadow: 0 0 6px #ffd600, 0 0 0 0 rgba(255, 214, 0, 0.6);
  }

  70% {
    box-shadow: 0 0 6px #ffd600, 0 0 0 6px rgba(255, 214, 0, 0);
  }

  100% {
    box-shadow: 0 0 6px #ffd600, 0 0 0 0 rgba(255, 214, 0, 0);
  }
}

@keyframes pulse-red {
  0% {
    box-shadow: 0 0 8px #ff0000, 0 0 0 0 rgba(255, 0, 0, 0.6);
  }

  70% {
    box-shadow: 0 0 8px #ff0000, 0 0 0 8px rgba(255, 0, 0, 0);
  }

  100% {
    box-shadow: 0 0 8px #ff0000, 0 0 0 0 rgba(255, 0, 0, 0);
  }
}

.sb-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 液态玻璃卡片样�?*/
.sb-card-item.glass {
  background: rgba(var(--mdui-color-surface-container), 0.45) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(var(--mdui-color-outline-variant), 0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 2px 16px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s,
              background-color 260ms cubic-bezier(0.2, 0, 0, 1),
              backdrop-filter 260ms cubic-bezier(0.2, 0, 0, 1),
              -webkit-backdrop-filter 260ms cubic-bezier(0.2, 0, 0, 1);
}

.sb-card-item.glass:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 4px 20px rgba(0,0,0,0.14);
}

.sb-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0px;
  position: relative;
  z-index: 1;
}

.sb-card-title {
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: rgb(var(--mdui-color-on-surface));
  margin-bottom: 2px;
  white-space: nowrap;
}

.sb-card-title:not(.sb-card-title-row) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-card-title-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: calc(6px * var(--sb-scale, 1.0));
}

.sb-card-item--has-game-chip .sb-card-title-row {
  padding-right: 38px;
}

.sb-card-title-text {
  flex: 1;
  min-width: 0;
}

.sb-card-subtitle {
  min-width: 0;
  font-size: 11px;
  color: rgb(var(--mdui-color-on-surface-variant));
  margin-bottom: 6px;
}

.sb-game-corner-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 18px;
  zoom: 0.6;
  opacity: 0.5;
  pointer-events: none;
}

.sb-game-corner-chip--filtered {
  top: 42px;
}

.sb-game-corner-container {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  gap: 4px;
  pointer-events: none;
  align-items: center;
}

.sb-game-corner-container--filtered {
  top: 42px;
}

.sb-game-corner-chip-item {
  font-size: 18px;
  zoom: 0.6;
  opacity: 0.5;
  pointer-events: none;
}

.sb-game-corner-chip-item--tier {
  opacity: 0.92;
  color: var(--sb-tier-text, #ffffff);
  background: var(--sb-tier-color, rgba(var(--mdui-color-secondary-container), 0.92));
  border: 1px solid color-mix(in srgb, var(--sb-tier-color, #888888) 68%, rgba(255, 255, 255, 0.34));
}

.sb-game-corner-chip-item--pve {
  opacity: 0.96;
  color: rgb(var(--mdui-color-on-surface));
  background: rgba(var(--mdui-color-surface-container-high), 0.92);
  border: 1px solid rgba(var(--mdui-color-outline-variant), 0.6);
  box-shadow: none;
}

.sb-game-corner-chip-item--t1 { --sb-tier-color: #049c49; }
.sb-game-corner-chip-item--t2 { --sb-tier-color: #007053; }
.sb-game-corner-chip-item--t3 { --sb-tier-color: #f39c12; --sb-tier-text: #2b1a00; }
.sb-game-corner-chip-item--t4 { --sb-tier-color: #fd7e14; --sb-tier-text: #2b1200; }
.sb-game-corner-chip-item--t5 { --sb-tier-color: #e74c3c; }
.sb-game-corner-chip-item--t6 { --sb-tier-color: #c52412; }
.sb-game-corner-chip-item--t7 { --sb-tier-color: #d22ce5; --sb-tier-text: #250028; }
.sb-game-corner-chip-item--t8 { --sb-tier-color: #8b1199; }
.sb-game-corner-chip-item--t9 { --sb-tier-color: #6f42c1; }
.sb-game-corner-chip-item--t10 { --sb-tier-color: #303030; }

.sb-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 100px;
  width: fit-content;
}

.sb-card-status.online {
  background: #e3f2e6;
  color: #2e7d32;
}

.sb-card-status.offline {
  background: #fce4e4;
  color: #c62828;
}

.sb-card-status.pending {
  background: rgb(var(--mdui-color-surface-variant));
  color: rgb(var(--mdui-color-on-surface-variant));
}

.status-dot {
  font-size: 8px;
  display: inline-block;
}

.sb-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat .label {
  color: rgb(var(--mdui-color-on-surface-variant));
  font-size: 11px;
  white-space: nowrap;
}

.stat .value {
  font-weight: 600;
  color: rgb(var(--mdui-color-on-surface));
  white-space: nowrap;
}

.sb-card-error {
  margin-top: 10px;
  font-size: 13px;
  color: #c62828;
}

.sb-card-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  gap: calc(6px * var(--sb-scale, 1.0));
}

.sb-card-action-button {
  width: calc(38px * var(--sb-scale, 1.0)) !important;
  height: calc(38px * var(--sb-scale, 1.0)) !important;
  min-width: calc(38px * var(--sb-scale, 1.0)) !important;
  flex: 0 0 calc(38px * var(--sb-scale, 1.0));
}

.sb-card-action-main {
  width: calc(48px * var(--sb-scale, 1.0)) !important;
  height: calc(48px * var(--sb-scale, 1.0)) !important;
  min-width: calc(48px * var(--sb-scale, 1.0)) !important;
  flex: 0 0 calc(48px * var(--sb-scale, 1.0));
}

.sb-card-action-copy {
  transform: scale(0.94);
}

.sb-card-action-button mdui-icon {
  font-size: calc(18px * var(--sb-scale, 1.0));
}

.sb-card-actions .danger {
  color: rgb(var(--mdui-color-error));
}

/* 底部横栏，对齐信息与操作按钮 */
.sb-card-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  /* Pushes the row to the bottom of the card */
  width: 100%;
}

.sb-card-bottom-left {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
}

/* 玩家人数与环形进度条容器 */
.sb-card-player-container {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: calc(12px * var(--sb-scale, 1.0));
}

.sb-player-circle {
  width: calc(24px * var(--sb-scale, 1.0));
  height: calc(24px * var(--sb-scale, 1.0));
  color: rgb(var(--mdui-color-primary));
}

/* 进度条特殊颜�?*/
.sb-player-circle.circle-near-full {
  color: #ffd600;
  stroke: #ffd600 !important;
  /* warm yellow */
}

.sb-player-circle.circle-full {
  color: #ff0000;
  stroke: #ff0000 !important;
  /* soft red */
}

.sb-card-bottom-row .sb-card-error {
  margin-top: 0;
}

.sb-card-pending-text {
  font-size: 13px;
  color: rgb(var(--mdui-color-on-surface-variant));
}

/* Minecraft cards only */
.mc-card-item {
  overflow: hidden;
}

.mc-card-item .sb-card-info {
  position: relative;
  z-index: 1;
}

.mc-card-motd {
  font-size: 13px;
  line-height: 1.35;
}

.mc-server-icon {
  width: calc(38px * var(--sb-scale, 1.0));
  height: calc(38px * var(--sb-scale, 1.0));
  min-width: calc(38px * var(--sb-scale, 1.0));
  border-radius: 8px;
  object-fit: cover;
  background: rgba(var(--mdui-color-surface-container-high), 0.72);
  border: 1px solid rgba(var(--mdui-color-outline-variant), 0.5);
}

.mc-server-icon--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--mdui-color-on-surface-variant));
}

.mc-server-icon--placeholder mdui-icon {
  font-size: calc(22px * var(--sb-scale, 1.0));
}

.mc-card-item--background::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--mc-card-background);
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.mc-card-item--background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(var(--mdui-color-surface-container), 0.18) 0%,
    rgba(var(--mdui-color-surface-container), 0.32) 52%,
    rgba(var(--mdui-color-surface-container), 0.5) 100%
  );
  z-index: 0;
  pointer-events: none;
}
