.grid {
  display: grid;
  gap: 12px;
  justify-content: start;
  width: 100%;
  // 固定行高，确保所有卡片高度一致
  grid-auto-rows: 85px;
  // 强制所有列宽度一致
  align-items: start;
}

.linkCardItem {
  // 确保每个 grid item 宽度完全一致 - 由 grid 列宽控制
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  // 固定高度，确保所有卡片高度一致
  height: 85px !important;
  min-height: 85px !important;
  max-height: 85px !important;
  // 防止被拉伸或压缩
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  // 强制宽度由 grid 控制
  position: relative;
  // 确保内容不会撑开容器
  contain: layout style;
}

.linkCardItem > * {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100%;
  flex: 1 1 auto;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden;
}

.empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-secondary);
  border: 1px dashed var(--color-border-strong);
  border-radius: 12px;
}

.dragHint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg-elevated);
  color: var(--color-text-primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 1000;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

// 响应式网格布局优化

// 超宽屏幕 (≥ 1400px)
@media (min-width: 1400px) {
  .grid {
    gap: 20px;
  }
}

// 大屏幕 (1200px - 1399px)
@media (min-width: 1200px) and (max-width: 1399px) {
  .grid {
    gap: 18px;
  }
}

// 中等屏幕 (992px - 1199px)
@media (min-width: 992px) and (max-width: 1199px) {
  .grid {
    gap: 16px;
  }
}

// 平板屏幕 (768px - 991px)
@media (min-width: 768px) and (max-width: 991px) {
  .grid {
    gap: 14px;
  }
}

// 小屏幕 (576px - 767px)
@media (min-width: 576px) and (max-width: 767px) {
  .grid {
    gap: 12px;
  }
}

// 手机屏幕 (< 576px)
@media (max-width: 575px) {
  .grid {
    gap: 12px;
  }
  
  // 手机屏幕下强制单列布局
  .grid {
    grid-template-columns: 1fr !important;
  }
  
  .linkCardItem {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}
