@import url("./glass.css");

:root {
  --shell-bg: #fafaf7;
  --shell-text: #1a2e1a;
  --shell-muted: #5c6b5c;
  --shell-border: #e2e8df;
  --shell-tabbar-h: 3.25rem;
  --shell-sidebar-w: 5.5rem;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --line-height-body: 1.6;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.app-shell {
  margin: 0;
  min-height: 100dvh;
  background: var(--shell-bg);
  color: var(--shell-text);
  font-family: var(--font-sans);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.app-shell.videos-theme {
  --shell-bg: #000;
  --shell-text: #fff;
  --shell-muted: rgba(255, 255, 255, 0.72);
  --shell-border: rgba(255, 255, 255, 0.12);
  background: #000;
  color: #fff;
}

.app-layout {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-bottom: var(--tabbar-occupied);
}

body.videos-theme .app-main {
  padding-bottom: 0;
  overflow: hidden;
}

.app-sidebar {
  display: none;
}

.app-tabbar {
  position: fixed;
  left: var(--tabbar-float-inset);
  right: var(--tabbar-float-inset);
  bottom: calc(var(--tabbar-float-bottom) + env(safe-area-inset-bottom, 0px));
  z-index: 100;
  height: var(--shell-tabbar-h);
  padding-bottom: 0;
  border-radius: 999px;
  border-top: 0;
}

.app-tabbar__list,
.app-sidebar__list {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: var(--shell-tabbar-h);
  max-width: 32rem;
  margin: 0 auto;
  padding: 0 0.5rem;
}

.app-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.125rem;
  height: 3.125rem;
  color: var(--shell-muted);
  text-decoration: none;
  border-radius: 0.85rem;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.app-nav-item:hover {
  color: var(--shell-text);
}

body.videos-theme .app-nav-item:hover {
  color: #fff;
}

.app-nav-item svg,
.app-nav-item .app-nav-icon {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  overflow: visible;
  shape-rendering: geometricPrecision;
}

.app-nav-item.is-active {
  color: var(--shell-text);
}

.app-nav-item.is-active svg,
.app-nav-item.is-active .app-nav-icon {
  stroke-width: 2.1;
}

body.videos-theme .app-nav-item.is-active {
  color: #fff;
}

.site-footer {
  margin-top: auto;
  flex-shrink: 0;
  padding: 1.5rem 1rem 0.5rem;
  text-align: center;
}

body.videos-theme .site-footer {
  display: none;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--shell-muted);
}

.site-footer__links a {
  color: inherit;
}

.login-wall {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  min-height: calc(100dvh - var(--tabbar-occupied));
}

body.videos-theme .login-wall {
  color: #fff;
}

.login-wall__logo {
  border-radius: 1rem;
}

.login-wall__title {
  margin: 0;
  font-size: 1.35rem;
}

.login-wall__text {
  margin: 0;
  max-width: 20rem;
  color: var(--shell-muted);
  line-height: 1.5;
}

body.videos-theme .login-wall__text {
  color: rgba(255, 255, 255, 0.72);
}

.login-wall__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: #0095f6;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.wip-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  text-align: center;
}

.wip-page h1 {
  margin: 0;
  font-size: 1.35rem;
}

.wip-page p {
  margin: 0;
  color: var(--shell-muted);
  max-width: 22rem;
}

@media (min-width: 768px) {
  .app-layout {
    flex-direction: row;
  }

  .app-sidebar {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--shell-sidebar-w);
    z-index: 100;
    border-right: 0;
    border-radius: 0;
  }

  .app-sidebar__list {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    height: 100%;
    max-width: none;
    padding: 1.25rem 0.5rem;
  }

  .app-sidebar__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    margin: 0 0 1.25rem;
    padding: 0.35rem 0.4rem;
    border-radius: 0.65rem;
    box-sizing: border-box;
  }

  body.videos-theme .app-sidebar__logo {
    background: rgba(255, 255, 255, 0.92);
  }

  .app-sidebar__logo img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 2rem;
    object-fit: contain;
    object-position: center;
  }

  .app-tabbar {
    display: none;
  }

  .app-main {
    margin-left: var(--shell-sidebar-w);
    min-height: 100dvh;
    padding-bottom: 0;
  }

  body.videos-theme .app-main {
    padding-bottom: 0;
  }
}
