:root {
  --ink: #13262c;
  --muted: #68797d;
  --card: #fffdf8;
  --surface: #f1f5f2;
  --red: #d6382f;
  --red-dark: #a92420;
  --teal: #0d8175;
  --blue: #2467c7;
  --line: #d8dfdc;
  --shadow: 0 20px 55px rgba(20, 39, 45, .09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 9% 0, rgba(214, 56, 47, .22), transparent 28%),
    radial-gradient(circle at 90% 6%, rgba(255, 255, 255, .06), transparent 26%),
    linear-gradient(rgba(5, 9, 14, .2), rgba(5, 9, 14, .45)),
    url("../img/youtube-network-bg.png") top left / 627px 627px repeat,
    #070a0d;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 16% 10%, rgba(214, 56, 47, .2), transparent 26%),
    radial-gradient(circle at 84% 14%, rgba(255, 255, 255, .05), transparent 28%),
    linear-gradient(180deg, rgba(4, 7, 11, .08), rgba(4, 7, 11, .34));
  pointer-events: none;
}

button,
input,
select { font: inherit; }

header,
main {
  width: min(1720px, 95vw);
  margin: auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 22px;
  color: rgba(255, 255, 255, .96);
}

header .header-copy,
header p {
  color: rgba(226, 238, 255, .72);
}

header .eyebrow {
  color: rgba(255, 95, 95, .92);
}

.header-actions,
.analyzer-languages { display: flex; align-items: center; gap: 8px; }
.analyzer-languages { padding: 5px; border-radius: 999px; background: rgba(19,39,47,.07); }
.analyzer-languages button { padding: 8px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 800; }
.analyzer-languages button.is-active { background: white; color: var(--teal); }

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  margin: .18rem 0 .35rem;
  font-size: clamp(2.3rem, 4.5vw, 4.7rem);
  letter-spacing: -.055em;
  line-height: .98;
}

.eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .22em;
}

.header-copy {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
}

.quiet,
.pagination button {
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.quiet { padding: 12px 20px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metrics article {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(216, 223, 220, .9);
  border-radius: 22px;
  background: rgba(255, 253, 248, .9);
  box-shadow: var(--shadow);
}

.metrics strong,
.metrics span { display: block; }

.metrics strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.15rem;
  letter-spacing: -.04em;
}

.metrics article > div > span {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
}

.metric-icon {
  position: relative;
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 17px;
  font-size: 1.35rem;
  line-height: 1;
}

.metric-icon i {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  line-height: 1;
}

.metric-icon i::before {
  display: block;
  line-height: 1;
}

.metric-icon-channels { background: #dff2ee; color: var(--teal); }
.metric-icon-videos { background: #ffe3df; color: var(--red); }
.metric-icon-transcripts { background: #e3edff; color: var(--blue); }

.workspace {
  overflow: hidden;
  margin: 20px 0 40px;
  border: 1px solid rgba(216, 223, 220, .95);
  border-radius: 28px;
  background: rgba(255, 253, 248, .9);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.workspace-tabs {
  display: flex;
  gap: 4px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(239, 244, 241, .72);
}

.workspace-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 19px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.workspace-tab.is-active {
  background: var(--ink);
  color: white;
  box-shadow: 0 8px 20px rgba(20, 39, 45, .15);
}

.tab-panel {
  display: none;
  padding: 20px;
}

.tab-panel.is-active {
  display: block;
  animation: panel-in 260ms ease both;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(240px, 330px);
  gap: 12px;
  margin-bottom: 18px;
}

.video-filter-bar {
  grid-template-columns: minmax(280px, 1fr) minmax(235px, 310px) minmax(250px, 330px);
}

.search-field,
.select-field {
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}

.search-field {
  gap: 10px;
  padding: 0 16px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.select-field {
  padding-left: 14px;
}

.select-field span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.select-field select {
  min-width: 0;
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}

.channel-picker-field {
  min-width: 0;
}

.order-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 8px;
  min-width: 0;
}

.order-picker-trigger {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.order-trigger-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: #e3edff;
  color: var(--blue);
}

.order-direction-toggle {
  display: grid;
  width: 52px;
  height: 52px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: 1rem;
}

.video-order-trigger-icon {
  background: #ffe9cf;
  color: #a65e0b;
}

.video-order-direction-toggle {
  background: #a65e0b;
}

.channel-picker-trigger {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 7px 14px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.picker-trigger-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: #ffe3df;
  color: var(--red);
}

.picker-trigger-copy {
  display: block;
  min-width: 0;
}

.picker-trigger-copy small,
.picker-trigger-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-trigger-copy small {
  color: var(--muted);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.picker-trigger-copy strong {
  margin-top: 1px;
  font-size: .86rem;
}

.channel-picker-dialog {
  width: min(680px, calc(100vw - 30px));
  max-height: min(780px, calc(100vh - 30px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  box-shadow: 0 35px 100px rgba(8, 24, 29, .3);
}

.order-picker-dialog {
  width: min(540px, calc(100vw - 30px));
  max-height: min(720px, calc(100vh - 30px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  box-shadow: 0 35px 100px rgba(8, 24, 29, .3);
}

.order-picker-dialog::backdrop {
  background: rgba(13, 31, 36, .58);
  backdrop-filter: blur(7px);
}

.order-picker-modal {
  padding-bottom: 14px;
}

.order-picker-options {
  display: grid;
  gap: 7px;
  padding: 0 14px;
}

.order-picker-option {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 30px;
  grid-template-areas:
    "icon title check"
    "icon copy check";
  align-items: center;
  column-gap: 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.order-picker-option:hover {
  background: white;
}

.order-picker-option.is-selected {
  border-color: rgba(36, 103, 199, .24);
  background: #eaf1fd;
}

.order-picker-option > span {
  display: grid;
  grid-area: icon;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: white;
  color: var(--blue);
}

.order-picker-option strong {
  grid-area: title;
}

.order-picker-option small {
  grid-area: copy;
  color: var(--muted);
  font-size: .73rem;
}

.order-picker-option > i {
  display: grid;
  grid-area: check;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #dfe6e3;
  color: transparent;
  font-size: .7rem;
}

.order-picker-option.is-selected > i {
  background: var(--blue);
  color: white;
}

.channel-picker-dialog::backdrop {
  background: rgba(13, 31, 36, .58);
  backdrop-filter: blur(7px);
}

.picker-modal {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 24px;
  background: #fafaf6;
}

.picker-head {
  width: auto;
  margin: 0;
  padding: 22px 22px 14px;
}

.picker-head h2 {
  margin: 3px 0 0;
  font-size: 1.65rem;
}

.picker-close {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #e9efec;
  color: var(--ink);
  cursor: pointer;
}

.picker-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 22px 14px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--muted);
}

.picker-search input {
  width: 100%;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
}

.channel-picker-options {
  display: grid;
  gap: 7px;
  max-height: min(560px, calc(100vh - 220px));
  padding: 0 14px 16px;
  overflow-y: auto;
}

.channel-picker-option {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.channel-picker-option:hover {
  background: white;
}

.channel-picker-option.is-selected {
  border-color: rgba(13, 129, 117, .28);
  background: #e8f4f1;
}

.channel-picker-option[hidden] {
  display: none;
}

.picker-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: #dce7e5;
  object-fit: cover;
  font-weight: 800;
}

.picker-all {
  border-radius: 15px;
  background: #ffe3df;
  color: var(--red);
}

.picker-channel-copy {
  min-width: 0;
}

.picker-channel-copy strong,
.picker-channel-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-channel-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .75rem;
}

.picker-channel-copy b {
  margin: 0 4px;
  color: #a4afad;
}

.picker-check {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #dfe6e3;
  color: transparent;
  font-size: .72rem;
}

.is-selected .picker-check {
  background: var(--teal);
  color: white;
}

.picker-empty {
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.result-region {
  min-height: 240px;
  transition: opacity 160ms ease;
}

.result-region.is-loading {
  opacity: .45;
  pointer-events: none;
}

.channel-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.channel-row {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.channel-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(20, 39, 45, .09);
}

.channel-banner {
  height: clamp(110px, 10vw, 170px);
  background:
    linear-gradient(120deg, #164257, #2687ae 48%, #31a5c8);
  background-position: center;
  background-size: cover;
}

.channel-content {
  display: block;
  padding: 0 24px 22px;
}

.channel-primary {
  display: flex;
  align-items: flex-end;
  min-width: 0;
}

.channel-avatar {
  width: 116px;
  height: 116px;
  flex: 0 0 116px;
  margin-top: -38px;
  border: 6px solid white;
  border-radius: 50%;
  background: #dce7e5;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(20, 39, 45, .15);
}

.channel-logo-fallback {
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 800;
}

.channel-copy {
  min-width: 0;
  padding: 18px 0 0 18px;
}

.channel-copy h2 {
  overflow: hidden;
  margin: 0;
  font-size: 1.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-handle,
.channel-description {
  color: var(--muted);
}

.channel-handle {
  margin: 2px 0 8px;
  font-size: .82rem;
  font-weight: 700;
}

.channel-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: .8rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.channel-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 16px;
}

.channel-stats div {
  position: relative;
  min-width: 0;
  padding: 12px 10px 11px 34px;
  border-radius: 13px;
  background: var(--surface);
}

.channel-stats i {
  position: absolute;
  top: 15px;
  left: 11px;
  color: var(--teal);
  font-size: .85rem;
}

.channel-stats strong,
.channel-stats span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-stats strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: .98rem;
}

.channel-stats span {
  margin-top: 2px;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 700;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 16px;
}

.video-card { min-width: 0; }

.video-thumbnail {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #172126;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.video-card:hover .video-thumbnail img { transform: scale(1.025); }

.thumbnail-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #b8c1c4;
  font-weight: 700;
}

.duration-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(8, 12, 14, .88);
  color: white;
  font-size: .72rem;
  font-weight: 800;
}

.video-details {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  padding-top: 10px;
}

.video-channel-logo {
  display: grid;
  width: 38px;
  height: 38px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: #dfe8e7;
  font-size: .82rem;
  font-weight: 800;
}

.video-channel-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-info { min-width: 0; }

.video-info h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.7em;
  margin: 0 0 7px;
  font-size: .94rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-info h3 a {
  color: var(--ink);
  text-decoration: none;
}

.video-channel-name,
.video-meta {
  color: var(--muted);
  font-size: .79rem;
  line-height: 1.5;
}

.video-channel-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.transcript-dot {
  padding: 1px 4px;
  border: 1px solid #9da9ac;
  border-radius: 3px;
  font-size: .62rem;
  font-weight: 800;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
}

.pagination button:disabled {
  opacity: .32;
  cursor: default;
}

.pagination span {
  margin: 0 8px;
  color: var(--muted);
  font-size: .82rem;
}

.video-player-dialog { width: min(1050px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 22px; background: transparent; }
.video-player-dialog::backdrop { background: rgba(5,14,18,.78); backdrop-filter: blur(8px); }
.video-player-shell { position: relative; padding: 12px; border-radius: 22px; background: #10191d; color: white; }
.video-embed { overflow: hidden; aspect-ratio: 16/9; border-radius: 14px; background: black; }
.video-embed iframe { width: 100%; height: 100%; border: 0; }
.video-player-shell h3 { margin: 14px 8px 6px; }
.video-player-close { position: absolute; top: -15px; right: -15px; z-index: 2; display: grid; width: 42px; height: 42px; place-items: center; border: 0; border-radius: 50%; background: white; color: #10191d; cursor: pointer; }

.empty-state {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state i { font-size: 1.8rem; }
.empty-state strong { color: var(--ink); }
.video-empty { grid-column: 1 / -1; }

.login-page {
  --login-accent: #ff0033;
  --login-accent-2: #ff6b6b;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--login-accent) 28%, transparent), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(255,255,255,.08), transparent 24%),
    linear-gradient(rgba(5, 12, 22, .18), rgba(5, 12, 22, .38)),
    url("../img/youtube-network-bg.png") top left / 627px 627px repeat,
    #07101b;
  color: #f7fbff;
}

.login-page.instagram-login {
  --login-accent: #d62976;
  --login-accent-2: #f6a400;
}

.login-page.twitter-login {
  --login-accent: #1d9bf0;
  --login-accent-2: #111827;
}

.login-card {
  width: min(480px, 92vw);
  padding: 38px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--login-accent) 18%, transparent), transparent 32%),
    rgba(9, 18, 31, .78);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .38);
  backdrop-filter: blur(18px);
}

.login-brand {
  display: grid;
  justify-items: center;
  gap: 22px;
  margin-bottom: 26px;
  text-align: center;
}

.login-logo {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--login-accent), var(--login-accent-2));
  color: white;
  box-shadow: 0 18px 45px color-mix(in srgb, var(--login-accent) 35%, transparent);
}

.login-logo svg {
  width: 42px;
  height: 42px;
}

.login-card .login-copy h1 {
  margin: 0;
  color: white;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.12;
}

.login-card .login-copy p {
  max-width: 24rem;
  margin: 10px auto 0;
  color: rgba(226, 238, 255, .72);
  font-weight: 700;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-card .login-field {
  position: relative;
  display: block;
  margin: 0;
}

.login-field-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: rgba(247,251,255,.7);
  transform: translateY(-50%);
  pointer-events: none;
}

.login-field-icon svg {
  width: 18px;
  height: 18px;
}

.login-card .login-field input {
  margin-top: 0;
  padding-left: 48px;
}

.login-card form ul,
.login-card .errorlist {
  list-style: none;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(239, 68, 68, .28);
  border-radius: 14px;
  background: rgba(239, 68, 68, .1);
  color: #fecaca;
  font-weight: 800;
}

.login-card .eyebrow {
  color: var(--login-accent);
}

.login-card h1 {
  margin: 8px 0;
  color: white;
  font-size: 2.8rem;
}

.login-card p {
  margin: 0 0 24px;
  color: rgba(226, 238, 255, .72);
  font-weight: 700;
}

.login-card label {
  display: block;
  margin: 18px 0 6px;
  color: rgba(247,251,255,.88);
  font-weight: 800;
}

.login-card input {
  width: 100%;
  margin-top: 8px;
  padding: 15px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  color: white;
  outline: 0;
}

.login-card input:focus {
  border-color: color-mix(in srgb, var(--login-accent) 70%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--login-accent) 18%, transparent);
}

.login-card button[type="submit"] {
  width: 100%;
  margin-top: 18px;
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--login-accent), var(--login-accent-2));
  color: white;
  font-weight: 900;
  box-shadow: 0 16px 35px color-mix(in srgb, var(--login-accent) 28%, transparent);
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1440px) {
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .channel-list { grid-template-columns: 1fr; }
  .video-filter-bar { grid-template-columns: 1fr 1fr; }
  .video-filter-bar .search-field { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: 1fr; }
  .video-filter-bar { grid-template-columns: 1fr; }
  .video-filter-bar .search-field { grid-column: auto; }
  .channel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  header { align-items: flex-start; }
  h1 { font-size: 2.4rem; }
  .header-copy { display: none; }
  .metrics { grid-template-columns: 1fr; }
  .workspace { border-radius: 20px; }
  .tab-panel { padding: 12px; }
  .video-grid { grid-template-columns: 1fr; }
  .channel-banner { height: 105px; }
  .channel-content { padding: 0 14px 16px; }
  .channel-avatar { width: 90px; height: 90px; flex-basis: 90px; }
  .channel-copy { padding-left: 10px; }
  .channel-copy h2 { font-size: 1.2rem; }
}
