/* ---- Video Post ---- */
.dd-content-container {
  max-width: 960px;
}

/* ---- VIDEO PLAYER ---- */
#video-player,
.video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#video-player {
  overflow: hidden;
  background: #0000004a;
  z-index: 1;
}

@media (max-width: 959px) {
  #video-player {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}

@media (min-width: 960px) {
  #video-player {
    border-radius: 10px;
  }
}

.video-wrapper {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 16px;
  opacity: 0;
  z-index: 2;
}

.video-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 30%);
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.3s ease;
}

.video-wrapper.fade-in {
  opacity: 1;
  transition: opacity 0.4s ease-in;
}

.video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: transparent;
  z-index: 2;
}

.top-bar,
.middle-bar,
.bottom-bar {
  box-sizing: border-box;
  position: relative;
  display: flex;
  width: 100%;
  z-index: 5;
}

/* video player top bar */
.top-bar {
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

#menu-toggle {
  padding: 10px;
}

.action-menu {
  position: relative;
  z-index: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition:
    opacity 0.2s ease,
    transform 0.3s ease;
}

.action-menu.show {
  z-index: 5;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.action-group-wrapper {
  position: relative;
  display: inline-block;
}

.action-group {
  position: relative;
  display: flex;
  gap: 8px;
  height: auto;
}

.ui-btn-label {
  box-sizing: border-box;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: -1px;
  font-size: 12px;
  color: rgb(255 255 255);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  padding: 1px 5px;
  pointer-events: none;
}

#speed-visual {
  font-size: 13px;
  color: rgb(255 255 255);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

@keyframes videoFlash {
  0% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.5);
    transform: scale(1.1);
  }
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

.video-flash {
  animation: videoFlash 300ms ease-in-out;
}

/* video player scrollbar */
.action-menu::-webkit-scrollbar {
  height: 5px;
}

.action-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.2) !important;
}

.action-menu::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.6) !important;
  border-radius: 4px !important;
}

/* video player middle bar */
.middle-bar {
  align-items: flex-end;
  justify-content: space-evenly;
  max-height: fit-content;
}

#middle-play-pause {
  width: 50px;
  height: 50px;
}

/* video player UI */
.ui-btn {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition:
    background 0.3s ease-in-out,
    border-color 0.3s ease-in-out;
}

.ui-btn img {
  width: 100%;
  height: 100%;
  opacity: 0.85;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
}

.ui-btn.favorite img {
  filter: grayscale(100%) brightness(200%) drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
}

.ui-btn.favorited img {
  filter: brightness(0.5) sepia(1) saturate(600%) hue-rotate(311deg) drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
}

@keyframes clickPress {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

.click-animate {
  animation: clickPress 150ms ease;
}

.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* video player sliders (volume) */
.slider-wrapper {
  box-sizing: border-box;
  position: absolute;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  will-change: opacity, transform;
  width: 30px;
  background-color: rgb(0 0 0 / 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border-radius: 6px;
  touch-action: none;
  z-index: 12;
  padding: 8px;
}

#volume .slider-wrapper {
  bottom: calc(100% + 10px);
}

.slider-wrapper.show {
  opacity: 1;
  pointer-events: auto;
}

.slider-bg {
  position: relative;
  width: 6px;
  height: 70px;
  background-color: rgb(255 255 255 / 20%);
  border-radius: 2px;
  display: flex;
  align-items: flex-end;
  outline: 1px solid #ffffffab;
}

.slider-track {
  width: 6px;
  height: 0%;
  background-color: rgb(95 197 255);
  border-radius: 2px;
  transition: height 0.1s linear;
  z-index: 12;
}

/* video player bottom bar */
.bottom-bar {
  flex-direction: column;
  gap: 5px;
  transition: opacity 0.2s ease;
}

.control {
  position: relative;
  z-index: 10;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.ctrl-left,
.ctrl-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

@keyframes skip-flash {
  0%   { opacity: 0;  transform: translateY(-50%) scale(0.7); }
  12%  { opacity: .8; transform: translateY(-50%) scale(1.18); }
  20%  { opacity: .8; transform: translateY(-50%) scale(1); }
  75%  { opacity: .8; transform: translateY(-50%) scale(1); }
  100% { opacity: 0;  transform: translateY(-50%) scale(1); }
}

.skip-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

#skip-back {
  left: 12%;
}

#skip-fwd {
  right: 12%;
}

.skip-indicator.active {
  animation: skip-flash 1s ease forwards;
}

.progress {
  position: relative;
  z-index: 7;
  display: flex;
  align-items: center;
  height: 32px;
  pointer-events: all;
  touch-action: none;
  cursor: pointer;
}

.progress-wrapper {
  width: 100%;
  height: 5px;
  background: transparent;
  position: relative;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
}

.progress-bg {
  width: 100%;
  height: 100%;
  background-color: rgb(255 255 255 / 20%);
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 8px;
}

.progress-loaded {
  width: 0%;
  height: 100%;
  background-color: rgb(255 255 255 / 40%);
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 8px;
}

.progress-track {
  width: 0%;
  height: 100%;
  background-color: rgb(95 197 255);
  position: relative;
  border-radius: 8px;
}

.progress-thumb {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
  width: 12px;
  height: 12px;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

.time-label {
  position: absolute;
  top: -26px;
  font-size: 14px;
  font-family: var(--font-head);
  font-variant-numeric: tabular-nums;
  color: #fff;
  pointer-events: none;
}

#time-current {
  left: 0;
}

#time-total {
  color: rgba(255, 255, 255, 0.6);
  right: 0;
}

/* video player loader */
.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 15;
  pointer-events: none;
  transition: opacity 0.2s ease-in;
}

.loader:before,
.loader:after {
  content: "";
  width: 15px;
  height: 15px;
  display: block;
  position: relative;
  margin: 10px auto;
  border-radius: 50%;
  background: rgb(243 244 255);
  animation-play-state: running;
  animation: left 1s infinite ease-in-out;
}

.loader:after {
  background: rgb(95 197 255);
  animation: right 1s infinite ease-in-out;
}

@keyframes right {
  0%,
  100% {
    transform: translate(-15px);
  }
  50% {
    transform: translate(15px);
  }
}

@keyframes left {
  0%,
  100% {
    transform: translate(15px);
  }
  50% {
    transform: translate(-15px);
  }
}

.loader-hidden {
  opacity: 0;
}

.loader-hidden::before,
.loader-hidden::after {
  animation-play-state: paused;
}

.video-unavailable {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgb(255 255 255 / 50%);
  font-size: 16px;
  pointer-events: none;
  z-index: 10;
}

/* video player responsive */
@media (max-width: 374px) {
  .ui-btn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 413px) {
  #play-btn {
    width: 42px;
    height: 42px;
  }
}

@media (min-width: 480px) and (max-width: 768px) {
  .ui-btn {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 769px) {
  .ui-btn {
    width: 42px;
    height: 42px;
  }

  #play-btn {
    width: 60px;
    height: 60px;
  }
}

/* --- post title --- */
.post-title {
  font-family: var(--font-head);
  font-size: 18px;
  color: rgb(241 241 241 / 95%);
  line-height: 1.4;
}

/* ---- Video Message ---- */
.vp-mes {
  display: flex;
  justify-content: center;
  background-color: #0000001c;
  color: #ffffffe0;
  border-radius: 8px;
  font-size: 16px;
  padding: 10px;
  border: 1px solid #7abaff;
  margin: 6px auto;
  max-width: 500px;
}

.vp-mes-p {
  margin: 0;
  text-align: center;
}

/* --- video byline --- */
.video-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
}

.video-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stats-item {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #fff;
  font-size: 16px;
}

.stats-item p,
.stats-item img {
  opacity: 0.6;
}

.stats-item.views img {
  padding: 7px;
}

.stats-item img {
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  padding: 6px;
}

.profile-link {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  cursor: pointer;
}

.avatar-wrap {
  box-sizing: border-box;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: rgb(49 51 68 / 50%);
}

.creator-avatar {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crt-name {
  font-family: var(--font-head);
  color: rgb(241 241 241 / 95%);
}

/* --- Video Details --- */
.video-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-details-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  white-space: nowrap;
  font-family: var(--font-head);
}

.video-details-nav::-webkit-scrollbar {
  display: none;
}

.video-details-tab {
  position: relative;
  padding: 8px 6px;
  color: rgb(255 255 255 / 60%);
  font-size: 15px;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.video-details-tab.active {
  color: rgb(255 255 255);
}

.video-details-tab.active::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgb(95 197 255);
  border-radius: 999px;
}

/* --- Tab Content --- */

.tab-content.hidden {
  display: none;
}

/* --- Comment Input --- */
#comment-input-anchor {
  display: none;
}

.comment-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}

.comment-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgb(49 51 68 / 40%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 10px;
  color: rgb(241 241 241 / 90%);
  font-size: 16px;
  font-family: inherit;
  padding: 10px 12px;
  resize: none;
  overflow: hidden;
  outline: none;
  transition: border-color 0.2s ease;
}

.comment-textarea:focus {
  border-color: rgb(95 197 255);
}

.comment-textarea::placeholder {
  color: rgb(255 255 255 / 50%);
}

.comment-input-error {
  display: none;
  padding: 10px;
  border-radius: 10px;
  color: rgb(95 197 255);
  background: rgb(95 197 255 / 12%);
  font-size: 13px;
  line-height: 1.4;
}

.comment-input-actions {
  display: none;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.comment-input.expanded .comment-input-actions {
  display: flex;
}

#comment-delete {
  display: none;
}

.comment-btn-cancel,
.comment-btn-submit {
  box-sizing: border-box;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.comment-btn-cancel {
  background: rgb(52 55 75);
  color: rgb(255 255 255 / 70%);
}

.comment-btn-cancel:hover {
  background: rgb(65 68 92);
  color: rgb(255 255 255 / 88%);
}

.comment-btn-submit {
  background: rgb(95 197 255 / 12%);
  color: rgb(95 197 255);
}

.comment-btn-submit:hover {
  background: rgb(95 197 255 / 26%);
}

.comment-signin-prompt {
  font-size: 16px;
  color: rgb(255 255 255 / 50%);
}

.comment-signin-prompt a {
  color: rgb(95 197 255);
}

/* --- Comments Empty State --- */
.tab-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-top: 12px;
  opacity: .5;
}

.tab-empty-text {
  margin: 0;
  color: rgb(241 241 241 / 80%);
}

.tab-empty-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

/* --- Comments Feed --- */
.comments-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.comment {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-row {
  display: flex;
  gap: 10px;
}

.comment-replies {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 10px 16px;
  padding-left: 16px;
  border-left: 2px solid rgb(44 46 62);
}

.comment-replies.hidden {
  display: none;
}


.comment-reply .comment-avatar {
  width: 28px;
  height: 28px;
}

.comment-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgb(255 255 255 / 85%);
}

.comment-name {
  font-weight: 600;
}

.comment-time {
  opacity: 0.6;
}

.comment-text {
  margin: 0;
  font-size: 14px;
  color: rgb(241 241 241 / 80%);
  line-height: 1.5;
  word-break: break-word;
}

.comment-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-footer-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  border: none;
  background: none;
  border: none;
  color: rgb(255 255 255 / 60%);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
}

.comment-footer-btn:hover {
  color: rgb(255 255 255 / 88%);
}

.comment-like-btn img {
  width: 14px;
  height: 14px;
  opacity: .6;
}

.comment-btn-delete {
  box-sizing: border-box;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: rgb(255 80 80 / 20%);
  color: rgb(255 110 110);
  transition: background 0.2s ease, color 0.2s ease;
}

.comment-btn-delete:hover {
  background: rgb(255 80 80 / 30%);
}

.comment-replies-btn {
  gap: 6px;
}

.comment-replies-btn img {
  width: 10px;
  height: 10px;
  opacity: .6;
  transition: transform 0.2s ease;
}

.comment-replies-btn img.flipped {
  transform: scaleY(-1);
}

.comment-like-btn.comment-liked {
  background: rgb(30 32 52);
}

.comment-like-btn.comment-liked img {
  opacity: 1;
}

/* --- TAGS --- */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: rgb(49 51 68 / 50%);
  color: rgb(255 255 255 / 70%);
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: default;
}


/* --- SCREENSHOTS --- */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  min-height: 160px;
}


.screenshots-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* --- SHARE CARD --- */
.share-card {
  padding: 12px;
  border-radius: 10px;
  background: rgb(49 51 68 / 40%);
}

.share-card-header {
  font-family: var(--font-head);
  color: rgb(241 241 241 / 95%);
  font-size: 18px;
  margin: 0 0 4px 0;
}

.share-card-body {
  font-size: 15px;
  color: rgb(241 241 241 / 80%);
  overflow-wrap: break-word;
  line-height: 1.4;
}

.share-card-footer {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.share-card-btn {
  box-sizing: border-box;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  background: rgb(52 55 75);
  color: rgb(255 255 255 / 70%);
}
