@keyframes scaleAnimation {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.2);
  }
}

body, html {
  margin: 0;
  padding: 0;
  width:100%;
  height: 100dvh;
  overflow: hidden;
  touch-action: none;
  font-family: Arial, sans-serif;
}

body {
  background: #000;
}

.video-container {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.menu-icon, .author-icon {
  position: absolute;
  top: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
}

.menu-icon {
  left: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
}

.menu-icon i {
  font-size: 24px;
}

.user-avatar, .author-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: none;
}

.user-avatar.active {
  display: flex;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
}

.play-button i {
  font-size: 30px;
  color: #000;
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  color: white;
}

.video-info {
  max-width: 75%;
  margin-bottom: 10px;
}

.video-info h3 {
  max-width: 100%;
  max-height:45px;
  /* white-space: nowrap; */
  /* text-overflow: ellipsis; */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  font-size: 18px;
  margin-bottom: 5px;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  margin: 4px 2px;
  font-size: 14px;
}

.tag:after  {
  content: ",";
}

.tag:nth-child(n+4):before {
  content: "#";
  float:left;
}

.tag:last-child:after  {
  content: "";
}

.video-actions {
  position: absolute;
  right: 10px;
  bottom: 50px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  user-select: none;
  outline: none;
}

.video-actions button {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.video-actions button:active {
  animation: scaleAnimation 0.1s ease;
}

.video-actions button span {
  display: block;
  font-size: 12px;
  text-align: center;
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  color: white;
  font-size: 24px;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.popup.active {
  display: flex;
}

.popup-content {
  background: #121212;
  padding: 20px 30px;
  margin:10px;
  border-radius: 15px;
  width: 85%;
  max-width: 400px;
  color: #ffffff;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: scale(.8);
}

.popup-content a {
  cursor: pointer;
}

.popup-content .popup-close {
  position: absolute;
  width: 15px;
  height:15px;
  top: 10px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
}

.popup-content .popup-close:hover {
  color: #fe2c55;
}

.popup-info button {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border-radius: 8px;
  border: none;
  background-color: #fe2c55;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.popup-info .logotype {
  background-color: #ffffff;
  margin: -60px auto 0 auto;
  padding: 5px;
  border-radius: 100%;
  overflow: hidden;
  text-align: center;
  width: 100px;
  height: 100px;
}

.popup-info .logotype img {
  width:100%;
  height:100%;
  border-radius: 50%;
}

.popup-auth input {
  box-sizing: border-box;
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border-radius: 8px;
  border: 1px solid #333;
  background-color: #222;
  color: white;
  font-size: 16px;
}

.popup-auth button {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border-radius: 8px;
  border: none;
  background-color: #fe2c55;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.popup-auth a {
  color: #fe2c55;
}

.popup-auth h2 {
  margin-bottom: 20px;
  font-size: 24px;
}

.popup-profile img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
}

.popup-profile h2 {
  margin-bottom: 20px;
  font-size: 24px;
}

.popup-profile p {
  margin-bottom: 20px;
  font-size: 18px;
}

.popup-profile button {
  padding: 12px 24px;
  margin: 0 5px;
  border-radius: 8px;
  border: none;
  background-color: #fe2c55;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

@media (orientation: portrait) {
  .video-container video {
    object-fit: cover;
  }
}
