/* =====================================================================
   Titus styles
   What it does: Sleek dark theme. Frosted-glass header, rotating hero
   with a blurred backdrop and poster, rows that scroll sideways with
   arrow buttons, hover cards with a play icon, grid view for categories
   and search, and a pop-up player. Works on phones, laptops and TVs.
   Logo = gold first-letter box with the rest of the name right after it.
   Brand color lives in --accent.
   ===================================================================== */
:root {
  --bg: #07070a;
  --surface: #111116;
  --surface-2: #1a1a21;
  --line: rgba(255,255,255,.07);
  --text: #f4f4f6;
  --muted: #8e8e9c;
  --accent: #e8b94a;
  --radius: 12px;
  --pad: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, .logo-text, .footer-brand { font-family: Outfit, Inter, sans-serif; }
::selection { background: var(--accent); color: #000; }

/* ---------- Header ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 30; height: 68px;
  display: flex; align-items: center; gap: 32px; padding: 0 var(--pad);
  background: linear-gradient(to bottom, rgba(7,7,10,.75), transparent);
  transition: background .3s var(--ease), border-color .3s;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { background: rgba(7,7,10,.72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-color: var(--line); }
.logo { display: flex; align-items: center; gap: 3px; text-decoration: none; }
.logo-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent); color: #0b0b0b; font: 700 24px/1 Outfit, sans-serif;
}
.logo-text { font-weight: 600; font-size: 24px; line-height: 30px; letter-spacing: .1em; text-transform: uppercase; color: var(--text); }
.tabs { display: flex; gap: 26px; overflow-x: auto; flex: 1; scrollbar-width: none; padding-right: 40px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent); }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; background: none; border: 0; padding: 6px 0; white-space: nowrap;
  color: var(--muted); font-size: 14px; font-weight: 500; transition: color .2s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--accent); transform: translateX(-50%);
}
.search {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px;
  border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line);
  transition: background .2s, border-color .2s;
}
.search:focus-within { background: rgba(255,255,255,.1); border-color: rgba(232,185,74,.5); }
.search .icon { color: var(--muted); flex: none; }
.search input { width: 160px; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14px; transition: width .3s var(--ease); }
.search input:focus { width: 220px; }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(86vh, 820px); display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero-backdrop {
  position: absolute; inset: -40px; z-index: -2;
  background-size: cover; background-position: center;
  filter: blur(38px) saturate(1.3) brightness(.55); transform: scale(1.1);
  transition: background-image .6s var(--ease);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 75% 40%, transparent 0%, rgba(7,7,10,.35) 55%, rgba(7,7,10,.9) 100%),
    linear-gradient(to top, var(--bg) 0%, transparent 35%),
    linear-gradient(to right, rgba(7,7,10,.85) 0%, transparent 60%);
}
.hero-inner {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px;
  padding: 100px var(--pad) 130px;
}
.hero-copy { max-width: 620px; animation: rise .7s var(--ease) both; }
.hero h1 { font-size: clamp(40px, 6vw, 76px); font-weight: 600; line-height: 1.02; letter-spacing: -.02em; margin: 14px 0 16px; }
.hero-desc { font-size: 17px; color: #cfcfd8; max-width: 52ch; margin: 0 0 28px; }
.hero-poster {
  width: clamp(240px, 30vw, 440px); aspect-ratio: 16/10; border: 0; padding: 0; border-radius: 16px;
  background: var(--surface) center/cover no-repeat; overflow: hidden; position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px var(--line);
  transition: transform .4s var(--ease); animation: rise .8s .1s var(--ease) both;
}
.hero-poster:hover { transform: translateY(-4px) scale(1.02); }
.hero-poster .play-ring { opacity: 1; }
.hero-dots { position: absolute; left: var(--pad); bottom: 84px; display: flex; gap: 8px; }
.hero-dots button {
  width: 28px; height: 3px; padding: 0; border: 0; border-radius: 3px;
  background: rgba(255,255,255,.25); position: relative; overflow: hidden;
}
.hero-dots button.active::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  transform-origin: left; animation: progress var(--dur, 8s) linear forwards;
}
.hero.paused .hero-dots button.active::after { animation-play-state: paused; }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Chips & buttons ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 12px; font-weight: 500; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid var(--line); color: #d6d6de;
}
.chip.gold { background: rgba(232,185,74,.12); border-color: rgba(232,185,74,.35); color: var(--accent); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px;
  border-radius: 999px; border: 0; font-weight: 600; font-size: 15px; text-decoration: none;
  transition: transform .15s var(--ease), background .2s;
}
.btn:active { transform: scale(.97); }
.btn svg { fill: currentColor; stroke: none; width: 16px; height: 16px; }
.btn-primary { background: #fff; color: #0b0b0b; }
.btn-primary:hover { background: var(--accent); }
.btn-glass { background: rgba(255,255,255,.1); backdrop-filter: blur(10px); border: 1px solid var(--line); }
.btn-glass:hover { background: rgba(255,255,255,.18); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }

/* ---------- Rows ---------- */
main { position: relative; z-index: 1; margin-top: -40px; padding-bottom: 24px; }
.row { margin: 0 0 34px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 var(--pad); margin-bottom: 12px; }
.row-head h2 { font-size: 20px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.see-all { background: none; border: 0; color: var(--muted); font-size: 13px; font-weight: 500; padding: 0; }
.see-all:hover { color: var(--accent); }
.row-wrap { position: relative; }
.track {
  display: flex; gap: 14px; overflow-x: auto; padding: 6px var(--pad) 12px;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); scrollbar-width: none;
}
.track::-webkit-scrollbar { display: none; }
.arrow {
  position: absolute; top: 6px; bottom: 12px; width: var(--pad); min-width: 44px; z-index: 3;
  display: grid; place-items: center; border: 0; color: #fff; opacity: 0; transition: opacity .2s;
}
.arrow.left { left: 0; background: linear-gradient(to right, var(--bg) 20%, transparent); }
.arrow.right { right: 0; background: linear-gradient(to left, var(--bg) 20%, transparent); }
.arrow svg { width: 26px; height: 26px; }
.row-wrap:hover .arrow:not([disabled]) { opacity: 1; }
.arrow[disabled] { pointer-events: none; }

/* ---------- Cards ---------- */
.card {
  position: relative; flex: 0 0 auto; width: clamp(200px, 19vw, 280px); aspect-ratio: 16/10;
  border: 0; padding: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface);
  scroll-snap-align: start; text-align: left; box-shadow: 0 0 0 1px var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card img, .card .fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .35s; }
.card .fallback { display: block; }
.card .fallback::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 6px); }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.15) 55%, transparent 100%); }
.card-meta { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; }
.card-title { font: 600 15px/1.25 Outfit, sans-serif; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: 12px; color: #b9b9c4; margin-top: 3px; max-height: 0; opacity: 0; transition: max-height .3s var(--ease), opacity .3s; }
.play-ring {
  position: absolute; top: 50%; left: 50%; z-index: 2; width: 52px; height: 52px; margin: -26px 0 0 -26px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.18); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.35);
  opacity: 0; transform: scale(.85); transition: opacity .3s, transform .3s var(--ease);
}
.play-ring svg { fill: #fff; stroke: none; width: 20px; height: 20px; margin-left: 3px; }
.card:hover, .card:focus-visible { transform: translateY(-4px) scale(1.03); box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(232,185,74,.6); outline: none; z-index: 2; }
.card:hover img, .card:focus-visible img { transform: scale(1.08); filter: brightness(.8); }
.card:hover .play-ring, .card:focus-visible .play-ring { opacity: 1; transform: scale(1); }
.card:hover .card-sub, .card:focus-visible .card-sub { max-height: 20px; opacity: 1; }

/* ---------- Grid view (category tabs, search, more like this) ---------- */
.grid-section { padding: 110px var(--pad) 20px; }
.grid-section h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: -.02em; margin: 0 0 6px; }
.grid-section .count { color: var(--muted); margin: 0 0 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.grid .card { width: auto; }
.grid-sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.grid-sm .card-title { font-size: 13px; }

.empty { text-align: center; color: var(--muted); padding: 40px var(--pad) 80px; }

/* ---------- Ads ---------- */
.ad-slot { margin: 24px auto; max-width: 970px; padding: 0 var(--pad); text-align: center; }
.ad-slot:empty { display: none; }

/* ---------- Player modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; overflow-y: auto; padding: 5vh 3vw;
  background: rgba(4,4,6,.7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: flex-start; justify-content: center; animation: fade .25s ease both;
}
.modal[hidden] { display: none; }
.modal-box {
  position: relative; width: min(1080px, 100%); background: var(--surface); border-radius: 18px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,.7), 0 0 0 1px var(--line); animation: rise .35s var(--ease) both;
}
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(0,0,0,.55); backdrop-filter: blur(8px); color: #fff;
}
.icon-btn:hover { background: rgba(0,0,0,.8); }
.close { position: absolute; top: 14px; right: 14px; z-index: 3; }
.player { aspect-ratio: 16/9; background: #000; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-info { padding: 26px 30px 32px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.modal-head h2 { margin: 0 0 10px; font-size: 28px; font-weight: 600; letter-spacing: -.01em; }
.modal-desc { color: #cfcfd8; max-width: 70ch; margin: 18px 0 8px; }
.more-title { font-size: 16px; font-weight: 600; margin: 28px 0 12px; color: var(--muted); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 44px var(--pad) 50px; text-align: center; color: var(--muted); font-size: 14px; }
.footer p { margin: 8px 0; }
.footer a { color: var(--text); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer-brand { display: inline-flex; margin-bottom: 6px; }
.footer-links { display: flex; justify-content: center; gap: 22px; margin: 16px 0; }
.copy { font-size: 12px; }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: rgba(30,30,38,.9); backdrop-filter: blur(12px); border: 1px solid var(--line);
  color: var(--text); font-weight: 500; padding: 12px 20px; border-radius: 999px; animation: rise .25s var(--ease) both;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-poster { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { height: auto; flex-wrap: wrap; gap: 10px 14px; padding: 12px var(--pad) 10px; }
  .tabs { order: 3; flex-basis: 100%; gap: 20px; }
  .search { margin-left: auto; height: 36px; }
  .search input, .search input:focus { width: 120px; }
  .hero { min-height: 74vh; }
  .hero-inner { padding: 140px var(--pad) 110px; }
  .hero-dots { bottom: 64px; }
  .hero-desc { font-size: 15px; }
  .card { width: 64vw; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid-section { padding-top: 130px; }
  .card-title { font-size: 13px; }
  .card-sub { display: none; }
  .modal { padding: 0; }
  .modal-box { border-radius: 0; min-height: 100%; }
  .modal-info { padding: 20px; }
  .arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
