
/* ================= FEED ================= */

.feed{
  position:fixed;
  top:0;
  left:0;

  width:100%;


  overflow-y:auto;
  overflow-x:hidden;

  scroll-snap-type:y mandatory;
  scroll-snap-align:start;

  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;

  scrollbar-width:none;
  -ms-overflow-style:none;

  background:#000;
}

.feed::-webkit-scrollbar{
  display:none;
}

/* ================= VIDEO BOX ================= */

.video-box{
  position:relative;

  width:100%;


  overflow:hidden;

  scroll-snap-align:start;
  scroll-snap-stop:always;

  display:flex;
  align-items:flex-end;
  justify-content:center;

  background:#000;
}

/* ================= MEDIA ================= */

video,
iframe{
  position:absolute;

  top:50%;
  left:50%;

  width:100%;
  height:100%;

  object-fit:cover;

  border:none;
  pointer-events:none;

  background:#000;

  /* 🔥 GESER VIDEO */
  transform:
  translate(-50%, -50%);
}
/* ================= MOBILE FIX ================= */

@media (max-width:768px){

  .feed,
  .video-box{
    height:calc(var(--vh, 1vh) * 100);
  }

}
/* ================= INFO ================= */

.info{
  position: absolute;
  left: 15px;
  right: 80px; /* beri ruang untuk tombol aksi */

  bottom: calc(45px + env(safe-area-inset-bottom));
  color: #fff;
  z-index: 10;
  pointer-events: none;

  max-width: calc(100% - 100px);
}

.info-row{
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar,
.avatar-text{
  width: 40px;
  height: 40px;

  border-radius: 50%;
  border: 2px solid #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  object-fit: cover;

  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;

  flex-shrink: 0;
}

.info-text{
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.info-text p{
  font-size: 12px;
  font-weight: 600;
  opacity: .9;
  margin-bottom: 4px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-text h3{
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;

  overflow: hidden;
}

/* ================= TAP OVERLAY ================= */
.tap-overlay {
  position: fixed;
  inset: 0;
  color: #fff;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  cursor: pointer;
}

.tap-content {
  text-align: center;
}

.tap-icon {
  margin-bottom: 10px;
  animation: pulse 1.5s infinite;
}

.tap-text {
  font-size: 16px;
  opacity: 0.9;
}


/* ================= SEARCH ================= */
.search-btn{
  position:fixed;
  top:0px;
  right:15px;
  width:50px;
  height:50px;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:10000;
  background:transparent;
  border:none;
}

.search-btn svg {
  transition: 0.2s;
}

.search-btn:hover svg {
  transform: scale(1.2);
}

.search-box{
  position:fixed;
  top:0px; /* ðŸ”¥ turun */
  left:0;
  right:0;
  padding:12px;
  background:transparent;
  z-index:1500;
  display:none;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap input {
  width: 100%;
  padding: 10px 45px 10px 15px;
  border: none;
  border-radius: 25px;
  background: #fff;
  color: #000;
  font-size: 14px;
  outline: none;
}

.search-input-wrap input::placeholder {
  color: #000;
}

#clearBtn {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}

#clearBtn:hover {
  background: rgba(255,255,255,0.4);
}

/* ================= SEARCH RESULT ================= */
#searchResult {
  margin-top: 5px;
  max-height: 60vh;
  overflow-y: auto;
}

#searchResult::-webkit-scrollbar {
  width: 4px;
}

#searchResult::-webkit-scrollbar-thumb {
  background: #333;
}

.result-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #222;
  cursor: pointer;
}

.result-item img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.result-item:hover {
  background: #111;
}

/* ================= NAVIGATION ================= */
.bottom-nav{
  position:fixed;
  bottom:0;
  left:0;              /* ubah dari 50% */
  transform:none;      /* hapus translate */
  width:100%;
  height:55px;
  background:#111;
  border-top:1px solid #222;
  display:flex;
  justify-content:space-around;
  align-items:center;
  z-index:100;
}

/* ITEM */
.nav-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  color:#aaa;
  font-size:18px;
  cursor:pointer;
}

.nav-item small{
  font-size:12px;
  margin-top:2px;
}

/* ACTIVE */
.nav-item.active{
  color:#fff;
}

/* UPLOAD BUTTON (TENGAH) */
.add-btn{
  width:32px;
  height:32px;
  background:transparent;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top:-8px;
  border:1px solid #fff;
  text-decoration:none;
  color:#fff;
  font-size:22px;
  font-weight:bold;
}

.svg-avatar{
  width:36px;
  height:36px;
  border-radius:50%;
  background:#333;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #555;
  transition:0.2s;
}

.svg-avatar svg{
  width:16px;
  height:16px;
  stroke:#fff;
}

/* hover */
.nav-item:hover .svg-avatar{
  transform:scale(1.1);
  background:#444;
}
.nav-item svg{
  width:22px;
  height:22px;
  stroke:#aaa;
  transition:0.2s;
}

.nav-item.active svg{
  stroke:#fff;
}

/* WRAP ICON */
.icon-wrap{
  position:relative;
  display:inline-block;
}

/* BADGE MERAH */
.badge-msg{
  position:absolute;
  top:-5px;
  right:-8px;
  min-width:16px;
  height:16px;
  padding:0 4px;
  background:red;
  color:#fff;
  font-size:10px;
  font-weight:bold;
  border-radius:20px;
  display:flex;
  align-items:center;
  justify-content:center;

  box-shadow:0 0 0 2px #000;
}

.nav-avatar{
  width:24px;
  height:24px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:bold;
  color:#fff;
}

/* ================= ACTIONS ================= */
.actions{
  position:absolute;
  right:10px;
  bottom:calc(100px + env(safe-area-inset-bottom));
  display:flex;
  flex-direction:column;
  align-items:center;
  color: #fff;
  gap:10px;
  z-index:20;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.action-btn:active {
  transform: scale(0.85);
}

.icon {
  font-size: 20px;
  color: #fff;
}

.count {
  font-size: 16px;
  margin-top: 0px;
  opacity: 0.9;
}

/* ================= ICON STATES ================= */
.liked .heart {
  fill: red;
  stroke: red;
  transform: scale(1.2);
}

.saved .save-icon {
  fill: yellow;
  stroke: yellow;
}

/* ================= ICON STYLE ================= */
.heart,
.comment-icon,
.share-icon,
.save-icon {
  width: 30px;
  height: 30px;
  fill: transparent;
  stroke: #fff;
  color: #fff;
  stroke-width: 2;
  transition: 0.2s;
}

.comment:active .comment-icon,
.share:active .share-icon,
.save:active .save-icon {
  transform: scale(1.2);
}
.comment-title {
  color: #fff;
}
.comment-input {
  color: white;
}

/* ================= LOVE ANIMATION ================= */
.love-anim {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 90px;
  background: transparent;
  text-shadow: 
    0 0 10px rgba(255,0,0,0.8),
    0 0 20px rgba(255,0,0,0.6),
    0 0 40px rgba(255,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
}

.love-anim.show {
  animation: lovePop 0.8s ease forwards;
}

/* ================= EXTRA ================= */
.tap-layer {
  position: absolute;
  inset: 0;
  z-index: 15;
  background: transparent;
  pointer-events: auto;
}

#overlayClick {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
}



/* ================= PROGRESS ================= */
.play-progress{
  position:fixed;
  bottom:55px;
  left:0;
  width:100%;
  height:3px;
  z-index:9999;
  overflow:hidden;
}
.play-bar{
  width:0%;
  height:100%;
  background:linear-gradient(90deg,#ff0000,#ff4444,#ff0000);
  transition: width 0.05s linear;
}


/* ================= SHOP ================= */
.shop-icon{
  width:30px;
  height:30px;
  fill:transparent;
  stroke:#FFD700;
  stroke-width:2;
  transition:0.2s;
}

.shop:active .shop-icon{
  transform:scale(1.2);
}

.shop .count{
  font-size:14px;
  
}

/* ================= STORY ================= */

.story-wrap{
  position: fixed;
  top: 45px;
  left: 0;
  width: 100%;
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 8px;
  z-index: 900;
  pointer-events: auto;
  scrollbar-width: none;
}

.story-wrap::-webkit-scrollbar{
  display: none;
}

.story-item{
  min-width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

.story-ring{
  position: relative;
  width: 40px;
  height: 40px;
  padding: 1px;
  border-radius: 50%;
  background: linear-gradient(45deg,#ff0066,#ffcc00);
}

.story-ring.seen{
  background: #666;
}

.story-avatar{
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #000;
}

.add-story{
  background: #333;
}

.story-plus{
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #000;
  background: #0095ff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ================= STORY VIEWER ================= */

#storyViewer{
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  background: #000;
  z-index: 3000;
}

#storyViewer img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.story-top{
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999999;
  pointer-events: none;
}

.story-user,
#storyUser{
  pointer-events: auto;
}

.story-close{
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  pointer-events: auto;
}

.story-top button{
  background: none;
  border: none;
  color: #fff;
  font-size: 35px;
}

.story-touch-prev,
.story-touch-next{
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  z-index: 5;
}

.story-touch-prev{
  left: 0;
}

.story-touch-next{
  right: 0;
}

.story-image{
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.story-video{
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* ================= CATEGORY ================= */

.category-wrap{
  position: fixed;
  top: 14px;
  left: 12px;
  right: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  white-space: nowrap;
  z-index: 1000;
  background: transparent;
  scrollbar-width: none;
}


.cat-btn{
  flex: none;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.7);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: .2s;
}

.cat-btn.active{
  color: red;
  font-weight: 700;
}

/* ================= STORY REPLY ================= */

.story-reply-box{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  display: none;
  z-index: 5000;
}

.story-reply-wrap{
  display: flex;
  align-items: center;
  gap: 10px;
}

.story-reply-input{
  flex: 1;
  height: 45px;
  padding: 0 15px;
  border: none;
  outline: none;
  border-radius: 30px;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(5px);
  color: #fff;
  font-size: 14px;
}

.story-reply-btn{
  height: 45px;
  padding: 0 18px;
  border: none;
  border-radius: 30px;
  background: #0095ff;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

/* ================= INSTALL BUTTON ================= */

.install-btn{
  position: fixed;
  left: 90%;
  bottom: 60px;
  padding: 5px;
  border: none;
  border-radius: 100px;
  background: #ff0000;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: none;
  z-index: 9999;
  transform: translateX(-50%);
}

/* ================= COMMENT ================= */

.comment-popup{
  position:fixed;
  left:0;
  right:0;
  bottom:-100%;
  height:70%;
  background:#111;
  z-index:99999;
  border-radius:20px 20px 0 0;
  transition:0.3s;
  display:flex;
  flex-direction:column;
}

.reply-info{
  display:none;
  padding:8px 15px;
  font-size:12px;
  background:#1a1a1a;
  border-top:1px solid #222;
  color:#aaa;
}

.comment-header{
  padding:15px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid #222;
}

.comment-space{
  width:40px;
}

.comment-title{
  font-weight:bold;
}

.comment-close{
  width:40px;
  height:40px;
  border:none;
  background:transparent;
  color:#fff;
  font-size:28px;
  cursor:pointer;
}

.comment-list {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  color: #fff;
}

.comment-input-wrap{
  display:flex;
  gap:10px;
  padding:10px;
  border-top:1px solid #222;
}

.comment-input{
  flex:1;
  background:#222;
  border:none;
  color:#fff;
  padding:12px;
  border-radius:30px;
  outline:none;
}

.comment-send{
  background:#fff;
  color:#000;
  border:none;
  padding:0 18px;
  border-radius:30px;
  font-weight:bold;
}

