/* RESET */
* {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: black;
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
  width: 100%;
  height: 100%;
  overscroll-behavior: none;
}

/* TOP NAVIGATION */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 55px;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-bottom: 0.5px solid rgba(255,255,255,0.15);
  z-index: 20;
}

/* NAV ITEMS */
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #8e8e8e;
  cursor: pointer;
  font-size: 9px;
  transition: 0.2s;
  touch-action: manipulation;
}

.nav-item img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: 0.2s;
}

.nav-item.active {
  color: white;
}

.nav-item.active img {
  opacity: 1;
  transform: scale(1.05);
}

/* MAIN FEED CONTAINER */
#post-container {
  position: fixed;
  top: 55px;
  left: 0;
  width: 100%;
  height: calc(100% - 55px);
  overflow: hidden;
  background: black;
}

/* POSTS */
.post {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: black;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* MEDIA */
.media-box {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.post-img,
.post-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* SOUND & SHARE BUTTONS */
#sound-toggle,
#share-button {
  position: fixed;
  right: 15px;
  width: 45px;
  height: 45px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 20px;
  z-index: 100;
  cursor: pointer;
}

#sound-toggle {
  bottom: 80px;
}

#share-button {
  bottom: 20px;
}

/* PROFILE CLEAN FULL SCREEN FIX */
#post-container.profile-mode {
  overflow-y: auto !important;
  height: calc(100% - 55px);
}

/* SAFE AREA */
@supports (padding-top: env(safe-area-inset-top)) {
  .top-nav {
    height: calc(55px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }

  #post-container {
    top: calc(55px + env(safe-area-inset-top));
    height: calc(100% - 55px - env(safe-area-inset-top));
  }
}

/* MOBILE */
@media (max-width:600px) {
  .nav-item {
    font-size: 9px;
  }
}

/* DESKTOP */
@media (min-width:900px) {
  #post-container {
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 1px solid rgba(255,255,255,0.08);
    border-right: 1px solid rgba(255,255,255,0.08);
  }
}
