@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #050814;
  --panel: rgba(12, 18, 42, 0.86);
  --panel-solid: #0d1430;
  --panel-raised: #121b3b;
  --text: #f4f8ff;
  --muted: #96a5c4;
  --line: rgba(121, 165, 255, 0.15);
  --ice: #eff8ff;
  --cyan: #59dfff;
  --blue: #3978ff;
  --violet: #923cff;
  --brand-gradient: linear-gradient(105deg, var(--cyan), var(--blue) 55%, var(--violet));
  --radius: 22px;
  --content: min(1500px, calc(100vw - 72px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.ambient { position: fixed; pointer-events: none; filter: blur(90px); border-radius: 50%; z-index: -1; opacity: .14; }
.ambient-one { width: 420px; height: 420px; background: var(--violet); top: 5vh; right: 1vw; opacity: .18; }
.ambient-two { width: 480px; height: 300px; background: var(--cyan); top: 44vh; left: -280px; opacity: .12; }

.topbar {
  height: 78px;
  width: 100%;
  padding: 0 max(36px, calc((100vw - 1500px) / 2));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 20, 0.82);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: inline-flex; width: max-content; align-items: center; }
.brand-logo { display: block; width: 174px; height: auto; object-fit: contain; filter: drop-shadow(0 0 16px rgba(72, 137, 255, .16)); }
.desktop-nav { display: flex; gap: 9px; height: 100%; align-items: center; }
.desktop-nav a { padding: 11px 17px; color: var(--muted); font-weight: 600; font-size: .92rem; border-radius: 12px; transition: .2s ease; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--text); background: linear-gradient(135deg, rgba(89,223,255,.09), rgba(146,60,255,.09)); }
.header-actions { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
.search-box { width: min(250px, 24vw); height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line); background: rgba(255,255,255,.035); border-radius: 13px; color: var(--muted); }
.search-box:focus-within { border-color: rgba(89,223,255,.55); box-shadow: 0 0 0 3px rgba(57,120,255,.12); }
.search-box svg { width: 18px; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-box input::placeholder { color: #767b84; }
.search-box kbd { padding: 2px 6px; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 5px; font-size: .72rem; }
.icon-button, .avatar { width: 42px; height: 42px; border: 1px solid var(--line); background: rgba(255,255,255,.035); border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.icon-button { position: relative; }
.icon-button svg { width: 19px; }
.notification-dot { position: absolute; width: 6px; height: 6px; background: var(--cyan); border-radius: 50%; top: 8px; right: 8px; box-shadow: 0 0 10px var(--cyan), 0 0 0 2px var(--bg); }
.avatar { border-color: rgba(89,223,255,.35); background: linear-gradient(135deg, #315ba7, #472477); font-weight: 700; }

main { width: var(--content); margin: 0 auto; padding-bottom: 90px; }
.welcome-row { display: flex; justify-content: space-between; align-items: flex-end; padding: 42px 0 25px; }
.eyebrow { margin: 0 0 8px; color: var(--cyan); font-size: .72rem; font-weight: 700; letter-spacing: .14em; }
.welcome-row h1 { margin: 0; font-family: "Manrope", sans-serif; font-size: clamp(1.65rem, 3vw, 2.45rem); letter-spacing: -.04em; }
.principle { color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 9px; }
.principle span { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }

.featured-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(300px, .8fr); gap: 22px; }
.feature-card, .creator-pot { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(15,24,55,.92), rgba(8,12,29,.88)); border-radius: var(--radius); overflow: hidden; box-shadow: 0 18px 70px rgba(0,0,0,.28), 0 0 50px rgba(57,120,255,.035); }
.player-shell { aspect-ratio: 16/8.7; background: #070b1a; position: relative; overflow: hidden; }
.poster { width: 100%; height: 100%; position: relative; background-image: url("https://images.unsplash.com/photo-1483683804023-6ccdb62f86ef?auto=format&fit=crop&w=1920&q=88"); background-size: cover; background-position: center; }
.poster-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,7,9,.9) 0%, rgba(6,7,9,.56) 46%, rgba(6,7,9,.05) 76%), linear-gradient(0deg, rgba(6,7,9,.5), transparent 50%); }
.poster-content { position: absolute; left: clamp(24px, 4vw, 66px); bottom: clamp(25px, 4vw, 58px); max-width: 510px; }
.editor-pick, .category { display: inline-block; padding: 6px 9px; border: 1px solid rgba(89,223,255,.4); color: var(--cyan); border-radius: 6px; font-size: .67rem; font-weight: 700; letter-spacing: .12em; background: rgba(5,8,20,.46); }
.poster-content h2 { margin: 17px 0 12px; font-family: "Manrope", sans-serif; font-size: clamp(2.25rem, 4.8vw, 5rem); line-height: .95; letter-spacing: -.065em; max-width: 710px; }
.poster-content p { max-width: 440px; color: #d0d3d1; line-height: 1.55; font-size: clamp(.85rem, 1.4vw, 1rem); }
.poster-actions { display: flex; align-items: center; gap: 16px; margin-top: 22px; color: #d4d6d5; font-size: .83rem; }
.play-button { border: 0; border-radius: 12px; background: var(--brand-gradient); color: white; font-weight: 800; padding: 13px 18px; display: flex; align-items: center; gap: 9px; cursor: pointer; box-shadow: 0 12px 30px rgba(57,120,255,.28); transition: transform .2s ease, filter .2s ease; }
.play-button:hover { transform: translateY(-2px); filter: brightness(1.12); }
.play-button svg { width: 17px; fill: currentColor; stroke: none; }
mux-player { width: 100%; height: 100%; --media-object-fit: cover; }
mux-player[hidden] { display: none; }
.video-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; }
.creator-identity, .video-actions { display: flex; align-items: center; gap: 11px; }
.creator-avatar { flex: 0 0 auto; width: 39px; height: 39px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; letter-spacing: .03em; color: white; border: 1px solid rgba(255,255,255,.15); }
.creator-avatar-gowie { background: linear-gradient(145deg, #3978ff, #7029a9); }
.creator-avatar-orbit { background: linear-gradient(145deg, #7b75df, #282a51); }
.creator-avatar-field { background: linear-gradient(145deg, #55967b, #213b32); }
.creator-avatar-discover { color: var(--cyan); background: linear-gradient(145deg, rgba(89,223,255,.12), rgba(146,60,255,.12)); }
.creator-avatar-discover svg { width: 19px; }
.creator-line { display: flex; align-items: center; gap: 5px; }
.creator-line strong, .allocation-copy strong { font-size: .86rem; }
.creator-identity span, .allocation-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: .73rem; }
.verified { width: 16px; fill: var(--cyan); stroke: var(--cyan); }
.verified .verified-tick { fill: none; stroke: #08122b; stroke-width: 2; }
.secondary-button, .follow-button { height: 38px; border-radius: 11px; padding: 0 15px; border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; font-size: .82rem; font-weight: 700; }
.secondary-button { display: flex; align-items: center; gap: 7px; }
.secondary-button svg { width: 16px; }
.follow-button { border-color: transparent; color: white; background: var(--brand-gradient); min-width: 82px; box-shadow: 0 8px 22px rgba(57,120,255,.2); }
.follow-button.following { color: var(--text); background: transparent; border-color: var(--line); }

.creator-pot { padding: 24px; display: flex; flex-direction: column; }
.pot-head { display: flex; justify-content: space-between; align-items: flex-start; }
.pot-head h2 { margin: 0; font-family: "Manrope", sans-serif; font-size: 1.35rem; }
.pot-head > span { color: var(--muted); font-size: .76rem; padding-top: 4px; }
.pot-amount { margin-top: 28px; display: flex; align-items: baseline; justify-content: space-between; }
.pot-amount strong { font-family: "Manrope", sans-serif; font-size: 2.45rem; letter-spacing: -.05em; }
.pot-amount span { font-size: .7rem; color: var(--muted); }
.progress-track { height: 5px; margin: 10px 0 22px; border-radius: 10px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress-track span { display: block; width: 97%; height: 100%; background: var(--brand-gradient); border-radius: inherit; box-shadow: 0 0 12px rgba(89,223,255,.35); }
.allocations { display: grid; gap: 4px; }
.allocation-row { display: grid; grid-template-columns: 39px 1fr auto; align-items: center; gap: 11px; padding: 8px 0; }
.allocation-row > strong { font-size: .82rem; }
.discovery-row { margin-top: 3px; padding-top: 12px; border-top: 1px solid var(--line); }
.pot-link { width: 100%; display: flex; justify-content: space-between; border: 0; border-top: 1px solid var(--line); margin-top: auto; padding: 17px 0 5px; background: transparent; color: var(--cyan); font-weight: 700; font-size: .78rem; cursor: pointer; }
.pot-link span { font-size: 1rem; }
.pot-total { margin: 15px -24px -24px; padding: 14px 24px; color: var(--muted); background: rgba(0,0,0,.18); font-size: .69rem; text-align: center; border-top: 1px solid var(--line); }
.pot-total strong { color: #d8dad7; }

.content-section { padding-top: 40px; scroll-margin-top: 85px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-family: "Manrope", sans-serif; font-size: 1.35rem; letter-spacing: -.025em; }
.section-heading > a { color: var(--muted); font-size: .8rem; font-weight: 600; }
.section-heading > a span { color: var(--cyan); margin-left: 5px; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.video-card { outline: none; cursor: pointer; }
.thumbnail { aspect-ratio: 16/8.7; border-radius: 16px; background-size: cover; background-position: center; position: relative; overflow: hidden; border: 1px solid var(--line); transition: transform .22s ease, border-color .22s ease; }
.video-card:hover .thumbnail, .video-card:focus .thumbnail { transform: translateY(-3px); border-color: rgba(89,223,255,.42); box-shadow: 0 14px 30px rgba(57,120,255,.1); }
.thumbnail::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.36), transparent 52%); }
.thumbnail-space { background-image: url("https://images.unsplash.com/photo-1614729939124-032f0b56c9ce?auto=format&fit=crop&w=1200&q=85"); }
.thumbnail-mountain { background-image: url("https://images.unsplash.com/photo-1595520519880-a86c48ea536c?auto=format&fit=crop&w=1200&q=85"); }
.thumbnail-city { background-image: url("https://images.unsplash.com/photo-1483683804023-6ccdb62f86ef?auto=format&fit=crop&w=1200&q=85"); }
.duration { position: absolute; z-index: 2; right: 9px; bottom: 9px; padding: 4px 6px; background: rgba(0,0,0,.75); backdrop-filter: blur(5px); border-radius: 5px; font-size: .65rem; font-weight: 700; }
.watch-progress { position: absolute; z-index: 3; left: 0; bottom: 0; width: var(--progress); height: 3px; background: var(--brand-gradient); }
.video-card h3 { margin: 12px 0 5px; font-size: .98rem; font-weight: 600; }
.video-card p { margin: 0; color: var(--muted); font-size: .75rem; }
.video-card p span { margin: 0 5px; }
.final-section { padding-bottom: 20px; }
.rail-controls { display: flex; gap: 8px; }
.rail-controls button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.04); cursor: pointer; }
.feature-strip { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; }
.wide-card { min-height: 300px; padding: 22px; border-radius: 18px; display: flex; flex-direction: column; justify-content: space-between; background-size: cover; background-position: center; position: relative; overflow: hidden; border: 1px solid var(--line); }
.wide-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,6,8,.84), rgba(5,6,8,.08) 70%); }
.wide-card > * { position: relative; z-index: 1; }
.wide-card-ocean { background-image: url("https://images.unsplash.com/photo-1483683804023-6ccdb62f86ef?auto=format&fit=crop&w=1400&q=84"); }
.wide-card-forest { background-image: url("https://images.unsplash.com/photo-1595520519880-a86c48ea536c?auto=format&fit=crop&w=1200&q=84"); }
.wide-card h3 { margin: 0 0 5px; font-family: "Manrope", sans-serif; font-size: 1.4rem; }
.wide-card p { margin: 0; color: #c3c7c4; font-size: .8rem; }
.mobile-nav { display: none; }

dialog { padding: 0; border: 1px solid var(--line); border-radius: 22px; background: #0d1430; color: var(--text); width: min(470px, calc(100vw - 30px)); box-shadow: 0 25px 100px rgba(0,0,0,.7), 0 0 50px rgba(57,120,255,.08); }
dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(7px); }
.dialog-card { padding: 30px; }
.dialog-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg, rgba(89,223,255,.14), rgba(146,60,255,.14)); color: var(--cyan); }
.dialog-icon svg { width: 25px; }
.dialog-card h2 { margin: 20px 0 8px; font-family: "Manrope", sans-serif; font-size: 1.45rem; }
.dialog-card p { margin: 0 0 22px; color: var(--muted); line-height: 1.55; font-size: .88rem; }
.dialog-card p strong { color: #d8dad7; }
.dialog-card label { display: block; margin-bottom: 7px; font-size: .78rem; font-weight: 700; }
.dialog-card input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.04); color: var(--text); outline: none; }
.dialog-card input:focus { border-color: rgba(89,223,255,.55); box-shadow: 0 0 0 3px rgba(57,120,255,.12); }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.dialog-actions button { border-radius: 10px; padding: 10px 14px; border: 1px solid var(--line); font-weight: 700; cursor: pointer; }
.dialog-cancel { background: transparent; }
.dialog-save { background: var(--brand-gradient); color: white; border-color: transparent !important; }
.dialog-card small { display: block; color: #70757d; font-size: .68rem; margin-top: 14px; }
.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; border: 1px solid rgba(89,223,255,.28); background: #101a38; color: #edf7ff; padding: 12px 16px; border-radius: 11px; font-size: .8rem; box-shadow: 0 12px 36px rgba(0,0,0,.35); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1000px) {
  :root { --content: min(100% - 40px, 900px); }
  .topbar { padding: 0 20px; grid-template-columns: 1fr auto; }
  .desktop-nav { display: none; }
  .featured-layout { grid-template-columns: 1fr; }
  .creator-pot { min-height: 410px; }
  .allocations { grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .discovery-row { margin: 0; padding-top: 8px; border-top: 0; }
  .pot-link { margin-top: 18px; }
}

@media (max-width: 680px) {
  :root { --content: calc(100% - 28px); --radius: 18px; }
  .topbar { height: 64px; padding: 0 14px; }
  .search-box { width: 40px; padding: 0; justify-content: center; border-radius: 50%; }
  .search-box input, .search-box kbd { display: none; }
  .header-actions { gap: 7px; }
  .icon-button { display: none; }
  .avatar, .search-box { width: 38px; height: 38px; }
  .brand-logo { width: 128px; }
  main { padding-bottom: 95px; }
  .welcome-row { padding: 25px 0 17px; align-items: flex-start; }
  .welcome-row h1 { font-size: 1.55rem; }
  .principle { font-size: 0; margin-top: 5px; }
  .principle::after { content: "Ad-free"; font-size: .72rem; }
  .player-shell { aspect-ratio: 4/4.3; }
  .poster { background-position: 61% center; }
  .poster-shade { background: linear-gradient(0deg, rgba(5,6,8,.94) 0%, rgba(5,6,8,.46) 55%, rgba(5,6,8,.08)); }
  .poster-content { left: 20px; right: 20px; bottom: 25px; }
  .poster-content h2 { font-size: 2.55rem; }
  .poster-content p { font-size: .83rem; max-width: 95%; }
  .video-meta { padding: 13px; }
  .creator-identity span { display: none; }
  .secondary-button { width: 38px; padding: 0; justify-content: center; }
  .secondary-button svg { width: 17px; }
  .secondary-button { font-size: 0; }
  .follow-button { min-width: 72px; padding: 0 11px; }
  .creator-pot { padding: 20px; min-height: auto; }
  .allocations { grid-template-columns: 1fr; }
  .pot-total { margin: 15px -20px -20px; }
  .video-grid { grid-template-columns: 80vw 80vw 80vw; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 14px 12px; margin: 0 -14px; scrollbar-width: none; }
  .video-grid::-webkit-scrollbar { display: none; }
  .video-card { scroll-snap-align: start; }
  .content-section { padding-top: 32px; }
  .feature-strip { grid-template-columns: 1fr; }
  .wide-card { min-height: 260px; }
  .mobile-nav { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: 10px; height: 68px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; background: rgba(10,15,34,.94); backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 14px 44px rgba(0,0,0,.4), 0 0 28px rgba(57,120,255,.06); }
  .mobile-nav a, .mobile-nav button { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 0; background: transparent; color: var(--muted); font-size: .62rem; }
  .mobile-nav svg { width: 20px; height: 20px; }
  .mobile-nav .active { color: var(--cyan); }
  .toast { left: 16px; right: 16px; bottom: 92px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
