/* DataPro TV: DataPro navy and blue, Montserrat, dark "screening room" ground */
:root {
  --bg: #0b1220;
  --bg-2: #0f182b;
  --surface: #141f36;
  --surface-2: #1a2742;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eef2f8;
  --muted: #9aa8c1;
  --dim: #6f7f9c;
  --navy: #2b3b57;
  --blue: #2e7bdf;
  --blue-2: #58a0f5;
  --sky: #86b6f6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.65);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 16px/1.6 var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 12% -8%, rgba(46, 123, 223, 0.22), transparent 60%),
    radial-gradient(900px 520px at 100% 8%, rgba(43, 59, 87, 0.55), transparent 65%),
    var(--bg);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; flex: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 600; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 18, 32, 0.72);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.top.scrolled { border-bottom-color: var(--line); background: rgba(11, 18, 32, 0.88); }
.top-row { display: flex; align-items: center; gap: 28px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { height: 28px; width: auto; }
.tv {
  font: 700 12px/1 var(--font); letter-spacing: 0.1em;
  padding: 6px 8px 5px; border-radius: 7px; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 4px 14px -4px rgba(46, 123, 223, 0.7);
}
.nav { display: flex; gap: 4px; }
.nav a {
  position: relative; padding: 8px 12px; border-radius: 10px;
  font-weight: 500; font-size: 15px; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -14px; height: 2px;
  border-radius: 2px; background: var(--blue-2);
}
.search { position: relative; margin-left: auto; display: flex; align-items: center; }
.search svg { position: absolute; left: 14px; color: var(--dim); font-size: 17px; pointer-events: none; }
.search input {
  width: 250px; height: 40px; padding: 0 14px 0 40px;
  font: 500 14px var(--font); color: var(--text);
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 999px;
  transition: border-color 0.2s, background 0.2s, width 0.3s;
}
.search input::placeholder { color: var(--dim); }
.search input:focus { outline: none; border-color: var(--blue-2); background: rgba(255, 255, 255, 0.09); width: 290px; }
.search input::-webkit-search-cancel-button { filter: invert(0.7); }

/* ---------- Buttons and small parts ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 50px; padding: 0 22px; border-radius: 12px;
  font: 600 15px var(--font); white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn svg { font-size: 18px; }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 12px 30px -10px rgba(46, 123, 223, 0.75);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 36px -10px rgba(46, 123, 223, 0.9); }
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, 0.04); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.24); }
.btn-sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-sm svg { font-size: 16px; }
.btn.copied { border-color: rgba(88, 160, 245, 0.6); color: var(--sky); }
.kicker { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--sky); }
.text-link svg { transition: transform 0.2s; }
.text-link:hover svg { transform: translateX(3px); }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--sky);
  background: rgba(46, 123, 223, 0.12); border: 1px solid rgba(88, 160, 245, 0.28);
}
.pill:hover { background: rgba(46, 123, 223, 0.2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-2); box-shadow: 0 0 0 0 rgba(88, 160, 245, 0.7); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(88, 160, 245, 0.6); } 70% { box-shadow: 0 0 0 9px rgba(88, 160, 245, 0); } 100% { box-shadow: 0 0 0 0 rgba(88, 160, 245, 0); } }

/* ---------- Player ---------- */
.player {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); background: #000;
  box-shadow: var(--shadow), 0 0 0 1px var(--line-2);
}
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
/* The whole poster is clickable; the visible control is a pill in the corner so the poster's title stays readable */
.big-play {
  position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer;
  background: linear-gradient(0deg, rgba(5, 10, 20, 0.55), transparent 38%);
  transition: background 0.25s;
}
.big-play .pill-play {
  position: absolute; left: clamp(12px, 2.4%, 22px); bottom: clamp(12px, 3.6%, 22px);
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 20px 0 16px; border-radius: 999px;
  font: 600 15px var(--font); color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 0 0 6px rgba(46, 123, 223, 0.2), 0 14px 30px -8px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s, box-shadow 0.25s;
}
.big-play .pill-play svg { font-size: 18px; }
.big-play .pill-play small { font: 500 13px var(--font); opacity: 0.85; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, 0.35); }
.big-play:hover { background: linear-gradient(0deg, rgba(5, 10, 20, 0.65), rgba(5, 10, 20, 0.08) 60%); }
.big-play:hover .pill-play, .big-play:focus-visible .pill-play { transform: translateY(-2px); box-shadow: 0 0 0 9px rgba(88, 160, 245, 0.24), 0 18px 36px -8px rgba(0, 0, 0, 0.6); }
.big-play:focus-visible { outline-offset: -4px; }
.player.is-ready .big-play { display: none; }

/* ---------- Home ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hero h1 { font-size: clamp(36px, 5vw, 60px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; }
.hl { background: linear-gradient(90deg, var(--sky), var(--blue-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(16px, 1.4vw, 18px); color: var(--muted); max-width: 46ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero-media { position: relative; }
.glow {
  position: absolute; inset: -12% -8%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(46, 123, 223, 0.38), transparent 75%);
  filter: blur(30px);
}
.feature-meta { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.feature-meta strong { font-size: 18px; font-weight: 600; }

.band { padding: 12px 0 64px; }
.band-tight { padding-top: 8px; }
.band-last { padding-bottom: 88px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; }

/* ---------- Video cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 32px 24px; }
.card { display: flex; flex-direction: column; gap: 14px; border-radius: var(--radius); }
.thumb {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 14px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 16px 36px -18px rgba(0, 0, 0, 0.7);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.3s; }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.45)); }
.play-badge {
  position: absolute; inset: 0; margin: auto; z-index: 1;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px; color: #fff;
  background: rgba(46, 123, 223, 0.9);
  box-shadow: 0 0 0 8px rgba(46, 123, 223, 0.22);
  opacity: 0; transform: scale(0.85);
  transition: opacity 0.25s, transform 0.25s;
}
.play-badge svg { margin-left: 3px; }
.dur {
  position: absolute; right: 10px; bottom: 10px; z-index: 1;
  padding: 3px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  background: rgba(5, 10, 20, 0.78); color: #fff;
}
.card:hover .thumb img, .card:focus-visible .thumb img { transform: scale(1.045); }
.card:hover .play-badge, .card:focus-visible .play-badge { opacity: 1; transform: scale(1); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 0 2px; }
.card h3 { font-size: 19px; font-weight: 600; transition: color 0.2s; }
.card:hover h3 { color: var(--sky); }
.card p { font-size: 14.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card time { font-size: 13px; color: var(--dim); }

/* ---------- Topic tiles ---------- */
.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.topic {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; gap: 6px 18px; align-items: center;
  padding: 26px 26px 24px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.2s, box-shadow 0.25s;
}
.topic::before {
  content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -120px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(46, 123, 223, 0.28), transparent);
}
.topic-training::before { background: radial-gradient(closest-side, rgba(134, 182, 246, 0.22), transparent); }
.topic:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(88, 160, 245, 0.45), 0 20px 40px -20px rgba(0, 0, 0, 0.7); }
.topic-icon {
  grid-row: span 2; display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 14px; font-size: 26px; color: var(--sky);
  background: rgba(46, 123, 223, 0.14); box-shadow: inset 0 0 0 1px rgba(88, 160, 245, 0.25);
}
.topic-text { display: flex; flex-direction: column; gap: 4px; }
.topic-text strong { font-size: 20px; font-weight: 600; }
.topic-text span { font-size: 14.5px; color: var(--muted); }
.topic-count { grid-column: 2; font-size: 13px; font-weight: 600; color: var(--sky); }
.topic-arrow { grid-column: 3; grid-row: 1 / span 2; font-size: 22px; color: var(--muted); transition: transform 0.2s, color 0.2s; }
.topic:hover .topic-arrow { transform: translateX(4px); color: var(--text); }

/* ---------- Library ---------- */
.page-head { padding: clamp(36px, 6vw, 64px) 0 28px; }
.page-head h1 { font-size: clamp(32px, 4vw, 46px); font-weight: 700; letter-spacing: -0.03em; }
.page-head .lede { margin-top: 12px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03);
  font-weight: 600; font-size: 14px; color: var(--muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip span { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.26); }
.chip[aria-pressed="true"] { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--blue), var(--blue-2)); }
.chip[aria-pressed="true"] span { background: rgba(255, 255, 255, 0.22); color: #fff; }
.search-lg { margin-left: 0; }
.search-lg input, .search-lg input:focus { width: min(360px, 100%); height: 44px; }
.result-count { min-height: 22px; margin-bottom: 18px; font-size: 14px; color: var(--dim); }
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center;
  padding: 64px 24px; border-radius: 20px; border: 1px dashed var(--line-2); background: rgba(255, 255, 255, 0.02);
}
.empty[hidden] { display: none; }
.empty p { max-width: 46ch; color: var(--muted); font-size: 16px; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; font-size: 30px; color: var(--sky); background: rgba(46, 123, 223, 0.14); }

/* ---------- Watch page ---------- */
.watch { padding: 28px 0 88px; }
.crumbs { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; font-size: 14px; color: var(--dim); }
.crumbs a { color: var(--muted); font-weight: 500; }
.crumbs a:hover { color: var(--text); }
.watch-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.watch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 26px; }
.watch-head h1 { font-size: clamp(28px, 3.2vw, 38px); font-weight: 700; letter-spacing: -0.03em; }
.subtitle { margin-top: 6px; font-size: 17px; color: var(--muted); }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 16px; font-size: 14px; color: var(--muted); }
.meta-row > * + *::before { content: ""; }
.tag { padding: 4px 10px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--sky); background: rgba(46, 123, 223, 0.14); }
.prose { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; max-width: 72ch; color: #c9d3e3; font-size: 16px; line-height: 1.7; }
.watch-aside { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 90px; }
.aside-block { padding: 20px; border-radius: 18px; background: linear-gradient(160deg, var(--surface-2), var(--surface)); box-shadow: 0 0 0 1px var(--line); }
.aside-title { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.chapters button {
  position: relative; width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  font-size: 14.5px; font-weight: 500; color: #c9d3e3;
  transition: background 0.2s, color 0.2s;
}
.chapters button:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.chapters .time {
  flex: none; min-width: 46px; padding: 2px 0; border-radius: 6px; text-align: center;
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--sky); background: rgba(46, 123, 223, 0.13);
}
.chapters button.is-current { background: rgba(46, 123, 223, 0.16); color: #fff; }
.chapters button.is-current::before { content: ""; position: absolute; left: -20px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue-2); }
.chapters button.is-current .time { background: var(--blue); color: #fff; }
.browse { display: flex; align-items: center; gap: 14px; transition: box-shadow 0.25s; }
.browse:hover { box-shadow: 0 0 0 1px rgba(88, 160, 245, 0.45); }
.browse .topic-icon { grid-row: auto; width: 46px; height: 46px; font-size: 22px; }
.browse > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; font-size: 14px; }
.browse strong { font-weight: 600; font-size: 15px; }
.browse > svg { color: var(--muted); font-size: 20px; }
.mini-list { display: flex; flex-direction: column; gap: 12px; }
.mini { display: grid; grid-template-columns: 128px 1fr; gap: 12px; align-items: center; }
.mini img { border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; }
.mini strong { display: block; font-size: 14.5px; font-weight: 600; }
.mini .muted { font-size: 13px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); background: rgba(5, 10, 20, 0.35); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; padding-top: 40px; padding-bottom: 28px; }
.foot-brand { display: flex; flex-direction: column; gap: 14px; max-width: 46ch; }
.foot-brand img { align-self: flex-start; height: 23px; width: auto; opacity: 0.9; }
.foot-brand p { font-size: 14px; color: var(--muted); }
.foot-nav { display: flex; gap: 24px; align-items: flex-start; font-size: 14px; font-weight: 500; }
.foot-nav a { color: var(--muted); }
.foot-nav a:hover { color: var(--text); }
.foot-legal { padding-bottom: 32px; font-size: 13px; color: var(--dim); }

.notfound { padding: 96px 0 120px; }
.notfound .cta { margin-top: 28px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 640px; }
  .watch-grid { grid-template-columns: 1fr; }
  .watch-aside { position: static; }
}
@media (max-width: 860px) {
  .top-row { flex-wrap: wrap; height: auto; gap: 10px 16px; padding-top: 12px; padding-bottom: 10px; }
  .search { margin-left: auto; }
  .search input, .search input:focus { width: 44px; padding-right: 0; color: transparent; cursor: pointer; }
  .search input::placeholder { color: transparent; }
  .search input:focus { width: min(60vw, 260px); padding-right: 14px; color: var(--text); cursor: text; }
  .search input:focus::placeholder { color: var(--dim); }
  .nav { order: 3; width: 100%; overflow-x: auto; margin: 0 -12px; padding: 0 0 2px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; }
  .nav a[aria-current="page"]::after { bottom: 0; }
  .search-lg input, .search-lg input:focus { width: 100%; color: var(--text); padding-right: 14px; cursor: text; }
  .search-lg input::placeholder { color: var(--dim); }
  .search-lg { width: 100%; }
}
@media (max-width: 560px) {
  .btn { height: 46px; padding: 0 18px; }
  .cta { width: 100%; }
  .cta .btn { flex: 1 1 auto; justify-content: center; }
  .watch-head { flex-direction: column; }
  .big-play .pill-play { height: 42px; padding: 0 16px 0 13px; font-size: 14px; }
  .topic { padding: 20px; grid-template-columns: auto 1fr; }
  .topic-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
