:root {
  --bg: #0b1020;
  --bg-soft: #121a31;
  --panel: rgba(15, 23, 43, 0.92);
  --panel-strong: #182342;
  --panel-muted: #10192f;
  --border: rgba(123, 154, 255, 0.16);
  --text: #edf4ff;
  --muted: #9aa8c7;
  --accent: #36d0ff;
  --accent-strong: #04b8ff;
  --amber: #ffba49;
  --violet: #6a7dff;
  --danger: #ff7f9f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shell: 1360px;
  --scrollbar-size: 8px;
  --scrollbar-thumb: rgba(54, 208, 255, 0.32);
  --scrollbar-thumb-hover: rgba(54, 208, 255, 0.52);
  --scrollbar-track: rgba(255, 255, 255, 0.03);
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(54, 208, 255, 0.16), transparent 24%),
    radial-gradient(circle at top left, rgba(106, 125, 255, 0.12), transparent 22%),
    linear-gradient(180deg, #0b1020 0%, #070c18 100%);
}

body:hover {
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

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

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

.site-header {
  width: 100%;
  margin: 0;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  background: rgba(9, 14, 29, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.nav-toggle span {
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #06101c;
  background: linear-gradient(135deg, #6fe2ff 0%, #07b6ff 100%);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}

.top-nav-actions {
  gap: 10px;
}

.header-search {
  flex: 1;
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 24px;
}

.header-search-input {
  width: 100%;
  height: 46px;
  padding: 0 18px;
  color: var(--text);
  background: rgba(5, 10, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-right: none;
  border-radius: 999px 0 0 999px;
}

.header-search-button {
  height: 46px;
  padding: 0 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 999px 999px 0;
  cursor: pointer;
}

.header-icon-action,
.header-avatar-link,
.header-link-button {
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-icon-action {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.header-avatar-link {
  color: #07111e;
  font-weight: 700;
  background: linear-gradient(135deg, #7be4ff 0%, #02b7ff 100%);
}

.header-link-button {
  min-width: 78px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.top-nav-cta {
  color: var(--text);
}

.shell {
  width: min(calc(100% - 48px), var(--shell));
  margin: 20px auto 48px;
}

.shell-home,
.shell-auth,
.shell-browse,
.shell-watch {
  display: grid;
  gap: 28px;
}

.hero-grid,
.content-grid,
.shell-app {
  display: grid;
  gap: 24px;
}

.hero-grid {
  grid-template-columns: 1.8fr 1fr;
}

.content-grid {
  grid-template-columns: 1.8fr 0.9fr;
}

.shell-app {
  grid-template-columns: 220px minmax(0, 1fr) 300px;
  align-items: start;
}

.shell-app-drawer {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.shell-browse {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.shell-watch {
  grid-template-columns: minmax(0, 1.6fr) 360px;
  align-items: start;
}

.hero-panel,
.hero-sidecard,
.panel,
.sidebar,
.auth-panel {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-panel,
.hero-sidecard,
.panel,
.auth-panel {
  padding: 28px;
}

.hero-panel h1,
.auth-copy h1,
.dashboard-hero h1,
.channel-hero h1 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 4vw, 4.1rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-copy,
.auth-copy p,
.dashboard-hero p,
.rail-copy {
  color: var(--muted);
  line-height: 1.7;
}

.eyebrow,
.card-label,
.sidebar-label {
  margin: 0 0 14px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.hero-actions,
.stack-actions,
.dashboard-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #07111e;
  background: linear-gradient(135deg, #80e8ff 0%, #12baff 100%);
}

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

.mini-auth-card h2,
.section-heading h2,
.panel-rail h2,
.empty-state h3 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
}

.plain-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.plain-list li + li {
  margin-top: 10px;
}

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

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

.compact-video-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.video-thumb {
  position: relative;
  min-height: 160px;
  background: linear-gradient(135deg, #18345d 0%, #0c1426 100%);
}

.video-thumb-cyan {
  background: linear-gradient(135deg, rgba(54, 208, 255, 0.5), rgba(8, 18, 35, 0.96));
}

.video-thumb-amber {
  background: linear-gradient(135deg, rgba(255, 186, 73, 0.55), rgba(15, 21, 38, 0.96));
}

.video-thumb-violet {
  background: linear-gradient(135deg, rgba(106, 125, 255, 0.5), rgba(9, 15, 31, 0.96));
}

.video-duration {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text);
  background: rgba(7, 12, 24, 0.7);
}

.video-copy {
  padding: 16px;
}

.video-copy h3,
.channel-row strong {
  margin: 0 0 6px;
  font-size: 1rem;
}

.video-meta,
.video-summary,
.channel-row p,
.form-footnote {
  margin: 0;
  color: var(--muted);
}

.video-summary {
  margin-top: 8px;
  line-height: 1.6;
}

.sidebar {
  padding: 22px 18px;
  position: sticky;
  top: 20px;
}

.browse-pill,
.browse-filter,
.watch-chip,
.player-action {
  display: inline-flex;
  align-items: center;
}

.browse-pill,
.browse-filter,
.watch-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.browse-pill + .browse-pill {
  margin-top: 8px;
}

.browse-main,
.watch-main {
  display: grid;
  gap: 24px;
}

.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  width: 280px;
  height: 100vh;
  padding: 0;
  transform: translateX(-110%);
  transition: transform 180ms ease;
}

.side-drawer.is-open {
  transform: translateX(0);
}

.side-drawer-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(9, 14, 29, 0.96);
  border-radius: 0;
  box-shadow: none;
  padding: 0 14px 18px;
}

.side-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(2, 5, 12, 0.42);
}

.drawer-group {
  display: grid;
  gap: 6px;
}

.drawer-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 67px;
  padding: 12px 10px 12px 4px;
  background: rgba(9, 14, 29, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.drawer-brand {
  min-width: 0;
}

.drawer-toggle {
  flex-shrink: 0;
}

.drawer-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 0 4px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.drawer-scroll:hover {
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

.drawer-divider {
  height: 1px;
  margin: 16px 4px;
  background: rgba(255, 255, 255, 0.07);
}

.drawer-heading,
.drawer-subhead {
  display: block;
  padding: 0 12px;
  color: var(--muted);
}

.drawer-heading {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text);
}

.drawer-subhead {
  font-size: 0.82rem;
  margin: 4px 0 2px;
}

.drawer-item {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
}

.drawer-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.drawer-item-subtle {
  color: var(--muted);
}

.browse-hero,
.watch-meta-panel,
.watch-comments {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 28px;
}

.browse-hero h1,
.watch-meta-panel h1 {
  margin: 0 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.browse-chip-row,
.watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.browse-chip-row-top {
  margin-top: 0;
}

.browse-filter.active {
  color: #07111e;
  background: linear-gradient(135deg, #80e8ff 0%, #12baff 100%);
  border-color: transparent;
}

.browse-shelf {
  display: grid;
  gap: 18px;
}

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

.feed-card {
  display: grid;
  gap: 12px;
}

.feed-thumb {
  display: block;
  min-height: 190px;
  border-radius: 20px;
  overflow: hidden;
}

.feed-body {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.feed-avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #06101c;
  font-weight: 700;
  background: linear-gradient(135deg, #7be4ff 0%, #02b7ff 100%);
}

.feed-copy h3,
.watch-rec-copy strong {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.35;
}

.player-shell,
.watch-rail {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.player-shell {
  overflow: hidden;
}

.player-stage {
  min-height: 520px;
  display: flex;
  align-items: end;
  padding: 28px;
  background:
    radial-gradient(circle at top left, rgba(54, 208, 255, 0.24), transparent 28%),
    linear-gradient(135deg, #11192f 0%, #050a14 100%);
}

.player-stage-copy {
  max-width: 520px;
}

.player-stage-copy h2 {
  margin: 10px 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
}

.player-stage-copy p,
.watch-description {
  color: var(--muted);
  line-height: 1.7;
}

.player-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(54, 208, 255, 0.12);
  border: 1px solid rgba(54, 208, 255, 0.18);
}

.player-controls {
  padding: 18px 22px 20px;
  background: rgba(7, 12, 24, 0.8);
}

.player-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.player-progress-fill {
  display: block;
  width: 28%;
  height: 100%;
  background: linear-gradient(90deg, #80e8ff 0%, #12baff 100%);
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.player-toolbar-left,
.player-toolbar-right,
.comment-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(54, 208, 255, 0.45);
}

.player-time {
  color: var(--muted);
  font-size: 0.92rem;
}

.player-action {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.watch-meta-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.watch-comments {
  display: grid;
  gap: 18px;
}

.comment-form,
.comment-list {
  display: grid;
  gap: 14px;
}

.comment-shell {
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.comment-copy {
  display: grid;
  gap: 4px;
}

.watch-rail {
  padding: 22px;
  display: grid;
  gap: 18px;
}

.watch-recommendations {
  display: grid;
  gap: 14px;
}

.watch-recommendation {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 12px;
}

.watch-rec-thumb {
  min-height: 96px;
  border-radius: 16px;
  overflow: hidden;
}

.watch-rec-copy p {
  margin-top: 6px;
}

.sidebar-section + .sidebar-section {
  margin-top: 24px;
}

.sidebar-link,
.sidebar-chip {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
}

.sidebar-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-chip {
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.main-column {
  display: grid;
  gap: 24px;
}

.dashboard-hero,
.channel-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(25, 35, 66, 0.95), rgba(9, 14, 29, 0.95));
  box-shadow: var(--shadow);
}

.channel-handle {
  margin: -2px 0 10px;
  color: var(--accent);
}

.app-grid {
  display: grid;
  grid-template-columns: 1.7fr 0.9fr;
  gap: 24px;
}

.channel-list,
.action-stack {
  display: grid;
  gap: 14px;
}

.channel-row,
.action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.action-card {
  flex-direction: column;
  align-items: start;
}

.action-card-muted {
  opacity: 0.74;
}

.channel-avatar {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #06101c;
  font-weight: 700;
  background: linear-gradient(135deg, #7be4ff 0%, #02b7ff 100%);
}

.right-rail {
  display: grid;
  gap: 24px;
}

.auth-panel {
  max-width: 980px;
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

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

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-provider-button {
  width: 100%;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-form input,
.auth-form textarea,
.auth-form select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.video-row-copy {
  display: grid;
  gap: 4px;
}

.upload-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.upload-form input[type="file"] {
  width: 100%;
  color: var(--muted);
}

.upload-progress {
  display: grid;
  gap: 8px;
}

.upload-progress-bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.upload-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #80e8ff 0%, #12baff 100%);
}

.upload-progress-text {
  font-size: 0.82rem;
  color: var(--muted);
}

.upload-guidance {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.upload-guidance code,
.form-footnote code {
  padding: 2px 6px;
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text);
  background: rgba(54, 208, 255, 0.12);
  border: 1px solid rgba(54, 208, 255, 0.18);
}

.form-alert {
  padding: 14px 16px;
  border-radius: 16px;
  color: #ffd4de;
  background: rgba(255, 127, 159, 0.12);
  border: 1px solid rgba(255, 127, 159, 0.22);
}

.form-alert-info {
  color: #dff7ff;
  background: rgba(54, 208, 255, 0.12);
  border-color: rgba(54, 208, 255, 0.24);
}

.empty-state {
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
}

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

@media (max-width: 1100px) {
  .shell-app,
  .shell-app-drawer,
  .shell-browse,
  .shell-watch,
  .hero-grid,
  .content-grid,
  .app-grid,
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .right-rail {
    position: static;
  }

  .video-grid,
  .compact-video-grid,
  .feed-grid {
    grid-template-columns: 1fr;
  }

  .watch-recommendation {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    width: 100%;
    padding: 12px 14px;
    flex-direction: column;
    gap: 16px;
  }

  .header-left {
    width: 100%;
    justify-content: flex-start;
  }

  .top-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .header-search {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .shell {
    width: calc(100% - 24px);
    margin-top: 16px;
  }

  .hero-panel,
  .hero-sidecard,
  .panel,
  .auth-panel,
  .dashboard-hero,
  .channel-hero {
    padding: 22px;
  }

  .dashboard-hero,
  .channel-hero {
    flex-direction: column;
    align-items: start;
  }
}

body::-webkit-scrollbar,
.drawer-scroll::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

body::-webkit-scrollbar-track,
.drawer-scroll::-webkit-scrollbar-track {
  background: transparent;
}

body::-webkit-scrollbar-thumb,
.drawer-scroll::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

body:hover::-webkit-scrollbar-thumb,
.drawer-scroll:hover::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
}

body:hover::-webkit-scrollbar-thumb:hover,
.drawer-scroll:hover::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

body:hover::-webkit-scrollbar-track,
.drawer-scroll:hover::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
