/* ════════════════════════════════════════════════════════════════
   全局图标和板块优化 - AdsBom 视觉增强
   ════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────── */
/* 1. 图标系统增强 */
/* ─────────────────────────────────────────────────────────────── */

/* 通用图标容器 */
.nav-icon,
.panel-icon,
.category-glyph,
.app-icon-badge,
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: transform 200ms cubic-bezier(0.2, 0.75, 0.2, 1),
              background 200ms ease,
              color 200ms ease,
              box-shadow 200ms ease;
}

/* SVG 图标基础样式 */
.nav-icon svg,
.panel-icon svg,
.category-glyph svg,
.app-icon-badge svg,
.section-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 导航图标 */
.nav-icon {
  width: 20px;
  height: 20px;
  color: inherit;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
}

/* 顶部导航链接图标优化 */
.topbar-play .header-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: all 200ms ease;
}

.topbar-play .header-links a:hover {
  background: rgba(13, 101, 45, 0.08);
  transform: translateY(-1px);
}

.topbar-play .header-links a .nav-icon {
  opacity: 0.72;
}

.topbar-play .header-links a:hover .nav-icon {
  opacity: 1;
  transform: scale(1.08);
}

/* 面板图标 */
.panel-icon {
  width: 24px;
  height: 24px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(13, 101, 45, 0.08);
  color: #0d652d;
}

/* 分类图标 */
.category-glyph {
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(13, 101, 45, 0.1), rgba(13, 101, 45, 0.06));
  color: #0d652d;
  border: 1px solid rgba(13, 101, 45, 0.12);
}

/*.category-glyph:hover {
  background: linear-gradient(135deg, rgba(13, 101, 45, 0.14), rgba(13, 101, 45, 0.08));
  transform: scale(1.06);
}*/

/* 应用图标徽章 */
.app-icon-badge {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0d652d, #0f4f2c);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 6px 12px rgba(15, 79, 44, 0.18);
  font-size: 11px;
  font-weight: 900;
  z-index: 2;
}

.app-icon-badge svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}

/* 段落标题图标 */
.section-head h2 .section-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(13, 101, 45, 0.12), rgba(13, 101, 45, 0.08));
  border: 1px solid rgba(13, 101, 45, 0.14);
  color: #0d652d;
  transition: all 200ms ease;
  flex-shrink: 0;
}

.section-head:hover .section-icon {
  background: linear-gradient(135deg, rgba(13, 101, 45, 0.16), rgba(13, 101, 45, 0.1));
  transform: scale(1.04) rotate(2deg);
}

/* ─────────────────────────────────────────────────────────────── */
/* 2. 应用图标优化 */
/* ─────────────────────────────────────────────────────────────── */

.app-icon {
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, 
    rgba(13, 101, 45, 0.06),
    rgba(13, 101, 45, 0.02));
  border: 1px solid rgba(13, 101, 45, 0.1);
  overflow: hidden;
  font-weight: 900;
  font-size: 16px;
  color: #0d652d;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6),
              0 4px 8px rgba(35, 28, 18, 0.04);
  transition: all 200ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.app-icon:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.6),
              0 12px 20px rgba(35, 28, 18, 0.08);
}

.app-icon.sm {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 12px;
}

.app-icon.md {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.app-icon.lg {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  font-size: 24px;
}

/* ─────────────────────────────────────────────────────────────── */
/* 3. 板块卡片统一设计 */
/* ─────────────────────────────────────────────────────────────── */

/* 基础卡片 */
.card,
.board,
.strip-card,
.recent-card,
.category-card,
.featured-card,
.play-highlight,
.platform-card,
.capability-card,
.product-card,
.shelf-item,
.carousel-thumb {
  background: #fff;
  border: 1px solid rgba(13, 101, 45, 0.1);
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(35, 28, 18, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 200ms cubic-bezier(0.2, 0.75, 0.2, 1);
  overflow: hidden;
}

.card:hover,
.board:hover,
.strip-card:hover,
.recent-card:hover,
.category-card:hover,
.featured-card:hover,
.play-highlight:hover,
.platform-card:hover,
.capability-card:hover,
.product-card:hover,
.shelf-item:hover,
.carousel-thumb:hover {
  border-color: rgba(13, 101, 45, 0.16);
  box-shadow: 0 12px 24px rgba(35, 28, 18, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

/* 板块标题 */
.board-head,
.strip-head,
.category-head,
.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(13, 101, 45, 0.08);
}

.board-head strong,
.strip-head strong,
.category-head strong,
.recent-head strong {
  font-size: 18px;
  font-weight: 700;
  color: #1f2a23;
  letter-spacing: -0.02em;
}

/* 板块行 */
.board-row,
.product-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(13, 101, 45, 0.06);
  transition: all 180ms ease;
}

.board-row:hover,
.product-row:hover {
  background: rgba(13, 101, 45, 0.02);
  border-radius: 10px;
  padding: 14px 12px;
  margin: 0 -12px;
}

.board-row:last-child,
.product-row:last-child {
  border-bottom: 0;
}

/* 板块元数据 */
.board-meta,
.product-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.board-meta strong,
.product-meta strong {
  font-size: 14px;
  font-weight: 700;
  color: #1f2a23;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board-meta p,
.product-meta p {
  font-size: 12px;
  color: #5d6b61;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 板块数值 */
.board-value,
.product-value {
  text-align: right;
  display: grid;
  justify-items: end;
  gap: 4px;
}

.board-value strong,
.product-value strong {
  font-size: 22px;
  font-weight: 800;
  color: #0d652d;
}

.board-value span,
.product-value span {
  font-size: 11px;
  color: #5d6b61;
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────── */
/* 4. 特殊板块优化 */
/* ─────────────────────────────────────────────────────────────── */

/* 英雄区 */
.hero,
.hero-card {
  background: linear-gradient(135deg, #fff 0%, rgba(248, 251, 248, 0.5) 100%);
  border: 1px solid rgba(13, 101, 45, 0.12);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(35, 28, 18, 0.06),
              inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 32px;
}

/* 摘要卡片 */
.hero-summary-card {
  background: linear-gradient(135deg, rgba(228, 242, 232, 0.5), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(13, 101, 45, 0.12);
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(35, 28, 18, 0.04),
              inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 18px;
  transition: all 200ms ease;
}

.hero-summary-card:hover {
  background: linear-gradient(135deg, rgba(228, 242, 232, 0.7), rgba(255, 255, 255, 0.95));
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(35, 28, 18, 0.06),
              inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* 分类统计 */
.category-stat,
.stat-badge {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(228, 242, 232, 0.6);
  border: 1px solid rgba(13, 101, 45, 0.12);
  transition: all 150ms ease;
}

.category-stat:hover,
.stat-badge:hover {
  background: rgba(228, 242, 232, 0.8);
  border-color: rgba(13, 101, 45, 0.2);
}

.category-stat span,
.stat-badge span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5d6b61;
  margin-bottom: 4px;
}

.category-stat b,
.stat-badge b {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #0d652d;
}

/* 迷你标签 */
.mini-tags span,
.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(228, 242, 232, 0.7);
  border: 1px solid rgba(13, 101, 45, 0.14);
  color: #0d652d;
  font-size: 11px;
  font-weight: 800;
  transition: all 150ms ease;
}

.mini-tags span:hover,
.chip-tag:hover {
  background: rgba(228, 242, 232, 0.9);
  border-color: rgba(13, 101, 45, 0.2);
  transform: scale(1.05);
}

/* ─────────────────────────────────────────────────────────────── */
/* 5. 响应式优化 */
/* ─────────────────────────────────────────────────────────────── */

@media (max-width: 1120px) {
  .section-head h2 .section-icon {
    width: 36px;
    height: 36px;
  }

  .hero,
  .hero-card {
    padding: 24px;
  }

  .card,
  .board,
  .strip-card,
  .recent-card,
  .category-card {
    border-radius: 16px;
  }
}

@media (max-width: 780px) {
  .app-icon.md {
    width: 48px;
    height: 48px;
  }

  .app-icon.lg {
    width: 72px;
    height: 72px;
  }

  .section-head h2 .section-icon {
    width: 32px;
    height: 32px;
  }

  .hero,
  .hero-card {
    padding: 20px;
  }

  .card,
  .board,
  .strip-card,
  .recent-card,
  .category-card {
    border-radius: 14px;
  }

  .board-head,
  .strip-head {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }
}

@media (max-width: 620px) {
  .app-icon.sm {
    width: 36px;
    height: 36px;
  }

  .app-icon.md {
    width: 44px;
    height: 44px;
  }

  .topbar-play .header-links a {
    padding: 8px 10px;
  }

  .topbar-play .header-links a .nav-icon {
    width: 16px;
    height: 16px;
  }

  .hero,
  .hero-card {
    padding: 16px;
  }

  .card,
  .board,
  .strip-card,
  .recent-card,
  .category-card {
    border-radius: 12px;
  }
}

/* ─────────────────────────────────────────────────────────────── */
/* 6. 深色主题支持 */
/* ─────────────────────────────────────────────────────────────── */

body.front-polish.theme-hello .section-icon,
body.front-polish.theme-hello .panel-icon,
body.front-polish.theme-hello .category-glyph {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.18);
  color: #78a9ff;
}

body.front-polish.theme-hello .app-icon-badge {
  background: linear-gradient(135deg, #3b82f6, #0f4c81);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.18);
}

body.front-polish.theme-hello .app-icon {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.08),
    rgba(59, 130, 246, 0.02));
  border-color: rgba(59, 130, 246, 0.12);
  color: #78a9ff;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1),
              0 4px 8px rgba(0, 0, 0, 0.1);
}

body.front-polish.theme-hello .card,
body.front-polish.theme-hello .board,
body.front-polish.theme-hello .strip-card,
body.front-polish.theme-hello .recent-card,
body.front-polish.theme-hello .category-card {
  background: rgba(10, 24, 50, 0.6);
  border-color: rgba(59, 130, 246, 0.14);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.front-polish.theme-hello .mini-tags span,
body.front-polish.theme-hello .chip-tag {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.22);
  color: #78a9ff;
}
