*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
  background-color: #000;
}

html {
  scroll-snap-type: none;
}

.app {
  width: 100%;
  height: 100dvh;
  background-color: #000;
  display: grid;
  place-items: center;
}

.container {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  border-radius: 0;
}

.container::-webkit-scrollbar {
  display: none;
}

.container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.top-navbar {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 101;
}

.top-navbar h2 {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
  padding: 0 40px;
}

.top-navbar h2 span {
  font-weight: 700;
  position: relative;
}

.top-navbar h2 span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 50%;
  height: 1px;
  background-color: #fff;
  transform: translateX(50%);
}


.top-navbar .icon {
  font-size: 16px;
  color: #fff;
  cursor: pointer;
}

.bottom-navbar {
  position: sticky;
  background-color: #161616;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 45px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 101;
}

.bottom-navbar .nav-item {
  position: relative;
  flex: 1 1 20%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bottom-navbar .icon {
  font-size: 18px;
  color: #d4d3d3;
}

.bottom-navbar .plus {
  background-color: #fff;
  color: #161616;
  padding: 5px 10px;
  border-radius: 25%;
  border-right: 5px solid red;
  border-left: 5px solid turquoise;
  font-size: 12px;
}

.bottom-navbar .item-name {
  color: #d4d3d3;
  font-size: 9px;
  margin-top: 3px;
  font-weight: 700;
  white-space: nowrap;
}

.bottom-navbar .nav-item:hover .icon,
.bottom-navbar .nav-item:hover .item-name {
  color: #fff;
}

.bottom-navbar .active {
  color: #fff;
}

.bottom-navbar .notification {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(5px);
  width: 17px;
  height: 17px;
  padding: 0;
  background-color: red;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* VIDEO CARD */
.video {
  position: relative;
  width: 100%;
  height: 100%;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
  scroll-snap-align: start;
  overflow: hidden;
}

.video::before {
  content: '';
  display: block;
  box-shadow: 0 -33px 48px rgba(0, 0, 0, 0.5) inset;
  width: 100%;
  pointer-events: none;
  z-index: 99;
  height: 100%;
  top: 0;
  left: 0;
  position: absolute;
  background: transparent;
}

.player {
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: center center;
  width: 100%;
  height: 100%;
  background-color: #000;
}

.bottom-controls {
  position: absolute;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.bottom-controls>.footer-left {
  position: absolute;
  left: 14px;
  right: 82px;
  bottom: 62px;
  margin: 0;
  min-width: 0;
  display: block;
  pointer-events: none;
}

.bottom-controls>.footer-right {
  position: absolute;
  right: 10px;
  bottom: 62px;
  margin: 0;
  z-index: 110;
  pointer-events: auto;
}

/* POST COMMENTS */
.post-comments {
  position: absolute;
  left: 0;
  bottom: -100%;
  width: 100%;
  height: 58%;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #111;
  border-radius: 18px 18px 0 0;
  z-index: 500;
  transition: bottom 0.35s ease, transform 0.25s ease;
  text-shadow: none;
  overflow: hidden;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
}

.post-comments.open {
  bottom: 0;
}

.post-comments-handle {
  width: 48px;
  height: 5px;
  background: #d5d7db;
  border-radius: 999px;
  margin: 10px auto 6px;
  flex: 0 0 auto;
}

.post-comments-header {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #ececec;
  flex: 0 0 auto;
}

.post-comments-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.close-comment {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

/* Ako hoćeš baš kao na screenshotu bez X:
.close-comment {
  display: none;
}
*/

.post-comments-area {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 0 0;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

.post-comment {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px;
  border-bottom: 1px solid #f1f1f1;
}

.post-comment-user {
  flex: 0 0 auto;
}

.post-comment-user-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.post-comment-content {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 0;
}

.post-comment-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.post-comment-user-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 700;
}

.post-comment-user-name a {
  color: #111;
  text-decoration: none;
}

.post-comment-user-verified {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.post-comment-time {
  font-size: 12px;
  color: #8d8d8d;
  font-weight: 500;
}

.post-comment-user-msg {
  font-size: 14px;
  line-height: 1.35;
  color: #1b1b1b;
  word-break: break-word;
}

.post-comment-like-btn {
  flex: 0 0 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: #111;
  cursor: pointer;
  padding-top: 2px;
}

.post-comment-like-btn i {
  font-size: 18px;
}

.post-comment-like-btn p {
  margin: 4px 0 0;
  font-size: 11px;
  color: #111;
}

.post-comment-like-btn .post-comment-like-icon.liked {
  color: #ff3040;
}

.post-comments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 28px 20px 16px;
  text-align: center;
}

.post-comments-area .post-comment+.post-comments-empty {
  display: none;
}

.post-comments-empty h4 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  color: #111;
}

.post-comments-empty p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.post-comments-note {
  flex: 0 0 auto;
  text-align: center;
  font-size: 13px;
  color: #a5a5a5;
  padding: 10px 14px;
  border-top: 1px solid #f1f1f1;
  background: #fff;
}

.post-comment-input {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 8px 12px;
  border-top: 1px solid #ececec;
  background: #fff;
}

.post-comment-text {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  border: 0;
  outline: none;
  background: transparent;
  color: #111;
  font-size: 15px;
  padding: 0 4px;
}

.post-comment-text::placeholder {
  color: #8a8a8a;
}

.post-comment-send {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.post-comment-send i {
  font-size: 20px;
}

/* Footer Left / Caption */
.footer-container {
  width: 100%;
  margin: 0;
  display: block;
}

.footer-left {
  color: #fff;
  margin-left: 0;
  display: block;
  min-width: 0;
  pointer-events: none;
}

.footer-left a,
.footer-left button {
  pointer-events: auto;
}

.text {
  width: 100%;
  min-width: 0;
}

.reel-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
}

.reel-brand,
.reel-product-action {
  color: #fff;
  text-decoration: none;
}

.reel-product-action {
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.reel-meta-dot {
  opacity: 0.75;
}

.reel-description {
  margin: 0 0 7px;
  color: #fff;
  font-size: 13px;
  line-height: 1.28;
  font-weight: 500;
}

.reel-description-text {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reel-description.expanded .reel-description-text {
  display: inline;
  overflow: visible;
}

.reel-title:hover {
  text-decoration: underline;
}

.reel-description-toggle {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  padding: 0;
  margin-left: 4px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.reel-song {
  width: fit-content;
  max-width: 88%;
  min-height: 26px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.reel-song i {
  flex: 0 0 auto;
  width: 16px;
  font-size: 14px;
}

.reel-song marquee {
  max-width: 210px;
}

.reel-song span {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}


.ticker {
  height: fit-content;
  width: 100%;
  display: flex;
  align-items: center;
}

.ticker marquee {
  display: flex;
  align-items: center;
  width: 100%;
}

.reel-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 5px;
}

.reel-description {
  margin: 0 0 7px;
  color: #fff;
  font-size: 14px;
  line-height: 1.28;
  font-weight: 500;
}

.reel-description-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.reel-description.expanded .reel-description-text {
  display: inline;
  overflow: visible;
}

.reel-cta {
  display: none;
}

/* Footer Right */
.footer-right {
  z-index: 100;
  color: #fff;
  margin-right: 5px;
  margin-bottom: 25px;
}

.sidebar-icon {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  margin-top: 5px;
}

.sidebar-icon .userprofile {
  border-radius: 50%;
  border: #fff 2px solid;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 25px;
}

.sidebar-icon .useradd {
  border-radius: 50%;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: -30px;
  margin-bottom: 15px;
}

.sidebar-icon p {
  font-size: 14px;
  font-weight: 500;
  margin-top: 5px;
}

.record {
  animation: spinTheRecord infinite 5s linear;
  filter: invert(1);
}

.record img {
  width: 35px;
  height: 35px;
  padding: 5px;
  border-radius: 50px;
  background-color: #b3afaf;
}

@keyframes spinTheRecord {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}



/* SHARE DIALOG */
.share-dialog {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  justify-content: center;
  align-items: flex-end;
}

.share-dialog.open {
  display: flex;
}

.share-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.share-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 82dvh;
  background: #fff;
  color: #111;
  border-radius: 18px 18px 0 0;
  padding: 0 14px 18px;
  text-shadow: none;
  animation: shareSheetUp 0.24s ease;
  overflow: hidden;
}

@keyframes shareSheetUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.share-sheet-header {
  position: relative;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-sheet-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #111;
}

.share-close {
  position: absolute;
  left: 0;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #111;
  font-size: 20px;
  cursor: pointer;
}

.share-search {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #f1f2f4;
  border-radius: 8px;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 16px;
}

.share-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 10px;
  padding: 8px 0 14px;
}

.share-option {
  border: 0;
  background: transparent;
  color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  min-width: 0;
}

.share-option span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
  font-size: 20px;
}

.share-option small {
  max-width: 84px;
  font-size: 11px;
  line-height: 1.2;
  color: #111;
  white-space: normal;
}

.share-status {
  min-height: 18px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  padding-top: 4px;
}

body.share-open {
  overflow: hidden;
}

/* FIX: audio pill ne smije biti 100% */
.ticker.reel-song {
  width: fit-content;
  max-width: 220px;
  min-width: 0;
}

.ticker.reel-song marquee {
  width: auto;
  max-width: 155px;
  min-width: 0;
  display: block;
}

.reel-chat-profile {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.reel-chat-profile .userprofile {
  margin-bottom: 18px;
}

.reel-chat-badge {
  position: absolute;
  left: 50%;
  bottom: 13px;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #7b2cff;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  border: 2px solid #fff;
}


.top-navbar a {
  color: #fff;
  text-decoration: none;
}

.top-navbar h2 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-tab {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  position: relative;
}

.top-tab.active {
  font-weight: 800;
  color: #fff;
}

.top-tab.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  transform: translateX(-50%);
}

.top-nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reel-description-text {
  white-space: pre-line;
}

.reel-description.expanded .reel-description-text {
  white-space: pre-line;
}


.reel-play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.reel-play-overlay[hidden] {
  display: none;
}

.reel-play-overlay i {
  font-size: 34px;
  margin-left: 4px;
}

.reel-play-overlay[hidden],
.reel-sound-toggle[hidden] {
  display: none !important;
}

.reel-sound-toggle {
  position: absolute;
  left: 50%;
  top: calc(50% - 68px);
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  z-index: 151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.reel-sound-toggle i {
  font-size: 16px;
}

.reel-sound-toggle i {
  font-size: 17px;
}
