/* ============================================================
   star-cards.css — 星空浮卡（方案A）
   毛玻璃卡片网格，适配 Q熊之家 星空背景
   ============================================================ */

/* ---------- 卡片容器 ---------- */
.cards-container {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.cards-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.cards-title {
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 600;
  color: #A8C8E8;
  letter-spacing: 1px;
}

.cards-count {
  font-size: 11px;
  color: rgba(168, 200, 232, 0.3);
}

/* ---------- 卡片网格 ---------- */
.cards-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
  flex: 1;
  align-content: start;
  padding-bottom: 20px;
}

/* ---------- 单张卡片 ---------- */
.card-item {
  position: relative;
  background: rgba(5, 11, 24, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(46, 156, 255, 0.12);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 80px;
  display: flex;
  flex-direction: column;
}

.card-item:hover {
  border-color: rgba(46, 156, 255, 0.35);
  background: rgba(10, 22, 48, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(46, 156, 255, 0.08), 0 0 30px rgba(0, 229, 255, 0.04);
}

/* 卡片顶部行：分类标签 + 日期 */
.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.card-category {
  display: inline-block;
  font-size: 10px;
  padding: 1px 8px;
  border-radius: 10px;
  background: rgba(46, 156, 255, 0.1);
  border: 1px solid rgba(46, 156, 255, 0.15);
  color: rgba(100, 180, 255, 0.6);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.card-date {
  font-size: 10px;
  color: rgba(168, 200, 232, 0.15);
  flex-shrink: 0;
}

/* 卡片标题 */
.card-title {
  font-size: clamp(13px, 1.1vw, 15px);
  font-weight: 600;
  color: #C8E0F8;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 卡片描述 */
.card-desc {
  font-size: clamp(11px, 0.9vw, 13px);
  color: rgba(168, 200, 232, 0.4);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* 卡片底部：下载链接/来源 */
.card-footer {
  margin-top: 8px;
  flex-shrink: 0;
}

.card-download {
  display: inline-block;
  font-size: 11px;
  color: rgba(0, 229, 255, 0.5);
  text-decoration: none;
  padding: 2px 10px;
  border: 1px solid rgba(0, 229, 255, 0.1);
  border-radius: 4px;
  transition: all 0.2s;
}

.card-download:hover {
  border-color: rgba(0, 229, 255, 0.3);
  color: rgba(0, 229, 255, 0.7);
  background: rgba(0, 229, 255, 0.05);
}

.card-source {
  font-size: 11px;
  color: rgba(168, 200, 232, 0.2);
}

.card-source a {
  color: rgba(100, 180, 255, 0.5);
  text-decoration: none;
}

.card-source a:hover {
  color: rgba(100, 180, 255, 0.8);
}

/* ========== 差异化布局 ========== */

/* --- 开源技能：大卡片，一行2-3张 --- */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 780px;
  margin: 0 auto;
}

.learn-grid .card-item {
  min-height: 110px;
  padding: 18px 20px;
  border-radius: 10px;
}

.learn-grid .card-title {
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 600;
}

.learn-grid .card-desc {
  -webkit-line-clamp: 3;
  margin-top: 4px;
}

/* --- 工具坊：小卡片，一行4-5张 --- */
.tools-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
}

.tools-grid .card-item {
  min-height: 80px;
  padding: 12px 14px;
  border-radius: 8px;
}

.tools-grid .card-title {
  font-size: clamp(12px, 1vw, 14px);
}

.tools-grid .card-desc {
  font-size: clamp(10px, 0.8vw, 12px);
  -webkit-line-clamp: 1;
}

.tools-grid .card-download {
  font-size: 10px;
  padding: 1px 8px;
}

/* --- 科技趣事：时间线+卡片混合 --- */
.news-timeline-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  align-content: start;
  padding-bottom: 20px;
}

/* 日期分组 */
.tl-group {
  position: relative;
  margin-bottom: 4px;
}

/* 日期标题（时间线节点） */
.tl-date {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 4px 22px;
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: 600;
  color: rgba(100, 180, 255, 0.35);
  letter-spacing: 1px;
}

/* 时间线圆点 */
.tl-date::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(46, 156, 255, 0.25);
  border: 1px solid rgba(46, 156, 255, 0.12);
  transform: translateY(-50%);
  z-index: 2;
}

/* 该日期下的新闻卡片列表 */
.tl-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 22px;
  position: relative;
}

/* 时间线竖线 — 关联该组所有卡片 */
.tl-cards::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg,
    rgba(46, 156, 255, 0.15),
    rgba(46, 156, 255, 0.04) 80%,
    transparent
  );
}

/* 时间线卡片 */
.tl-card {
  position: relative;
  background: rgba(5, 11, 24, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(46, 156, 255, 0.1);
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-left: 6px;
}

/* 连接线：从时间线到卡片 */
.tl-card::before {
  content: '';
  position: absolute;
  left: -17px;
  top: 14px;
  width: 12px;
  height: 1px;
  background: rgba(46, 156, 255, 0.08);
}

.tl-card:hover {
  border-color: rgba(46, 156, 255, 0.3);
  background: rgba(10, 22, 48, 0.55);
  transform: translateX(2px);
  box-shadow: 0 2px 12px rgba(46, 156, 255, 0.06);
}

.tl-card .card-title {
  font-size: clamp(12px, 1vw, 14px);
  margin-bottom: 2px;
}

.tl-card .card-desc {
  font-size: clamp(10px, 0.8vw, 12px);
  -webkit-line-clamp: 2;
}

/* ========== 时空门禁 ========== */
.cards-container {
  position: relative;
  min-height: 320px;
}

.cards-header {
  position: relative;
  z-index: 1;
}

/* 内容初始完全隐藏 — 只有开门后才显 */
.cards-grid, .cmd-bar, .cards-pagination, .news-timeline-grid {
  display: none;
}

/* ========== 流星滑入 ========== */
/* 舞台亮起：网格出现但每张卡片由 animation 控制入场 */
.cards-grid.meteor-active {
  display: grid;
}
.news-timeline-grid.meteor-active {
  display: flex;
}
.cards-pagination.has-pages {
  display: flex !important;
}

.meteor-active ~ .cmd-bar,
.meteor-active ~ .cards-pagination {
  display: flex;
}

/* 每张卡单独触发流星动画 */
.card-item.anim-meteor {
  animation: cardMeteor 5s cubic-bezier(0.22, 0.9, 0.36, 1) both;
}
.tl-card.anim-meteor {
  animation: cardMeteor 5s cubic-bezier(0.22, 0.9, 0.36, 1) both;
}

@keyframes cardMeteor {
  0% {
    opacity: 0;
    transform: translate(-180px, 160px) scale(0.015);
  }
  /* 星点闪现 — 极小光点 + 强烈青光拖尾 */
  4% {
    opacity: 1;
    transform: translate(-180px, 160px) scale(0.015);
    box-shadow:
      0 0 30px 10px rgba(0, 229, 255, 0.35),
      0 0 60px 20px rgba(46, 156, 255, 0.15);
    filter: brightness(3);
  }
  /* 拖尾阶段 — 光点斜向滑过，拉出光尾 */
  15% {
    transform: translate(-120px, 100px) scale(0.04);
    box-shadow:
      0 0 40px 12px rgba(0, 229, 255, 0.45),
      0 0 100px 25px rgba(46, 156, 255, 0.2);
    filter: brightness(2.5);
  }
  /* 逐渐展开 — 光尾变宽，卡片轮廓显现 */
  35% {
    transform: translate(-50px, 30px) scale(0.2);
    box-shadow:
      0 0 50px 15px rgba(0, 229, 255, 0.3),
      0 0 80px 20px rgba(46, 156, 255, 0.12);
    filter: brightness(1.6) blur(1.5px);
  }
  /* 接近落位 — 光尾收缩，卡片清晰可见 */
  55% {
    transform: translate(3px, -2px) scale(1.08);
    box-shadow:
      0 0 25px 8px rgba(0, 229, 255, 0.12);
    filter: brightness(1.1) blur(0);
  }
  /* 弹跳回弹 */
  72% {
    transform: translate(-1px, 1px) scale(0.98);
    box-shadow: 0 0 8px 2px rgba(0, 229, 255, 0.06);
    filter: brightness(1);
  }
  /* 稳稳落位 */
  88% {
    transform: translate(0, 0) scale(1.01);
    box-shadow: none;
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
    box-shadow: none;
    filter: brightness(1);
  }
}

/* 门禁浮在星空上 */
.door-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  z-index: 5;
  perspective: 1000px;
  transform-origin: left center;
}

.door-overlay.door-open {
  opacity: 0;
  pointer-events: none;
  animation: doorSwing 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes grantPulse {
  0%, 100% { opacity: 0.6; text-shadow: 0 0 6px rgba(0,229,255,0.2); }
  50% { opacity: 1; text-shadow: 0 0 15px rgba(0,229,255,0.4); }
}

@keyframes doorSwing {
  0% {
    opacity: 1;
    transform: perspective(900px) rotateY(0deg);
  }
  40% {
    opacity: 0.3;
    box-shadow: 0 0 60px rgba(46,156,255,0.15), 0 0 120px rgba(0,229,255,0.06);
  }
  100% {
    opacity: 0;
    transform: perspective(900px) rotateY(-90deg);
  }
}

.door-overlay.door-shake {
  animation: doorShake 0.3s ease;
}

@keyframes doorShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* 门板 — 浮在星空的实体面板 */
.door-panel {
  position: relative;
  text-align: center;
  max-width: 400px;
  width: 100%;
  border: 1px solid rgba(46, 156, 255, 0.15);
  padding: 40px 32px;
  border-radius: 6px;
  background: rgba(5, 11, 24, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 0 2px rgba(46, 156, 255, 0.1),
    0 0 30px rgba(46, 156, 255, 0.04),
    inset 0 0 30px rgba(46, 156, 255, 0.02);
}

/* 门框装饰线 */
.door-panel::before,
.door-panel::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(46,156,255,0.15), transparent);
}
.door-panel::before { top: 10px; }
.door-panel::after { bottom: 10px; }

.door-lock {
  font-size: 38px;
  margin-bottom: 14px;
  display: block;
  filter: saturate(0.3) brightness(0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.door-lock:hover {
  filter: saturate(0.6) brightness(1);
  transform: scale(1.08);
}

.door-lock.cracking {
  filter: saturate(0.8) brightness(1.2);
  animation: lockPulse 0.4s ease infinite alternate;
}

.door-lock.cracked {
  filter: saturate(1) brightness(1.5);
  transform: scale(1.15);
  animation: none;
}

@keyframes lockPulse {
  from { transform: scale(1); }
  to { transform: scale(1.12); text-shadow: 0 0 15px rgba(0,229,255,0.4); }
}

/* 破解动画区域 */
.crack-area {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}

.crack-area.active {
  max-height: 100px;
  opacity: 1;
}

.crack-digits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px 0 6px;
}

.crack-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 40px;
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 22px;
  font-weight: 700;
  color: rgba(0, 229, 255, 0.6);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 229, 255, 0.1);
  border-radius: 3px;
  transition: all 0.08s ease;
}

.crack-slot.scrolling {
  animation: slotScroll 0.08s linear infinite;
}

.crack-slot.settled {
  border-color: rgba(0, 229, 255, 0.35);
  color: rgba(0, 229, 255, 0.85);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.1);
}

.crack-slot.typing-dest {
  animation: slotFlash 0.15s ease;
}

@keyframes slotFlash {
  0% { background: rgba(0, 229, 255, 0.3); }
  100% { background: rgba(0, 0, 0, 0.4); }
}

.crack-status {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 10px;
  color: rgba(46, 156, 255, 0.08);
  min-height: 14px;
  text-align: center;
  letter-spacing: 1px;
}

.door-title {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: clamp(13px, 1.1vw, 16px);
  color: rgba(46, 156, 255, 0.2);
  letter-spacing: 4px;
  font-weight: 300;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.door-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(46, 156, 255, 0.06);
  padding: 8px 14px;
  border-radius: 2px;
}

.door-prompt-prefix {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: clamp(12px, 1vw, 14px);
  color: rgba(0, 229, 255, 0.2);
  white-space: nowrap;
  user-select: none;
}

.door-input {
  background: none;
  border: none;
  outline: none;
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: clamp(12px, 1vw, 14px);
  color: rgba(168, 200, 232, 0.5);
  caret-color: rgba(0, 229, 255, 0.25);
  padding: 0 0 0 6px;
  margin: 0;
  width: 110px;
}

.door-cursor {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: clamp(12px, 1vw, 14px);
  color: rgba(168, 200, 232, 0.06);
  animation: doorCursorBlink 1s step-end infinite;
  user-select: none;
  margin-left: -1px;
}

.door-input:focus + .door-cursor,
.door-input:not(:placeholder-shown) + .door-cursor {
  display: none;
}

@keyframes doorCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.door-error {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: clamp(10px, 0.8vw, 11px);
  color: rgba(255, 80, 60, 0.3);
  min-height: 18px;
  transition: opacity 0.3s ease;
}

.door-hint {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 10px;
  color: rgba(46, 156, 255, 0.08);
  margin-top: 4px;
}

/* ========== 命令行过滤 ========== */
.cmd-bar {
  position: relative;
  margin: 0 0 6px 0;
  padding: 3px 12px;
  min-height: 24px;
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(46, 156, 255, 0.02);
  border: 1px solid rgba(46, 156, 255, 0.04);
  border-radius: 3px;
  cursor: text;
  transition: all 0.3s ease;
}

.cmd-bar:hover {
  border-color: rgba(46, 156, 255, 0.08);
}

.cmd-bar.cmd-active {
  border-color: rgba(46, 156, 255, 0.12);
  min-height: 30px;
}

.cmd-prefix {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 12px;
  color: rgba(0, 229, 255, 0.25);
  user-select: none;
  line-height: 1;
}

.cmd-bar.cmd-active .cmd-prefix {
  color: rgba(0, 229, 255, 0.4);
}

.cmd-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 12px;
  color: rgba(168, 200, 232, 0.5);
  caret-color: rgba(0, 229, 255, 0.4);
  padding: 0;
  margin: 0;
  display: none;
  width: 100%;
}

.cmd-bar.cmd-active .cmd-input {
  display: block;
}

.cmd-bar.cmd-active .cmd-placeholder {
  display: none;
}

.cmd-placeholder {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 12px;
  color: rgba(168, 200, 232, 0.08);
  animation: cmdBlink 1.2s step-end infinite;
  user-select: none;
}

@keyframes cmdBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* 过滤高亮：被过滤掉的卡片 */
.card-item.filtered-out,
.tl-card.filtered-out {
  display: none !important;
}

.cmd-bar.cmd-filtering {
  border-color: rgba(0, 229, 255, 0.15);
}

/* ---------- 分页控件 ---------- */
.cards-pagination {
  flex-shrink: 0;
  padding: 8px 0 12px;
  display: none;
  justify-content: center;
}

.cards-pagination.has-pages .pg-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(46, 156, 255, 0.06);
  border: 1px solid rgba(46, 156, 255, 0.08);
  color: rgba(168, 200, 232, 0.35);
  user-select: none;
  font-family: 'Courier New', monospace;
  line-height: 1;
}

.pg-btn:hover:not(.pg-disabled) {
  background: rgba(46, 156, 255, 0.12);
  border-color: rgba(46, 156, 255, 0.2);
  color: rgba(168, 200, 232, 0.6);
}

.pg-btn.pg-disabled {
  opacity: 0.15;
  cursor: default;
  pointer-events: none;
}

.pg-indicator {
  font-size: 11px;
  font-family: 'Courier New', monospace;
  color: rgba(168, 200, 232, 0.2);
  letter-spacing: 1px;
  user-select: none;
}

/* ---------- 空状态 ---------- */
.cards-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: rgba(168, 200, 232, 0.2);
  font-size: 13px;
}

/* ---------- 加载状态 ---------- */
.cards-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: rgba(168, 200, 232, 0.15);
  font-size: 12px;
}

/* ---------- 详情面板 ---------- */
.detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(3, 7, 18, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.detail-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.detail-panel {
  position: relative;
  width: min(600px, 90vw);
  max-height: 80vh;
  background: rgba(5, 11, 24, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(46, 156, 255, 0.2);
  border-radius: 10px;
  padding: 24px 28px;
  overflow-y: auto;
  transform: translateY(10px);
  transition: transform 0.3s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(46,156,255,0.15) transparent;
}

.detail-panel::-webkit-scrollbar { width: 4px; }
.detail-panel::-webkit-scrollbar-track { background: transparent; }
.detail-panel::-webkit-scrollbar-thumb {
  background: rgba(46,156,255,0.12);
  border-radius: 2px;
}

.detail-overlay.visible .detail-panel {
  transform: translateY(0);
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(168, 200, 232, 0.3);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
}

.detail-close:hover {
  color: rgba(168, 200, 232, 0.6);
}

.detail-category {
  display: inline-block;
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 10px;
  background: rgba(46, 156, 255, 0.08);
  border: 1px solid rgba(46, 156, 255, 0.12);
  color: rgba(100, 180, 255, 0.5);
  margin-bottom: 8px;
}

.detail-title {
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 600;
  color: #C8E0F8;
  margin-bottom: 8px;
  line-height: 1.4;
}

.detail-date {
  font-size: 11px;
  color: rgba(168, 200, 232, 0.15);
  margin-bottom: 12px;
}

.detail-body {
  color: rgba(168, 200, 232, 0.6);
  font-size: clamp(13px, 1vw, 14px);
  line-height: 1.8;
}

.detail-body .section {
  margin-bottom: 12px;
}

.detail-body .section-label {
  font-size: 12px;
  color: rgba(100, 180, 255, 0.4);
  margin-bottom: 4px;
  font-weight: 500;
}

.detail-body .section-value {
  color: rgba(168, 200, 232, 0.6);
}

.detail-body a {
  color: rgba(100, 180, 255, 0.6);
  text-decoration: none;
  border-bottom: 1px dashed rgba(100, 180, 255, 0.15);
}

.detail-body a:hover {
  color: rgba(100, 180, 255, 0.85);
  border-bottom-color: rgba(100, 180, 255, 0.3);
}

/* ---------- 响应式 ---------- */
@media (max-width: 800px) {
  .cards-container {
    padding: 12px 14px;
  }
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
  }
  .card-item {
    padding: 12px 14px;
    min-height: 70px;
  }
  .detail-panel {
    padding: 20px;
  }
}

@media (max-width: 500px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}
