@import url("https://fonts.googleapis.com/css2?family=Silkscreen:wght@400;700&display=swap");

:root {
  color-scheme: light;
  --bg: #fff;
  --panel: #fff;
  --panel-soft: #f8f8f8;
  --panel-hover: #f2f2f2;
  --line: #e9e9e9;
  --text: #0f0f0f;
  --muted: #606060;
  --subtle: #909090;
  --accent: #ff0033;
  --accent-dark: #d9002b;
  --sidebar-width: 240px;
  --header-height: 56px;
  font-family: Roboto, "Arial", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: #fcfcfc; color: var(--text); }
button, input, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #1a73e8; outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.nav-link .icon, .icon-button .icon, .sidebar-section-title .icon, .player-action .icon, .button .icon { stroke-width: 1.85; }

.topbar { position: fixed; z-index: 60; inset: 0 0 auto; display: grid; grid-template-columns: 1fr minmax(280px, 1.35fr) 1fr; align-items: center; height: var(--header-height); padding: 0 24px; border-bottom: 1px solid #f1f1f1; background: #fff; box-shadow: none; }
.topbar-left, .topbar-actions, .search-area { display: flex; align-items: center; }
.topbar-left { justify-self: start; gap: 15px; min-width: 0; }
.icon-button { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #0f0f0f; cursor: pointer; transition: background .16s ease; }
.icon-button:hover { background: #f2f2f2; }
.icon-button .icon { width: 23px; height: 23px; }
.menu-button { width: 40px; height: 40px; margin-left: -9px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; width: auto; min-width: 0; height: 39px; overflow: visible; }
.brand img { display: block; flex: 0 0 auto; width: 32px; height: 32px; object-fit: contain; }
.brand-title { color: #0f0f0f; font-family: "Silkscreen", "Courier New", monospace; font-size: 17px; font-weight: 750; letter-spacing: 0; }
.search-area { justify-self: center; gap: 15px; width: min(100%, 650px); }
.search-form { display: flex; flex: 1; align-items: center; height: 40px; overflow: hidden; border: 1px solid #c6c6c6; border-radius: 22px; background: #fff; box-shadow: inset 0 1px 2px rgba(0,0,0,.04); transition: border-color .15s, box-shadow .15s; }
.search-form:focus-within { border-color: #1c62b9; box-shadow: inset 1px 0 #1c62b9; }
.search-form input { flex: 1; width: 0; height: 100%; padding: 0 0 0 19px; border: 0; outline: 0; background: transparent; color: #0f0f0f; font-size: 16px; }
.search-form input::placeholder { color: #888; }
.search-form input::-webkit-search-cancel-button { cursor: pointer; }
.search-submit { display: grid; flex: 0 0 64px; height: 100%; place-items: center; border: 0; border-left: 1px solid #d3d3d3; background: #f8f8f8; color: #222; cursor: pointer; transition: background .15s; }
.search-submit:hover { background: #f0f0f0; }
.search-submit .icon { width: 22px; height: 22px; stroke-width: 1.8; }
.microphone-button { width: 40px; height: 40px; background: #f2f2f2; }
.microphone-button:hover { background: #e5e5e5; }
.microphone-button.is-listening { background: #ffe3e9; color: #c6002e; box-shadow: 0 0 0 3px rgba(198, 0, 46, .12); }
.microphone-button .icon { width: 20px; height: 20px; }
.microphone-button .pixel-microphone { shape-rendering: crispEdges; stroke-linecap: square; stroke-linejoin: miter; }
.topbar-actions { justify-self: end; gap: 10px; }
.create-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 13px; border: 0; border-radius: 20px; background: #f2f2f2; color: #0f0f0f; font-size: 14px; font-weight: 550; cursor: pointer; transition: background .16s ease; }
.create-button:hover { background: #e5e5e5; }
.create-button .icon { width: 20px; height: 20px; stroke-width: 2; }
.notification-dot { position: absolute; top: 5px; right: 4px; width: 8px; height: 8px; border: 1.5px solid #fff; border-radius: 50%; background: #c00; }
.profile-button { display: grid; place-items: center; align-items: center; justify-items: center; width: 40px; height: 40px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #0f0f0f; line-height: 0; cursor: pointer; }
.profile-button:hover { background: #f2f2f2; }
.profile-button .icon { display: block; width: 21px; height: 21px; margin: 0; line-height: 1; }
.mobile-scrim { display: none; }

.sidebar { position: fixed; z-index: 45; inset: var(--header-height) auto 0 0; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 5px 12px 18px; overflow-x: hidden; overflow-y: auto; background: #fff; transition: width .18s ease, transform .2s ease; }
.primary-nav { display: grid; gap: 3px; }
.nav-link { display: flex; align-items: center; gap: 23px; width: 100%; min-height: 42px; padding: 0 12px; overflow: hidden; border: 0; border-radius: 10px; background: #fff; color: #0f0f0f; text-align: left; white-space: nowrap; cursor: pointer; transition: background .14s ease; }
div.nav-link { cursor: default; background: transparent; }
.nav-link:hover { background: #f2f2f2; }
div.nav-link:hover { background: transparent; }
.nav-link.is-active { background: #f2f2f2; font-weight: 650; }
.nav-link .icon { width: 24px; height: 24px; padding: 0; border-radius: 0; background: transparent; color: currentColor; stroke-width: 1.85; }
.nav-link .icon,
.nav-link i,
.sidebar-section-title .icon,
.sidebar-section-title i { display: grid; place-items: center; }
.nav-link:hover .icon, .nav-link.is-active .icon { background: transparent; color: currentColor; }
.conversations-nav .nav-link,
.conversations-nav .nav-link:hover,
.conversations-nav .nav-link:focus-visible,
.conversations-nav .nav-link.is-active { background: transparent; }
.conversations-nav .nav-link .icon,
.conversations-nav .nav-link:hover .icon,
.conversations-nav .nav-link.is-active .icon { background: transparent; border-radius: 0; color: currentColor; }
.nav-link > span { overflow: hidden; font-size: 14px; text-overflow: ellipsis; }
.nav-count { margin-left: auto; color: #777; font-size: 11px !important; }
.sidebar-divider { flex: 0 0 1px; height: 1px; margin: 12px 0; background: #e5e5e5; }
.sidebar-section-title { display: flex; align-items: center; gap: 5px; width: 100%; min-height: 38px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: #0f0f0f; font-size: 16px; font-weight: 650; text-align: left; cursor: pointer; }
.sidebar-section-title:hover { background: #f2f2f2; }
.sidebar-section-title .icon { width: 17px; height: 17px; }
.sidebar-following-heading { display: flex; align-items: center; justify-content: space-between; min-height: 31px; padding-left: 12px; }
.sidebar-label { display: none; }
.sidebar-label .icon { width: 18px; height: 18px; margin-left: -2px; }
.text-icon-button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: #606060; cursor: pointer; }
.text-icon-button:hover { background: #f2f2f2; color: #0f0f0f; }
.text-icon-button .icon { width: 17px; height: 17px; }
.sidebar-creators { display: grid; gap: 1px; }
.sidebar-creator { display: flex; align-items: center; gap: 20px; width: 100%; min-height: 42px; padding: 0 12px; overflow: hidden; border: 0; border-radius: 9px; background: transparent; color: #0f0f0f; font-size: 13px; text-align: left; white-space: nowrap; cursor: pointer; }
.sidebar-creator:hover { background: #f2f2f2; }
.sidebar-creator img { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: #eee; }
.sidebar-creator > span:not(.creator-live-dot) { overflow: hidden; text-overflow: ellipsis; }
.creator-live-dot { flex: 0 0 7px; width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #f03; }
.sidebar-empty { padding: 5px 12px; color: #717171; font-size: 11px; }
.sidebar-bottom { margin-top: auto; padding: 14px 10px 0; }
.sidebar-legal { margin: 0; color: #606060; font-size: 11px; line-height: 1.8; }
.sidebar-legal::first-line { color: #606060; }
.sidebar-legal a:hover { color: #0f0f0f; text-decoration: underline; text-underline-offset: 2px; }

.main-layout { min-height: 100vh; margin-left: var(--sidebar-width); padding-top: var(--header-height); transition: margin-left .18s ease; }
.page-content { width: 100%; max-width: 1840px; margin: 0 auto; padding: 0 36px 48px; }
.category-row { position: sticky; z-index: 35; top: var(--header-height); display: flex; gap: 10px; min-height: 64px; margin: 0 -36px 28px; padding: 12px 36px; overflow-x: auto; border-bottom: 1px solid #eeeeee; background: rgba(252,252,252,.94); backdrop-filter: blur(10px); }
.category-chip { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 12px; border: 1px solid transparent; border-radius: 18px; background: transparent; color: #4f5d62; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background .14s, color .14s, border-color .14s; }
.category-chip .icon, .category-chip i { display: grid; place-items: center; width: 18px; height: 18px; min-width: 18px; line-height: 1; font-size: 18px; }
.category-chip .icon::before, .category-chip i::before { display: block; }
.category-chip[data-category="Live"] .icon { color: #778e96; }
.category-chip:hover { background: rgba(112,158,176,.1); }
.category-chip.is-active { border-color: rgba(94,142,160,.12); background: rgba(112,158,176,.17); color: #294a56; font-weight: 600; }
.feed-section { min-height: 170px; }
.feed-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.feed-heading h1, .feed-heading h2 { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 680; letter-spacing: -.2px; }
.feed-title-wrap { display: flex; align-items: center; gap: 8px; }
.feed-title-icon { width: 20px; height: 20px; color: #6f9bab; stroke-width: 1.9; }
.feed-subtitle { margin: 0; color: #606060; font-size: 12px; font-weight: 400; }
.feed-heading > .feed-subtitle { display: none; }
.see-all-button { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 8px; border: 0; border-radius: 18px; background: transparent; color: #0f0f0f; font-size: 13px; cursor: pointer; }
.see-all-button:hover { background: #f2f2f2; }
.see-all-button .icon { width: 17px; height: 17px; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 42px 20px; }
.video-card { min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; animation: card-in .25s ease both; }
.video-card:hover { background: transparent; }
.thumbnail-wrap { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 16px; background: linear-gradient(135deg, var(--card-accent, #89c9ff), rgba(255,255,255,.22)); isolation: isolate; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.thumbnail-wrap::before { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, rgba(255,255,255,.24), rgba(255,255,255,0)); opacity: .25; content: ""; }
.thumbnail-wrap.is-watched::after { position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(0,0,0,.08); border-radius: inherit; content: ""; }
.thumbnail-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumbnail-play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; border: 0; border-radius: inherit; background: transparent; cursor: pointer; transition: background .2s ease; }
.thumbnail-play:hover, .thumbnail-play:focus-visible { background: rgba(0,0,0,.06); }
.thumbnail-hover-mark { display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(2px); box-shadow: 0 10px 26px rgba(48,39,66,.16), inset 0 1px 0 rgba(255,255,255,.42); opacity: 0; transform: scale(.9); transition: opacity .2s ease, transform .2s ease; }
.thumbnail-hover-mark .icon { width: 24px; height: 24px; fill: currentColor; stroke: none; transform: translateX(1px); }
.video-card:hover .thumbnail-hover-mark, .thumbnail-play:focus-visible .thumbnail-hover-mark { opacity: 1; transform: scale(1); }
.duration-badge { position: absolute; right: 7px; bottom: 7px; padding: 3px 5px; border-radius: 6px; background: rgba(15,15,15,.82); color: #fff; font-size: 11px; font-weight: 560; font-variant-numeric: tabular-nums; }
.live-badge { position: absolute; top: 9px; left: 9px; display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 8px; border-radius: 8px; background: rgba(255,255,255,.94); color: #282828; font-size: 9px; font-weight: 750; letter-spacing: .45px; box-shadow: 0 1px 4px rgba(0,0,0,.13); }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #e45757; box-shadow: 0 0 0 3px rgba(228,87,87,.13); }
.card-save { position: absolute; top: 9px; right: 9px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 13px; background: rgba(20,20,20,.76); color: #fff; opacity: 0; cursor: pointer; transition: opacity .16s, color .16s, background .16s; }
.video-card:hover .card-save, .card-save:focus-visible, .card-save.is-saved { opacity: 1; }
.card-save.is-saved { color: #fff; background: #454545; }
.card-save .icon { width: 19px; height: 19px; stroke-width: 1.8; }
.card-save.is-saved .icon { fill: rgba(255,255,255,.94); }
.watched-progress { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: rgba(255,255,255,.35); }
.watched-progress i { display: block; width: 36%; height: 100%; background: #f03; }
.card-content { display: flex; gap: 12px; padding-top: 12px; }
.card-avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #eee; }
.card-copy { min-width: 0; flex: 1; }
.card-more { display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; margin: -4px -7px 0 0; border: 0; border-radius: 12px; background: transparent; color: #606060; opacity: 0; cursor: pointer; }
.video-card:hover .card-more, .card-more:focus-visible { opacity: 1; }
.card-more:hover { border-radius: 12px; background: #f2f2f2; }
.card-more .icon { width: 20px; height: 20px; }
.card-title-button { display: -webkit-box; width: 100%; padding: 0; overflow: hidden; border: 0; background: transparent; color: #0f0f0f; font-size: 15px; line-height: 1.38; font-weight: 650; text-align: left; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; cursor: pointer; }
.card-title-button:hover { color: #303030; }
.card-creator { display: flex; align-items: center; gap: 4px; max-width: 100%; margin: 6px 0 0; padding: 0; overflow: hidden; border: 0; background: transparent; color: #606060; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.card-creator:hover { color: #0f0f0f; }
.card-creator:not(button) { cursor: default; }
.card-verified { display: inline-grid; place-items: center; width: 12px; height: 12px; border-radius: 50%; background: #606060; color: white; font-size: 8px; font-weight: 750; }
.card-stats { margin: 3px 0 0; color: #606060; font-size: 13px; line-height: 1.5; }
.empty-state { margin-top: 4px; padding: 72px 18px 78px; border: 1px dashed #dcdcdc; border-radius: 16px; background: linear-gradient(180deg, #fff, #fafafa); text-align: center; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 16px; border-radius: 50%; background: #f2f2f2; color: #606060; }
.empty-icon .icon { width: 23px; height: 23px; }
.empty-state h2 { margin: 0; font-size: 19px; font-weight: 650; }
.empty-state p { margin: 8px 0 18px; color: #606060; font-size: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .16s, background .16s, border-color .16s; }
.button:hover:not(.follow-button):not(.button-follow) { transform: translateY(-1px); }
.button .icon { width: 17px; height: 17px; }
.button-primary { background: #0f0f0f; color: #fff; }
.button-primary:hover { background: #333; }
.button-secondary { border-color: #d3d3d3; background: #fff; color: #0f0f0f; }
.button-secondary:hover { background: #f2f2f2; }

.app-dialog { width: min(900px, calc(100vw - 36px)); max-height: min(760px, calc(100vh - 36px)); padding: 0; overflow: auto; border: 0; border-radius: 14px; background: #fff; color: #0f0f0f; box-shadow: 0 18px 65px rgba(0,0,0,.28); }
.app-dialog::backdrop { background: rgba(0,0,0,.58); backdrop-filter: blur(2px); }
.dialog-topline { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; border-bottom: 1px solid #e5e5e5; }
.dialog-brand { display: flex; align-items: center; width: 93px; height: 35px; }
.dialog-brand img { max-width: 100%; max-height: 32px; object-fit: contain; object-position: left; }
.dialog-close { width: 36px; height: 36px; }
.player-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(230px, .8fr); gap: 0; }
.player-screen-wrap { position: relative; display: grid; min-height: 290px; place-items: center; overflow: hidden; background: #0f0f0f; }
.player-screen { display: block; width: 100%; max-height: min(62vh, 550px); aspect-ratio: 16 / 9; background: #0f0f0f; object-fit: contain; }
.player-error { position: absolute; right: 20px; bottom: 16px; left: 20px; padding: 11px 13px; border-radius: 8px; background: rgba(15,15,15,.9); color: #fff; font-size: 13px; text-align: center; }
.player-info { padding: 23px 20px 20px; }
.player-info h2 { margin: 8px 0 0; font-size: 19px; line-height: 1.3; font-weight: 650; }
.player-meta-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.player-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: #8ab4f8 center / cover; color: #fff; font-size: 13px; font-weight: 700; }
.player-author { flex: 1; min-width: 0; }
.player-author strong, .player-author span { display: block; }
.player-author strong { font-size: 13px; font-weight: 650; }
.player-author span { margin-top: 4px; color: #606060; font-size: 11px; }
.player-meta-row .button-follow { min-height: 32px; }
.player-description { min-height: 39px; margin: 17px 0 0; color: #606060; font-size: 13px; line-height: 1.6; }
.player-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; padding-top: 13px; border-top: 1px solid #e5e5e5; }
.player-action { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 18px; background: #f2f2f2; color: #0f0f0f; font-size: 12px; cursor: pointer; }
.player-action:hover, .player-action.is-active { background: #e5e5e5; }
.player-action.is-active:has(use[href="#icon-heart"]) .icon { fill: #e66a76; stroke: #e66a76; }
.player-action.is-active:has(use[href="#icon-bookmark"]) .icon { fill: #8b9db3; stroke: #8b9db3; }
.player-action .icon { width: 17px; height: 17px; }
.player-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 20px; padding: 11px; border-radius: 8px; background: #f7f7f7; color: #606060; font-size: 11px; line-height: 1.5; }
.player-note .icon { width: 15px; height: 15px; color: #8494ac; }
.upload-dialog { width: min(500px, calc(100vw - 32px)); }
.upload-content { padding: 25px 28px 28px; }
.upload-content h2 { margin: 7px 0 0; font-size: 24px; font-weight: 650; letter-spacing: -.3px; }
.upload-intro { margin: 8px 0 22px; color: #606060; font-size: 13px; }
#upload-form { display: grid; }
.field-label { margin: 0 0 7px; color: #303030; font-size: 13px; font-weight: 600; }
.text-field { width: 100%; min-height: 41px; margin-bottom: 16px; padding: 0 11px; border: 1px solid #d3d3d3; border-radius: 5px; outline: none; background: #fff; color: #0f0f0f; font-size: 13px; }
.text-field::placeholder { color: #777; }
.text-field:focus { border-color: #1a73e8; }
.text-field option { background: #fff; color: #0f0f0f; }
.optional-label { color: #777; font-weight: 400; }
.file-drop { display: grid; justify-items: center; gap: 7px; min-height: 100px; margin-bottom: 9px; padding: 15px; border: 1px dashed #bcbcbc; border-radius: 8px; background: #fafafa; color: #404040; font-size: 12px; text-align: center; cursor: pointer; }
.file-drop:hover { border-color: #606060; background: #f4f4f4; }
.file-drop .icon { width: 21px; height: 21px; color: #606060; }
.file-drop small { color: #777; font-size: 11px; }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.local-notice { margin: 2px 0 18px; color: #777; font-size: 11px; }
.upload-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; z-index: 100; right: auto; bottom: 22px; left: 50%; max-width: min(360px, calc(100vw - 36px)); padding: 12px 18px; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; background: #484848; color: #fff; font-size: 13px; box-shadow: 0 8px 28px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transform: translateX(-50%); transition: opacity .18s ease; }
.toast.is-visible { opacity: 1; }
.toast.is-leaving { opacity: 0; }

body.sidebar-collapsed .sidebar { width: 82px; padding: 5px 4px 18px; }
body.sidebar-collapsed .main-layout { margin-left: 82px; }
body.sidebar-collapsed .nav-link { flex-direction: column; justify-content: center; gap: 6px; min-height: 74px; padding: 8px 2px; border-radius: 10px; }
body.sidebar-collapsed .nav-link .icon { width: 24px; height: 24px; }
body.sidebar-collapsed .nav-link > span { display: block; max-width: 74px; font-size: 10px; line-height: 1.2; text-align: center; }
body.sidebar-collapsed .conversations-nav { display: none; }
body.sidebar-collapsed  .sidebar-section-title, body.sidebar-collapsed .sidebar-following-heading, body.sidebar-collapsed .library-nav, body.sidebar-collapsed .sidebar-divider:not(:first-of-type), body.sidebar-collapsed .sidebar-bottom, body.sidebar-collapsed .sidebar-creators, body.sidebar-collapsed .sidebar-label { display: none; }
body.sidebar-collapsed .category-row, body.sidebar-collapsed .feed-heading, body.sidebar-collapsed .duration-badge, body.sidebar-collapsed .card-content { display: none; }
body.sidebar-collapsed .sidebar-divider { margin: 10px 12px; }

@keyframes card-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1700px) {
  .video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-content { padding-right: 38px; padding-left: 38px; }
  .category-row { margin-right: -38px; margin-left: -38px; padding-right: 38px; padding-left: 38px; }
}
@media (min-width: 2150px) {
  .video-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1400px) {
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .creator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-shorts-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  :root { --sidebar-width: 82px; }
  .sidebar { width: 82px; padding-right: 4px; padding-left: 4px; }
  .nav-link { flex-direction: column; justify-content: center; gap: 6px; min-height: 74px; padding: 8px 2px; border-radius: 10px; }
  .nav-link .icon { width: 24px; height: 24px; }
  .nav-link > span { display: block; max-width: 74px; font-size: 10px; line-height: 1.2; text-align: center; }
  .sidebar-section-title, .sidebar-following-heading, .library-nav, .sidebar-creators, .sidebar-bottom, .sidebar-label { display: none; }
  .duration-badge { display: none; }
  .sidebar-divider { margin: 10px 12px; }
  body.sidebar-collapsed .sidebar { width: 240px; padding: 5px 12px 18px; }
  body.sidebar-collapsed .main-layout { margin-left: 0; }
  body.sidebar-collapsed .conversations-nav { display: grid; }
  body.sidebar-collapsed .nav-link { flex-direction: row; justify-content: flex-start; gap: 23px; min-height: 42px; padding: 0 12px; }
  body.sidebar-collapsed .nav-link > span { display: block; max-width: none; font-size: 14px; text-align: left; }
  body.sidebar-collapsed .sidebar-section-title, body.sidebar-collapsed .library-nav, body.sidebar-collapsed .conversations-nav { display: flex; }
  body.sidebar-collapsed .sidebar-following-heading, body.sidebar-collapsed .sidebar-creators, body.sidebar-collapsed .sidebar-bottom { display: initial; }
  body.sidebar-collapsed .sidebar-following-heading { display: flex; }
  body.sidebar-collapsed .sidebar-creators { display: grid; }
  body.sidebar-collapsed .sidebar-bottom { display: block; }
  body.sidebar-collapsed .sidebar-divider { margin: 12px 0; }
  body.sidebar-collapsed .sidebar-divider:not(:first-of-type) { display: block; }
  .home-shorts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --header-height: 54px; }
  .topbar { grid-template-columns: 1fr auto; gap: 8px; padding: 0 12px; }
  .topbar-left { gap: 8px; }
  .menu-button { display: grid; }
  .brand { flex-basis: auto; width: auto; }
  .brand img { width: 29px; height: 29px; max-height: none; }
  .brand-title { font-size: 16px; }
  .search-area { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .topbar { height: 104px; grid-template-rows: 48px 44px; }
  .search-form { height: 38px; }
  .search-form input { padding-left: 14px; font-size: 14px; }
  .search-submit { flex-basis: 54px; }
  .microphone-button { display: none; }
  .topbar-actions { grid-column: 2; grid-row: 1; gap: 5px; }
  .icon-button { width: 37px; height: 37px; }
  .create-button { min-height: 34px; padding: 0 10px; font-size: 12px; }
  .notification-button { width: 35px; }
  .profile-button { width: 35px; }
  .sidebar { z-index: 70; inset: 104px auto 0 0; width: 250px; padding: 5px 12px 18px; transform: translateX(-101%); box-shadow: 8px 0 26px rgba(0,0,0,.08); transition: transform .22s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar .nav-link { flex-direction: row; justify-content: flex-start; gap: 20px; min-height: 43px; padding: 0 12px; }
  .sidebar .nav-link > span { display: block; max-width: none; font-size: 14px; text-align: left; }
  .sidebar .sidebar-section-title, .sidebar .library-nav, .sidebar .conversations-nav { display: flex; }
  .sidebar .sidebar-bottom { display: block; }
  .sidebar .sidebar-section-title { display: flex; }
  .sidebar .sidebar-following-heading { display: flex; }
  .sidebar .sidebar-creators { display: grid; }
  .sidebar .sidebar-divider { margin: 12px 0; }
  .mobile-scrim.is-visible { position: fixed; z-index: 65; inset: 104px 0 0; display: block; background: rgba(0,0,0,.28); }
  .main-layout, body.sidebar-collapsed .main-layout { margin-left: 0; padding-top: 104px; }
  .sidebar-collapsed .sidebar { width: 250px; transform: translateX(-101%); }
  .sidebar-collapsed .sidebar.is-open { transform: translateX(0); }
  .page-content { padding: 0 17px 28px; }
  .category-row { top: 104px; gap: 9px; min-height: 57px; margin: 0 -17px 19px; padding: 11px 17px; }
  .category-chip { min-height: 31px; padding: 0 11px; font-size: 13px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .thumbnail-wrap { border-radius: 10px; }
  .card-content { gap: 9px; padding-top: 9px; }
  .card-avatar { width: 31px; height: 31px; }
  .card-title-button { font-size: 13px; line-height: 1.35; }
  .card-creator, .card-stats { font-size: 11px; }
  .card-verified { width: 11px; height: 11px; }
  .card-save { top: 7px; right: 7px; opacity: 1; width: 29px; height: 29px; border-radius: 11px; }
  .card-save .icon { width: 16px; height: 16px; }
  .card-more { width: 24px; margin-right: -4px; opacity: 1; }
  .feed-heading { margin-bottom: 16px; }
  .feed-heading h1, .feed-heading h2 { font-size: 18px; }
  .home-shorts-section, .creators-section { margin-top: 32px; padding-top: 18px; }
  .home-shorts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .home-short-card { border-radius: 10px; }
  .creator-grid { grid-template-columns: 1fr; gap: 8px; }
  .creator-card { padding: 10px; }
  .player-layout { grid-template-columns: 1fr; }
  .player-screen-wrap { min-height: 0; }
  .player-screen { max-height: 36vh; }
  .player-info { padding: 15px 16px 18px; }
  .player-info h2 { font-size: 17px; }
  .app-dialog { max-height: calc(100dvh - 24px); }
  .upload-content { padding: 21px 19px 22px; }
}
@media (max-width: 430px) {
  .topbar { padding: 0 8px; }
  .brand { flex-basis: auto; width: auto; }
  .brand img { width: 26px; height: 26px; }
  .brand-title { font-size: 15px; }
  .topbar-actions { gap: 1px; }
  .create-button { min-height: 32px; padding: 0 8px; font-size: 11px; }
  .notification-button { width: 32px; }
  .profile-button { width: 31px; }
  .page-content { padding-right: 13px; padding-left: 13px; }
  .category-row { margin-right: -13px; margin-left: -13px; padding-right: 13px; padding-left: 13px; }
  .video-grid { gap: 24px 9px; }
  .thumbnail-wrap { border-radius: 8px; }
  .card-content { gap: 7px; }
  .card-avatar { width: 27px; height: 27px; }
  .card-title-button { font-size: 12px; }
  .card-creator, .card-stats { font-size: 10px; }
  .duration-badge { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
