/* ==========================================================================
   伯温智算AI · 数据大屏模板库
   ========================================================================== */

:root {
  --bg: #070a0f;
  --panel: #0d131a;
  --panel-2: #111922;
  --line: rgba(255, 255, 255, 0.075);
  --line-warm: rgba(255, 107, 61, 0.25);
  --ink: #f2f5f7;
  --muted: rgba(225, 232, 236, 0.44);
  --muted-2: rgba(225, 232, 236, 0.25);
  --orange: #ff6b3d;
  --cyan: #5bd9e8;
  --green: #6ee7b7;
  --mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Code", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 4% 0%, rgba(255, 107, 61, 0.08), transparent 30rem),
    radial-gradient(circle at 96% 10%, rgba(91, 217, 232, 0.05), transparent 34rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--orange); color: #fff; }

.tpl-app {
  position: relative;
  isolation: isolate;
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 25px;
}

.tpl-app::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 20%, #000 10%, transparent 80%);
  pointer-events: none;
}

/* Header */
.tpl-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.tpl-brand { display: flex; align-items: center; gap: 9px; }
.tpl-brand__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, #ff7a4a, #e94f1e);
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 107, 61, 0.18);
}
.tpl-brand__mark svg { width: 20px; height: 20px; }
.tpl-brand__name { color: #fff; font-size: 19px; font-weight: 790; letter-spacing: -0.7px; }
.tpl-brand__name b { color: var(--orange); font-weight: inherit; }
.tpl-brand__tagline {
  padding: 3px 6px;
  border: 1px solid rgba(255, 107, 61, 0.28);
  border-radius: 4px;
  background: rgba(255, 107, 61, 0.08);
  color: #ffae8e;
  font-size: 8px;
  letter-spacing: 0.03em;
}

.tpl-head__right { display: flex; align-items: center; gap: 8px; }
.tpl-link {
  height: 31px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 8.5px;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}
.tpl-link:hover { border-color: rgba(255,255,255,.2); color: #fff; background: rgba(255,255,255,.035); }
.tpl-link--primary { border-color: rgba(255,107,61,.25); background: rgba(255,107,61,.08); color: #ff9f7d; }
.tpl-link--primary:hover { border-color: rgba(255,107,61,.5); background: rgba(255,107,61,.15); }

/* Hero */
.tpl-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 50px 0 31px;
}

.tpl-eyebrow {
  color: rgba(91, 217, 232, 0.55);
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.tpl-hero h1 {
  margin-top: 9px;
  color: #fff;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.02;
}
.tpl-hero p {
  max-width: 680px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.tpl-hero__meta {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 2px 8px;
  flex: none;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255,255,255,.025);
}
.tpl-hero__meta span { color: var(--orange); font-family: var(--mono); font-size: 24px; font-weight: 500; letter-spacing: -0.06em; }
.tpl-hero__meta small { color: var(--muted-2); font-size: 7px; }
.tpl-hero__meta i { grid-column: 1 / -1; height: 1px; margin: 7px 0; background: var(--line); }

/* Featured */
.tpl-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, .55fr);
  gap: 11px;
  margin-bottom: 34px;
}

.tpl-card {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}
.tpl-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.17); background: var(--panel-2); }

.tpl-card--featured {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  border-color: rgba(255, 107, 61, 0.22);
  background:
    radial-gradient(circle at 100% 0%, rgba(255,107,61,.11), transparent 20rem),
    var(--panel);
}
.tpl-card--featured:hover { border-color: rgba(255,107,61,.42); }

.tpl-thumb { position: relative; overflow: hidden; background: #0a0e13; }
.tpl-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 350ms ease, opacity 180ms ease; opacity: .84; }
.tpl-card:hover .tpl-thumb img { transform: scale(1.025); opacity: 1; }
.tpl-card--featured .tpl-thumb { min-height: 250px; }
.tpl-card--featured .tpl-thumb img { object-position: top center; }

.tpl-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 7px;
  border: 1px solid rgba(110,231,183,.24);
  border-radius: 3px;
  background: rgba(15,35,28,.75);
  color: var(--green);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: .05em;
  backdrop-filter: blur(8px);
}

.tpl-card__body { padding: 16px 17px 15px; display: flex; flex-direction: column; }
.tpl-card--featured .tpl-card__body { justify-content: center; padding: 24px 25px; }

.tpl-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tpl-num { color: var(--orange); font-family: var(--mono); font-size: 7px; letter-spacing: .12em; }
.tpl-kind { color: var(--muted-2); font-family: var(--mono); font-size: 6.5px; letter-spacing: .08em; }
.tpl-tag { color: rgba(255,255,255,.25); font-size: 6.5px; white-space: nowrap; }

.tpl-card h2, .tpl-card h3 { color: #fff; font-weight: 700; letter-spacing: -.02em; }
.tpl-card h2 { margin-top: 14px; font-size: 24px; }
.tpl-card h3 { margin-top: 8px; font-size: 15px; }
.tpl-card p { margin-top: 7px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.tpl-card--featured p { font-size: 10px; }

.tpl-open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 5px;
  color: #ffad8c;
  font-size: 8px;
  font-weight: 550;
}
.tpl-open em { font-style: normal; transition: transform 150ms ease; }
.tpl-card:hover .tpl-open em { transform: translateX(3px); }

.tpl-feature-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.022);
}
.tpl-note-label {
  display: inline-block;
  width: fit-content;
  padding: 3px 6px;
  border: 1px solid rgba(91,217,232,.17);
  border-radius: 3px;
  background: rgba(91,217,232,.055);
  color: rgba(91,217,232,.65);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: .07em;
}
.tpl-feature-note b { margin-top: 12px; color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.55; font-weight: 600; }
.tpl-feature-note p { margin-top: 9px; color: var(--muted-2); font-size: 8.5px; line-height: 1.7; }

/* Gallery */
.tpl-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.tpl-section__head span { color: rgba(91,217,232,.52); font-family: var(--mono); font-size: 6.5px; letter-spacing: .14em; }
.tpl-section__head h2 { margin-top: 3px; color: #fff; font-size: 20px; font-weight: 700; letter-spacing: -.5px; }
.tpl-section__head p { max-width: 460px; color: var(--muted-2); font-size: 8px; line-height: 1.55; text-align: right; }

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.tpl-grid .tpl-card { display: flex; flex-direction: column; }
.tpl-grid .tpl-thumb { aspect-ratio: 16 / 9; }
.tpl-grid .tpl-card__body { flex: 1; }

.tpl-index {
  position: absolute;
  right: 9px;
  bottom: 8px;
  color: rgba(255,255,255,.19);
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.08em;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}

.tpl-card--soon { opacity: .38; pointer-events: none; }
.tpl-card--soon .tpl-thumb {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 1px, transparent 1px 9px),
    #0a0e13;
}
.tpl-soon { color: rgba(255,255,255,.16); font-family: var(--mono); font-size: 46px; font-weight: 700; letter-spacing: -.1em; }

/* Help */
.tpl-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 26px;
  padding: 22px 23px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,107,61,.09), transparent 20rem),
    rgba(255,255,255,.022);
}
.tpl-help h2 { margin-top: 10px; color: #fff; font-size: 15px; font-weight: 650; }
.tpl-help p { margin-top: 6px; max-width: 640px; color: var(--muted-2); font-size: 8.5px; line-height: 1.65; }
.tpl-help__links { display: flex; gap: 7px; flex: none; }
.tpl-button {
  height: 33px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: 5px;
  background: var(--orange);
  color: #fff;
  font-size: 8.5px;
  font-weight: 550;
}
.tpl-button:hover { background: #e95a2f; }
.tpl-button em { margin-left: 5px; font-style: normal; }
.tpl-button--ghost { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.tpl-button--ghost:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); color: #fff; }

.tpl-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: rgba(255,255,255,.19);
  font-family: var(--mono);
  font-size: 6.5px;
  line-height: 1.6;
}

@media (max-width: 1080px) {
  .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpl-featured { grid-template-columns: minmax(0, 1.35fr) minmax(230px, .65fr); }
  .tpl-card--featured { grid-template-columns: 1fr; }
  .tpl-card--featured .tpl-thumb { min-height: 200px; }
}

@media (max-width: 760px) {
  .tpl-app { width: calc(100% - 28px); }
  .tpl-head { min-height: 64px; }
  .tpl-brand__tagline { display: none; }
  .tpl-head__right .tpl-link:not(.tpl-link--primary) { display: none; }
  .tpl-hero { align-items: flex-start; flex-direction: column; gap: 20px; padding: 33px 0 23px; }
  .tpl-hero h1 { font-size: 35px; letter-spacing: -1.2px; }
  .tpl-hero p { font-size: 10px; }
  .tpl-hero__meta { grid-template-columns: auto auto auto auto; align-items: center; }
  .tpl-hero__meta i { display: none; }
  .tpl-featured { grid-template-columns: 1fr; }
  .tpl-feature-note { padding: 16px; }
  .tpl-grid { grid-template-columns: 1fr; }
  .tpl-section__head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .tpl-section__head p { text-align: left; }
  .tpl-help { align-items: flex-start; flex-direction: column; padding: 17px; }
  .tpl-help__links { width: 100%; }
  .tpl-help__links .tpl-button { flex: 1; justify-content: center; }
  .tpl-foot { align-items: flex-start; flex-direction: column; gap: 4px; }
}


/* Custom HUD template card */
.tpl-grid--custom { grid-template-columns: minmax(0, 1fr); }
.tpl-grid--custom .tpl-card--hud {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  border-color: rgba(67, 230, 255, 0.22);
  background:
    radial-gradient(circle at 100% 0%, rgba(67, 230, 255, 0.09), transparent 24rem),
    var(--panel);
}
.tpl-grid--custom .tpl-card--hud:hover { border-color: rgba(67, 230, 255, 0.45); }
.tpl-grid--custom .tpl-thumb { aspect-ratio: auto; min-height: 330px; }
.tpl-grid--custom .tpl-thumb img { object-position: center; }
.tpl-section--custom { margin-top: 26px; }

@media (max-width: 760px) {
  .tpl-grid--custom .tpl-card--hud { display: block; }
  .tpl-grid--custom .tpl-thumb { min-height: 0; aspect-ratio: 16 / 9; }
}


/* Two-screen gallery */
.tpl-featured--two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 20px; }
.tpl-featured--two .tpl-card--hud { border-color: rgba(83, 183, 255, .2); background: radial-gradient(circle at 100% 0%, rgba(57, 143, 255, .12), transparent 20rem), var(--panel); }
.tpl-featured--two .tpl-card--hud .tpl-thumb { min-height: 250px; }
.tpl-featured--two .tpl-card--hud .tpl-thumb img { object-position: top center; }
@media (max-width: 1080px) {
  .tpl-featured--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpl-featured--two .tpl-card--featured { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .tpl-featured--two { grid-template-columns: 1fr; }
}
