:root {
  color-scheme: dark;
  --bg: #08070b;
  --surface: #100e16;
  --surface-raised: #17131f;
  --surface-hover: #20192c;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f5f1fb;
  --muted: #a9a2b3;
  --purple: #4912a1;
  --purple-bright: #7b3bd2;
  --purple-soft: #b695e7;
  --sidebar-width: 228px;
  --topbar-height: 72px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 14%, rgba(73, 18, 161, 0.13), transparent 24rem),
    var(--bg);
}

button,
input,
textarea,
dialog {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
}

.topbar {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: var(--topbar-height);
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(220px, 640px) auto;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 7, 11, 0.82);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 10px;
  font-size: 1.34rem;
  font-weight: 720;
  letter-spacing: -0.035em;
}

.brand img {
  filter: drop-shadow(0 0 14px rgba(109, 49, 203, 0.35));
}

.search {
  height: 42px;
  display: grid;
  grid-template-columns: 1fr 48px;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search:focus-within {
  border-color: rgba(136, 83, 215, 0.75);
  box-shadow: 0 0 0 3px rgba(73, 18, 161, 0.22);
}

.search input {
  min-width: 0;
  padding: 0 18px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search input::placeholder {
  color: #817a8a;
}

.search button {
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.search svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.header-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.account-area {
  position: relative;
}

.account-button {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 12px 4px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.account-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--purple-bright), #321066);
  font-size: 0.78rem;
  font-weight: 800;
}

.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 230px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(18, 14, 25, 0.98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.account-menu-name {
  margin-bottom: 2px;
  font-weight: 700;
}

.account-menu-handle {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.83rem;
}

.account-menu a,
.account-menu button {
  width: 100%;
  display: block;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  color: #d8d0e0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.account-menu a:hover,
.account-menu button:hover {
  background: var(--surface-hover);
}

.primary-button,
.ghost-button {
  min-height: 40px;
  padding: 0 17px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 650;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.primary-button {
  background: var(--purple);
  box-shadow: 0 10px 28px rgba(73, 18, 161, 0.26);
}

.primary-button:hover {
  background: #5b1bb7;
  transform: translateY(-1px);
}

.ghost-button {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.035);
}

.ghost-button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
}

.sidebar {
  position: fixed;
  z-index: 10;
  inset: var(--topbar-height) auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  border-right: 1px solid var(--border);
  background: rgba(10, 8, 13, 0.78);
}

.sidebar nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: #c8c1d0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nav-item > span:first-child {
  width: 22px;
  color: #9e91ad;
  font-size: 1.15rem;
  text-align: center;
}

.nav-item:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.nav-item.active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(73, 18, 161, 0.4), rgba(73, 18, 161, 0.13));
}

.nav-item.active > span:first-child,
.premium-link > span:first-child {
  color: var(--purple-soft);
}

.sidebar-divider {
  height: 1px;
  margin: 20px 10px;
  background: var(--border);
}

.sidebar-note {
  margin: auto 14px 4px;
  color: #8f8799;
  font-size: 0.78rem;
  line-height: 1.6;
}

.sidebar-note span {
  color: #625b6c;
}

main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
}

.hero {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 48px;
  padding: 76px clamp(34px, 6vw, 92px) 68px;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 690px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--purple-soft);
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow > span,
.status-pill > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-bright);
  box-shadow: 0 0 12px var(--purple-bright);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(3rem, 6.4vw, 6.9rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

h1 em {
  color: var(--purple-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero-description {
  max-width: 600px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.17rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.primary-button.large {
  min-height: 48px;
  padding: 0 22px;
}

.text-link {
  color: #d5cdda;
  font-size: 0.94rem;
}

.text-link:hover {
  color: var(--text);
}

.gravity-well {
  position: relative;
  width: min(40vw, 540px);
  aspect-ratio: 1;
  justify-self: center;
  transform: rotate(-8deg);
}

.well-glow,
.well-core,
.well-ring {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.well-glow {
  width: 55%;
  height: 55%;
  background: rgba(87, 27, 183, 0.48);
  filter: blur(62px);
}

.well-core {
  width: 38%;
  height: 38%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(170, 121, 231, 0.32);
  background: radial-gradient(circle at 40% 34%, #211434 0, #09060e 52%, #020203 74%);
  box-shadow:
    0 0 35px rgba(86, 31, 176, 0.55),
    0 0 110px rgba(73, 18, 161, 0.3),
    inset 0 0 26px #000;
}

.well-core span {
  width: 0;
  height: 0;
  margin-left: 7%;
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
  border-left: 34px solid rgba(202, 171, 238, 0.48);
  filter: drop-shadow(0 0 14px rgba(183, 137, 231, 0.24));
}

.well-ring {
  width: 91%;
  height: 31%;
  border: 4px solid transparent;
  border-top-color: #8b55d5;
  border-bottom-color: #3d0d83;
  box-shadow: 0 -6px 28px rgba(122, 58, 210, 0.24);
}

.ring-two {
  width: 77%;
  height: 24%;
  border-width: 1px;
  opacity: 0.38;
  transform: translate(-50%, -50%) rotate(5deg);
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d2bceb;
  box-shadow: 0 0 12px #a96ff0;
}

.star-one { top: 14%; left: 28%; }
.star-two { right: 9%; top: 43%; width: 2px; height: 2px; }
.star-three { bottom: 19%; left: 17%; width: 2px; height: 2px; }

.feed-section {
  padding: 28px clamp(28px, 4.5vw, 72px) 80px;
  border-top: 1px solid var(--border);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading .eyebrow {
  margin-bottom: 10px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #bcb4c5;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.75rem;
}

.status-pill > span {
  background: #5bd59a;
  box-shadow: 0 0 10px rgba(91, 213, 154, 0.7);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.video-card {
  min-width: 0;
}

.thumbnail {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  isolation: isolate;
}

.thumbnail::before,
.thumbnail::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  z-index: -1;
}

.thumbnail::before {
  width: 52%;
  height: 72%;
  left: 15%;
  top: 17%;
}

.thumbnail::after {
  width: 45%;
  height: 45%;
  right: 5%;
  bottom: 8%;
}

.nebula-purple { background: linear-gradient(135deg, #100b18, #281044); }
.nebula-purple::before { background: #722dcc; }
.nebula-purple::after { background: #35127d; }
.nebula-blue { background: linear-gradient(135deg, #080d19, #101d39); }
.nebula-blue::before { background: #294c9f; }
.nebula-blue::after { background: #4c247d; }
.nebula-gold { background: linear-gradient(135deg, #16100b, #302114); }
.nebula-gold::before { background: #8c5527; }
.nebula-gold::after { background: #5a1e72; }

.thumbnail button {
  width: 54px;
  height: 54px;
  padding-left: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: rgba(245, 235, 255, 0.82);
  background: rgba(5, 4, 8, 0.66);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.thumbnail button:hover {
  transform: scale(1.06);
  background: rgba(73, 18, 161, 0.72);
}

.video-thumbnail {
  display: block;
  background: #120d19;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease;
}

.video-thumbnail:hover img {
  transform: scale(1.025);
}

.duration-label {
  position: absolute;
  right: 9px;
  bottom: 9px;
  padding: 3px 6px;
  border-radius: 5px;
  color: #fff;
  background: rgba(2, 2, 3, 0.8);
  font-size: 0.7rem;
  font-weight: 700;
}

.preview-label {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(5, 4, 8, 0.46);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.video-details {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 4px;
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #e3d4f7;
  background: #35116e;
  font-size: 0.82rem;
  font-weight: 800;
}

.avatar.alternate { background: #182f5f; }
.avatar.warm { background: #5a321b; }

.video-details h3 {
  margin-bottom: 7px;
  font-size: 0.97rem;
  line-height: 1.35;
}

.video-details p {
  margin-bottom: 3px;
  color: #8f8799;
  font-size: 0.78rem;
}

.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 24px;
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border: 1px solid rgba(168, 120, 240, 0.28);
  border-radius: 12px;
  color: #e8def3;
  background: rgba(20, 15, 28, 0.94);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.auth-dialog {
  width: min(470px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid rgba(178, 133, 235, 0.2);
  border-radius: 22px;
  color: var(--text);
  background: #100d16;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.68);
}

.auth-dialog::backdrop {
  background: rgba(3, 2, 5, 0.76);
  backdrop-filter: blur(8px);
}

.auth-shell {
  padding: 28px;
  background:
    radial-gradient(circle at 85% 0%, rgba(73, 18, 161, 0.25), transparent 18rem),
    #100d16;
}

.auth-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.auth-heading .eyebrow {
  margin-bottom: 8px;
}

.auth-heading h2 {
  font-size: 1.8rem;
}

.dialog-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.auth-tabs button.active {
  color: var(--text);
  background: #282032;
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-form label {
  margin-top: 7px;
  color: #d9d1e2;
  font-size: 0.86rem;
  font-weight: 650;
}

.auth-form input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  outline: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.auth-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  outline: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.auth-form textarea:focus {
  border-color: rgba(141, 86, 218, 0.82);
  box-shadow: 0 0 0 3px rgba(73, 18, 161, 0.22);
}

.auth-form input[type="file"] {
  height: auto;
  padding: 10px;
  color: var(--muted);
}

.auth-form input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-hover);
  cursor: pointer;
}

.auth-form input:focus {
  border-color: rgba(141, 86, 218, 0.82);
  box-shadow: 0 0 0 3px rgba(73, 18, 161, 0.22);
}

.field-hint {
  margin: -1px 0 2px;
  color: #847c8e;
  font-size: 0.73rem;
  line-height: 1.45;
}

.creator-access-copy {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.creator-code-fieldset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 4px 0 6px;
  padding: 0;
  border: 0;
}

.auth-form .creator-code-segment {
  height: 58px;
  padding: 0;
  text-align: center;
  text-transform: uppercase;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.creator-code-fieldset > span {
  color: #685f72;
  font-weight: 700;
}

.form-error {
  min-height: 20px;
  margin: 6px 0 0;
  color: #ee9bac;
  font-size: 0.8rem;
}

.auth-submit {
  min-height: 46px;
  margin-top: 2px;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.6;
}

.upload-dialog {
  width: min(560px, calc(100vw - 28px));
}

.upload-progress {
  margin-top: 10px;
}

.upload-progress > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

.upload-progress progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--surface-hover);
}

.upload-progress progress::-webkit-progress-bar {
  background: var(--surface-hover);
}

.upload-progress progress::-webkit-progress-value {
  background: var(--purple-bright);
}

.upload-progress progress::-moz-progress-bar {
  background: var(--purple-bright);
}

.channel-page {
  min-height: 100vh;
}

.channel-topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--border);
  background: rgba(8, 7, 11, 0.86);
}

.channel-home-link {
  display: grid;
  place-items: center;
}

.channel-main {
  margin: 0;
  padding: clamp(24px, 5vw, 68px);
}

.channel-hero,
.channel-empty {
  max-width: 1180px;
  margin: 0 auto;
}

.channel-banner {
  height: clamp(150px, 24vw, 280px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 25% 90%, rgba(122, 54, 212, 0.75), transparent 38%),
    radial-gradient(ellipse at 75% 10%, rgba(40, 45, 110, 0.68), transparent 35%),
    #100b19;
}

.channel-identity {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  margin: -42px 34px 0;
}

.channel-avatar-large {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 5px solid var(--bg);
  border-radius: 50%;
  background: linear-gradient(145deg, #7333ca, #2d0d61);
  font-size: 2.3rem;
  font-weight: 800;
}

.channel-identity .eyebrow {
  margin: 48px 0 7px;
}

.channel-identity h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.channel-handle,
.channel-date {
  margin-bottom: 7px;
  color: var(--muted);
}

.channel-bio {
  max-width: 680px;
  margin: 16px 0 8px;
  color: #c1b8ca;
}

.channel-date {
  font-size: 0.78rem;
}

.channel-empty {
  margin-top: 64px;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.channel-empty h2 {
  margin-bottom: 9px;
}

.channel-empty > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.channel-video-grid {
  margin-top: 22px;
}

.channel-card-details {
  grid-template-columns: minmax(0, 1fr);
}

.watch-page {
  min-height: 100vh;
}

.watch-main {
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 48px);
}

.watch-player-shell {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.watch-player-shell video {
  width: 100%;
  max-height: min(78vh, 900px);
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
}

.watch-details {
  padding: 24px 6px;
}

.watch-details h1 {
  margin-bottom: 18px;
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  line-height: 1.13;
  letter-spacing: -0.035em;
}

.watch-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.watch-channel {
  display: flex;
  align-items: center;
  gap: 11px;
}

.watch-channel > span:last-child {
  display: grid;
  gap: 2px;
}

.watch-channel small,
.watch-meta-row > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.watch-description {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: #c9c0d1;
  background: var(--surface);
  line-height: 1.65;
  white-space: pre-wrap;
}

@media (max-width: 1050px) {
  :root { --sidebar-width: 82px; }
  .topbar { grid-template-columns: 54px minmax(220px, 1fr) auto; }
  .brand span,
  .nav-item > span:last-child,
  .sidebar-note { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-card:last-child { display: none; }
}

@media (max-width: 760px) {
  :root { --topbar-height: 64px; }
  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 0 14px;
  }
  .topbar .brand img { width: 38px; height: 38px; }
  .search { height: 40px; }
  .search input { padding: 0 13px; }
  .ghost-button { display: none; }
  .primary-button { padding: 0 13px; }
  .sidebar {
    inset: auto 0 0;
    width: auto;
    height: 62px;
    display: block;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-width: 1px 0 0;
    background: rgba(9, 7, 12, 0.94);
    backdrop-filter: blur(16px);
  }
  .sidebar nav:first-child {
    grid-template-columns: repeat(3, 1fr);
  }
  .sidebar nav:last-of-type,
  .sidebar-divider { display: none; }
  .nav-item { min-height: 46px; }
  main { margin-left: 0; padding-bottom: 62px; }
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 70px 24px 50px;
  }
  .gravity-well {
    position: absolute;
    top: 110px;
    right: -100px;
    width: 330px;
    opacity: 0.34;
  }
  .hero-description { max-width: 520px; }
  .feed-section { padding: 26px 20px 54px; }
  .video-grid { grid-template-columns: 1fr; }
  .video-card:last-child { display: block; }
}

@media (max-width: 500px) {
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .account-button { padding-right: 5px; }
  .account-button > span:last-child { display: none; }
  .search { grid-template-columns: 1fr 42px; }
  .hero { padding-top: 58px; }
  h1 { font-size: clamp(3.1rem, 17vw, 4.6rem); }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .auth-shell { padding: 22px; }
  .channel-identity {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    margin: -28px 14px 0;
  }
  .channel-avatar-large { width: 72px; height: 72px; font-size: 1.5rem; }
  .channel-identity .eyebrow { margin-top: 31px; }
  .watch-main { padding: 12px; }
  .watch-player-shell { border-radius: 11px; }
  .watch-meta-row { align-items: flex-start; flex-direction: column; }
}

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