/* ============================================================
   Hydro OJ 科技蓝卡片风格主题 (Tech Card Theme)
   仅作用于列表类页面，排除在线编程模式 (problem_detail 等)
   通过 body > .tech-theme 容器 + data-page 属性精确控制
   ============================================================ */

/* 全局科技风变量 - 只作用于标记了 tech-scope 的页面 */
.tech-scope {
  --tc-primary: #2563eb;
  --tc-primary-dark: #1e40af;
  --tc-primary-light: #3b82f6;
  --tc-cyan: #06b6d4;
  --tc-bg: #eef2f9;
  --tc-card: #ffffff;
  --tc-text: #1e293b;
  --tc-text-soft: #64748b;
  --tc-border: #e2e8f0;
  --tc-shadow: 0 8px 30px rgba(30, 64, 175, 0.08);
  --tc-radius: 16px;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(180deg, #eaf1fc 0%, #f4f7fc 260px, #eef2f9 100%);
  background-attachment: fixed;
}

/* ---------- 科技风 Banner ---------- */
.tech-banner {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
  min-height: 170px;
  background: linear-gradient(115deg, #1e40af 0%, #2563eb 42%, #3b82f6 70%, #06b6d4 100%);
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.28);
  display: flex;
  align-items: center;
}
.tech-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 82% 30%, rgba(255,255,255,0.22) 0, transparent 38%),
    radial-gradient(circle at 18% 90%, rgba(6,182,212,0.35) 0, transparent 42%),
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: auto, auto, 34px 34px, 34px 34px;
  pointer-events: none;
}
.tech-banner::after {
  content: "</>";
  position: absolute;
  right: 42px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 96px;
  font-weight: 800;
  color: rgba(255,255,255,0.14);
  letter-spacing: -8px;
  pointer-events: none;
  font-family: "Consolas", monospace;
}
.tech-scope .tech-banner__inner {
  position: relative;
  z-index: 2;
  padding: 30px 40px;
  color: #fff !important;
}
.tech-scope .tech-banner__tag {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 2px;
  padding: 4px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  margin-bottom: 12px;
  color: #fff !important;
}
.tech-scope .tech-banner__title,
.tech-scope .tech-banner h1 {
  font-size: 34px !important;
  font-weight: 800 !important;
  margin: 0 0 6px !important;
  letter-spacing: 1px;
  color: #fff !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.18) !important;
  border: none !important;
}
.tech-scope .tech-banner__subtitle {
  font-size: 15px;
  opacity: 0.95;
  margin: 0;
  letter-spacing: 3px;
  color: #fff !important;
}

/* ---------- 顶部统计卡片 ---------- */
.tech-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.tech-stat {
  background: var(--tc-card);
  border-radius: var(--tc-radius);
  box-shadow: var(--tc-shadow);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(226,232,240,0.8);
  transition: transform .2s, box-shadow .2s;
}
.tech-stat:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(30,64,175,.14); }
.tech-stat__icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.tech-stat__icon--blue { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.tech-stat__icon--green { background: linear-gradient(135deg,#34d399,#059669); }
.tech-stat__icon--orange { background: linear-gradient(135deg,#fbbf24,#f59e0b); }
.tech-stat__icon--purple { background: linear-gradient(135deg,#a78bfa,#7c3aed); }
.tech-stat__value { font-size: 26px; font-weight: 800; color: var(--tc-text); line-height: 1.1; }
.tech-stat__label { font-size: 13px; color: var(--tc-text-soft); margin-top: 4px; }

/* ---------- 卡片化 section ---------- */
.tech-scope .main .row > .columns > .section,
.tech-scope .section:not(.side) {
  background: var(--tc-card);
  border-radius: var(--tc-radius);
  box-shadow: var(--tc-shadow);
  border: 1px solid rgba(226,232,240,0.8);
  margin-bottom: 18px;
  overflow: hidden;
}
.tech-scope .section__header {
  background: linear-gradient(90deg, #f8faff 0%, #fff 100%);
  border-bottom: 1px solid var(--tc-border);
  padding: 14px 20px;
}
.tech-scope .section__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--tc-primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.tech-scope .section__title::before {
  content: "";
  width: 4px; height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, #3b82f6, #06b6d4);
  display: inline-block;
}
.tech-scope .section.side {
  background: var(--tc-card);
  border-radius: var(--tc-radius);
  box-shadow: var(--tc-shadow);
  border: 1px solid rgba(226,232,240,0.8);
  margin-bottom: 18px;
  overflow: hidden;
}

/* ---------- 顶部导航栏科技化 ---------- */
.tech-scope .nav {
  background: linear-gradient(90deg, #ffffff 0%, #f8faff 100%) !important;
  box-shadow: 0 2px 16px rgba(30,64,175,0.08);
  border-bottom: 2px solid #e8eefb;
}
.tech-scope .nav__item--active,
.tech-scope .nav--active {
  background: linear-gradient(135deg,#3b82f6,#2563eb) !important;
  color: #fff !important;
  border-radius: 10px;
}
.tech-scope .nav__logo { max-height: 34px; }

/* ---------- 按钮 ---------- */
.tech-scope .button.primary,
.tech-scope a.primary.button {
  background: linear-gradient(135deg,#3b82f6,#2563eb) !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(37,99,235,.3);
}
.tech-scope .button.primary:hover { box-shadow: 0 6px 20px rgba(37,99,235,.45); }

/* ---------- 列表项悬浮效果 ---------- */
.tech-scope .section__list__item { transition: background .18s; }
.tech-scope .section__list__item:hover { background: #f5f9ff; }

/* ---------- 首页专属布局 ---------- */
.tech-scope[data-page="homepage"] .homepage-intro .section__body {
  max-height: 520px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.7;
}
.tech-scope[data-page="homepage"] .homepage-intro .typo h2,
.tech-scope[data-page="homepage"] .homepage-intro .section__body h2 {
  color: var(--tc-primary-dark);
  border-bottom: 2px solid #e8eefb;
  padding-bottom: 6px;
  font-size: 18px;
}
.tech-scope[data-page="homepage"] .homepage-intro .section__body a {
  color: var(--tc-primary);
}
.tech-scope[data-page="homepage"] .homepage-compact .section__body,
.tech-scope[data-page="homepage"] .homepage-compact .section__header {
  padding: 12px 16px;
}
.tech-scope[data-page="homepage"] .homepage-compact .section__title { font-size: 15px; }
/* 首页两列等宽展示更均衡 */
.tech-scope[data-page="homepage"] .main > .row > .columns { padding-left: 10px; padding-right: 10px; }

/* ---------- 页脚科技化 ---------- */
.tech-scope .footer {
  background: linear-gradient(180deg, #f8faff 0%, #eef2f9 100%);
  border-top: 1px solid #e2e8f0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .tech-stats { grid-template-columns: repeat(2, 1fr); }
  .tech-banner__title { font-size: 26px; }
}
@media (max-width: 560px) {
  .tech-stats { grid-template-columns: 1fr; }
}
