@import url('/theme.css');

:root { --nav-height: 0px; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { font-size: 14px; line-height: 1.5; }
.app { position: relative; height: 100dvh; width: 100%; margin: 0 auto; background: var(--bg); }
.feed { height: calc(100dvh - var(--nav-height)); overflow-y: auto; scrollbar-width: none; scroll-snap-type: y mandatory; overscroll-behavior: contain; }
.feed::-webkit-scrollbar { display: none; }
.item { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: var(--bg); }
.bg { position: absolute; inset: -24px; background-position: center; background-size: cover; filter: blur(32px) brightness(.4); }
.stage { position: absolute; inset: 0; display: grid; place-items: center; }
.stage video { width: 100%; height: 100%; object-fit: contain; }
.item.cover video { object-fit: cover; }
.shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, #0003 0%, transparent 30%, #070c0940 55%, #070c09d9 78%, #070c09f5 100%); }
.topbar { position: absolute; inset: 0 0 auto; z-index: 5; display: flex; align-items: center; gap: 20px; padding: calc(18px + env(safe-area-inset-top)) 22px 18px; background: linear-gradient(#0007, transparent); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.menu-trigger { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; background: var(--accent); background-image: var(--accent-gradient); color: var(--ink); font-size: 12px; font-weight: 800; } .menu-trigger svg { width: 19px; height: 19px; }
.ui { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.ui button { pointer-events: auto; }
.info { position: absolute; left: 22px; right: 22px; bottom: 24px; }
.info .eyebrow { margin: 0 0 10px; }
.title { font-size: 27px; line-height: 1.2; font-weight: 800; letter-spacing: -.8px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: 7px 0 14px; font-size: 11px; color: #bcc5b8; }
.video-duration { font-variant-numeric: tabular-nums; flex-shrink: 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags button { background: transparent; padding: 0; color: #c0cabc; font-size: 11px; }
.tags button:hover { color: var(--accent); }
.tags-off .tags { display: none; }
.react { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 15px; border-top: 1px solid #ffffff25; }
.r { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 68px; padding: 9px; border: 1px solid #ffffff20; border-radius: 13px; background: #ffffff09; color: #d3dbcf; transition: background .18s, border-color .18s; }
.reaction-emoji { font-size: 25px; line-height: 1; }
.reaction-label { font-size: 10px; font-weight: 700; letter-spacing: .2px; }
.r:hover { background: #ffffff12; border-color: #ffffff40; }
.r:active { transform: scale(.98); }
.r.on { border-color: var(--accent); }
.side { position: absolute; right: 22px; bottom: 235px; display: flex; flex-direction: column; gap: 10px; }
.s-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #ffffff30; background: #111b1680; backdrop-filter: blur(10px); }
.s-btn svg { width: 20px; height: 20px; }
.s-btn:hover { background: #ffffff18; }
.feed:not(.tags-off) .tgl { color: var(--accent); border-color: #a1c4fd60; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #ffffff15; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); background-image: var(--accent-gradient); }
.flash { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.flash svg { width: 62px; height: 62px; padding: 17px; border-radius: 50%; background: #10131190; opacity: 0; }
.flash.show svg { animation: flash .5s ease-out; }
@keyframes flash { 20%, 55% { opacity: 1; } 100% { opacity: 0; } }
.spin { display: block; width: 22px; height: 22px; border: 2px solid #ffffff25; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-v { position: absolute; inset: 0; display: none; place-items: center; pointer-events: none; }
.item.buffering .spinner-v { display: grid; }
.loader { position: absolute; z-index: 4; inset: auto 0 calc(var(--nav-height) + 225px); display: flex; justify-content: center; pointer-events: none; }
.play-retry { position: absolute; z-index: 3; top: 45%; left: 50%; transform: translate(-50%, -50%); max-width: 260px; background: var(--card); border: 1px solid var(--line); padding: 15px 18px; border-radius: 13px; font-size: 12px; }
.navigation-dialog { margin: auto auto 0; border-radius: 26px 26px 0 0; padding: 24px 10px calc(12px + env(safe-area-inset-bottom)); } .nav { display: flex; height: 64px; }
.nav button { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: none; color: #7c867d; font-size: 10px; line-height: 1; }
.nav svg { width: 22px; height: 22px; }
.nav .selected { color: var(--accent); }
.nav button:not(.selected):hover { color: #d0d8c9; }
.feed-nav, .desktop-hint { display: none; }
.end-banner { position: absolute; z-index: 4; left: 22px; right: 22px; top: calc(82px + env(safe-area-inset-top)); display: flex; gap: 12px; align-items: center; width: max-content; max-width: calc(100% - 44px); padding: 7px 12px; border: 1px solid #ffffff20; border-radius: 8px; background: #101311a6; font-size: 10px; color: #c4cebd; backdrop-filter: blur(8px); }
.end-banner button { font-size: 10px; background: none; padding: 0; color: var(--accent); }
.feed-message { position: absolute; inset: 0 0 var(--nav-height); z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 30px; text-align: center; background: var(--bg); }
.feed-message h1, .feed-message h2 { font-size: 27px; font-weight: 800; letter-spacing: -.9px; margin: 0; }
.feed-message p { color: var(--dim); font-size: 13px; line-height: 1.8; max-width: 300px; margin: 0; }
.empty-mark { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 20px; background: #a1c4fd0a; border: 1px solid #a1c4fd30; color: var(--txt); position: relative; font-size: 45px; font-weight: 800; letter-spacing: -5px; margin-bottom: 8px; }
.empty-mark span { position: absolute; right: 9px; bottom: 0; color: var(--accent); font-size: 42px; }
.empty-mark svg { width: 30px; height: 30px; color: var(--accent); }
.subtle, .link { padding: 10px 0; color: #bdc8b6; font-size: 12px; background: none; }
.feed-message .btn { width: 100%; max-width: 290px; margin-top: 10px; }
.card { position: relative; display: flex; flex-direction: column; gap: 16px; }
.x { position: absolute; right: 16px; top: 17px; z-index: 2; }
.card .x { right: -8px; top: -12px; }
.card h2 { margin: 0; }
.card > .eyebrow { margin: 3px 0 -10px; }
.card > .muted { font-size: 13px; line-height: 1.8; margin: -6px 0 0; }
.avatar { display: flex; align-items: center; justify-content: center; width: 62px; height: 62px; border-radius: 20px; border: 1px solid #a1c4fd44; background: #a1c4fd10; font-size: 37px; font-weight: 800; letter-spacing: -2px; color: var(--accent); margin: 6px 0; }
.avatar span { font-size: 25px; align-self: flex-end; padding-bottom: 7px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: #bfc7b8; }
.field input { width: 100%; padding: 14px; min-height: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--txt); font-size: 16px; outline-color: var(--accent); }
.field input::placeholder { color: #87917f; font-size: 13px; }
.card .form-error { margin: 0; }
.card .btn { margin-top: 4px; }
.account-dialog > .eyebrow { margin: 22px 0 8px; }
.account-dialog h2 { margin: 0 0 10px; }
#accountEmail { font-size: 13px; color: #c0cabc; overflow-wrap: anywhere; margin: 0 0 12px; }
.role-label { display: inline-flex; padding: 4px 8px; color: var(--accent); border: 1px solid #a1c4fd30; border-radius: 6px; font-size: 10px; }
.account-action { display: flex; align-items: center; gap: 12px; padding: 20px 0; margin-top: 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; font-size: 13px; }
.account-action > svg:first-child { width: 20px; color: var(--accent); }
.account-action > svg:last-child { margin-left: auto; width: 16px; color: var(--dim); }
.secondary { padding: 14px; width: 100%; border: 1px solid #ffffff25; border-radius: 12px; background: transparent; font-size: 12px; }
.logout { margin-top: 24px; color: #d4a499; }
.search-dialog { height: min(720px, 88dvh); padding: 28px 20px 20px; }
.search-dialog[open] { display: flex; flex-direction: column; }
.search-dialog h2 { font-size: 25px; margin: 10px 50px 20px 2px; }
.search-bar { display: flex; gap: 10px; align-items: center; }
#searchClose { position: absolute; right: 16px; top: 24px; width: 38px; height: 38px; }
.search-field { display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--dim); }
.search-field svg { width: 19px; }
.search-field input { width: 100%; min-width: 0; height: 48px; border: 0; background: none; color: var(--txt); font-size: 14px; outline: none; }
.search-field:focus-within { border-color: #a1c4fd70; }
.search-hint { margin: 14px 2px 18px; color: var(--dim); font-size: 11px; }
.grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 12px; }
.tile { position: relative; aspect-ratio: 9 / 13; padding: 0; overflow: hidden; border-radius: 12px; background: var(--bg); text-align: left; }
.tile img { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; }
.tile::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, #070c09ef); }
.tile span { position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 14px; font-size: 12px; line-height: 1.4; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 700px) {
  body { background: radial-gradient(ellipse at 30% 20%, #222b20 0, var(--bg) 65%); }
  .app { width: 470px; border-left: 1px solid #ffffff12; border-right: 1px solid #ffffff12; }
  .info { left: 26px; right: 26px; bottom: 26px; }
  .title { font-size: 30px; }
  .feed-nav { position: fixed; left: calc(50% + 265px); top: calc(50% - 54px); display: flex; flex-direction: column; gap: 10px; }
  .feed-nav .icon-btn { width: 40px; height: 40px; background: #ffffff06; border: 1px solid #ffffff12; color: #9ca794; }
  .desktop-hint { display: block; position: fixed; bottom: 24px; left: 26px; color: #7c867d; font-size: 10px; letter-spacing: .1px; }
}
@media (max-height: 720px) {
  .topbar { padding-top: calc(12px + env(safe-area-inset-top)); }
  .brand { font-size: 28px; }
  .info { bottom: 16px; }
  .info .eyebrow { margin-bottom: 7px; }
  .title { font-size: 24px; }
  .video-meta { min-height: 26px; margin: 3px 0 9px; }
  .react { padding-top: 10px; }
  .r { min-height: 58px; }
  .side { bottom: 200px; gap: 8px; }
}
@media (max-width: 360px) {
  .topbar { padding-inline: 16px; }
  .info { left: 16px; right: 16px; }
  .title { font-size: 23px; }
  .side { right: 16px; }
  .reaction-emoji { font-size: 23px; }
  dialog { padding-inline: 18px; }
}





