/* básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: #000;
  color: #fff;
  font-family: Inter, Poppins, sans-serif;
  overflow: hidden;
}

/* top controls */
.top-controls {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-controls button {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
}

/* feed */
/* #video-feed {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
} */

#video-feed {
  /* height: 100svh; */
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  /* Evita saltos */
}

.video-card {
  position: relative;
  height: 100vh;
  /* scroll-snap-align: start; */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* video */
.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* overlay info */
.overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(transparent 55%, rgba(0, 0, 0, 0.6));
  padding: 18px;
  z-index: 5;
}

.info {
  pointer-events: auto;
}

.info .user {
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.info .tags {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.info .date {
  font-size: 12px;
  opacity: 0.7;
}

/* actions (likes etc) */
.actions {
  position: absolute;
  right: 14px;
  bottom: 110px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
  z-index: 6;
}

.actions button {
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  padding: 6px;
}

.actions .like i.bxs-heart {
  color: #ff4d4d;
  transform: scale(1.1);
}

/* progress */
.progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  z-index: 6;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: #ff4d4d;
  transition: width .05s linear;
}

/* intro overlay */
.intro-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.intro-content {
  text-align: center;
  padding: 24px;
}

.intro-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 14px 0;
}

.intro-content button {
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

#start-sound {
  background: #ff4d4d;
  color: #fff;
}

#start-muted {
  background: #333;
  color: #fff;
}

/* modal */
.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3500;
}

.modal-card {
  width: 90%;
  max-width: 520px;
  background: #0f0f0f;
  padding: 18px;
  border-radius: 12px;
  position: relative;
}

.close-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.modal-card input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  margin: 10px 0;
  background: #111;
  color: #fff;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.modal-actions button {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #222;
  color: #fff;
}

.results {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 8px;
}

.results .row {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

/* floating heart */
.floating-heart {
  position: fixed;
  z-index: 9999;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: floatHeart .8s ease forwards;
}

.floating-heart i {
  font-size: 72px;
  color: #ff4d4d;
}

/* responsive center on desktop */
@media(min-width:900px) {
  .video-card video {
    width: 480px;
    height: 86vh;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    object-fit: cover;
  }

  .overlay {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 12px;
    padding-bottom: 28px;
  }

  .actions {
    right: calc(50% - 240px + 16px);
  }

  /* align to right of centered video */
}

@keyframes floatHeart {
  0% {
    transform: translate(-50%, -50%) scale(.8);
    opacity: 1;
  }

  50% {
    transform: translate(-50%, -120%) scale(1.1);
    opacity: .9;
  }

  100% {
    transform: translate(-50%, -220%) scale(.6);
    opacity: 0;
  }
}