.search-img-fluid {
  width: 100px;
}
.upload-area {
  border: 2px dashed #4a3aff;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  font-family: sans-serif;
  color: #4a3aff;
  background: #f9f9ff;
  transition: 0.3s;
  cursor: pointer;
  max-width: 93%;
  margin: 20px auto;
}
.text-photo-notice {
  align-items: flex-start;
}
.upload-area.dragover {
  background: #eaeaff;
  border-color: #3729cc;
}
.upload-area p {
  margin: 0;
  font-family: THICCCBOI;
  font-size: 1.5rem;
  line-height: 1.8rem;
  font-weight: 800;
  color: #40444f;
}
#preview img {
  max-width: 200px;
  margin-top: 15px;
  border-radius: 5px;
}
.progress-container {
  margin-top: 10px;
  background: #f9f9ff;
  border-radius: 3px;
  overflow: hidden;
  height: 65px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.progress-bar {
  height: 6px;
  width: 0;
  background: #4a3aff;
  transition: width 0.3s;
}

/* Checkbox hình tròn */
.checkbox-circle {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  z-index: 999;
  padding-top: 1px;
}
.gallery-grid-item > img {
  position: relative;
  z-index: -1;
}
.checkbox-circle.selected {
  background: #007bff;
}

#download-btn {
  position: fixed;
  bottom: 60px;
  left: calc(50% - 61px);
  background: #838476;
  color: white;
  font-size: 11px;
  padding: 8px 0 8px 3px;
  border-radius: 24px;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 999;
  width: 130px;
  text-align: center;
}
#download-btn svg {
  position: relative;
  top: -2px;
  left: -3px;
  padding-left: 0px;
  display: inline-block;
}

#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  color: white;
  font-size: 18px;
  display: none;
}

#redirect-progress-container {
  display: none;
  text-align: center;
  padding: 20px;
}

#progress-container-hidden {
  height: 10px;
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
}
#redirect-progress-bar {
  height: 10px;
  width: 0;
  background: #4a3aff;
  transition: width 0.2s;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}
.spinner-border {
  width: 3rem;
  height: 3rem;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media screen and (max-width: 500px) {
  .mbt-0 {
    margin-top: 0 !important;
  }
  .upload-area p {
    font-size: 1.2rem;
    line-height: 1.3rem;
  }
  .gallery {
    padding-top: 0rem;
  }
}

.create-video-header {
  max-width: 1100px;
  margin: 32px auto;
  padding: 22px 26px;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.create-video-header h5 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  color: #ffe082;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.2px;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
.create-video-header .block-button {
  display: inline-flex;
}
.create-video-header .block-button button {
  margin: 0px 5px;
}

.create-video-sub {
  color: rgba(255, 255, 255, 0.85);
  margin-top: 8px;
  font-size: 0.92rem;
  opacity: 0.95;
}

.btn-create-primary {
  background: linear-gradient(180deg, #ffd64d, #ffb800);
  color: #4b0000;
  border: 0;
  padding: 10px 20px;
  font-weight: 800;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(255, 184, 0, 0.12),
    inset 0 -2px 0 rgba(0, 0, 0, 0.06);
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.btn-create-primary .btn-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-1px);
}

.btn-create-primary[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#videoPreviewModal .modal-content {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  border: none;
}

#videoPreviewModal .modal-dialog {
  max-width: 400px;
  margin: 1rem auto;
}

#videoPreviewModal .modal-body {
  padding: 10px !important;
  text-align: center;
}

#videoPreviewModal .grecaptcha-badge {
  bottom: 0px !important;
}

.preview-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 550px;
  overflow: hidden;
}

#preview-wrapper {
  position: relative;
  width: 360px;
  height: 640px;
  max-width: 90vw;
  max-height: 95vh;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

#preview-wrapper canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-controls {
  position: absolute;
  bottom: 46%;
  left: 46%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 30px;
  border-radius: 30px;
}
.video-controls.video_pause {
  opacity: 0;
}

#preview-wrapper:hover .video-controls {
  opacity: 1;
  pointer-events: auto;
}

#playPauseBtn {
  bottom: 0px;
  left: 52%;
  transform: translateX(-50%);
  z-index: 10;
  border-radius: 50%;
  padding: 0px;
  width: 60px;
  height: 60px;
}

#playPauseBtn:hover {
  background-color: transparent;
  border-color: transparent;
  color: #fff;
}
#playPauseBtn i{
  font-size: 38pt;
}

#videoPreviewModal #videoMessage {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: none;
  z-index: 2055;
  width: 100%;
  bottom: -1px;
}
.video-progress-container {
  position: absolute;
  bottom: 10px;
  left: 5%;
  width: 90%;
  height: 6px;
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
  overflow: hidden;
  display: none;
}

.video-progress-bar {
  height: 100%;
  width: 0%;
  background: #00ff99;
  transition: width 0.1s linear;
}
.video-time {
  position: absolute;
  bottom: 0px;
  left: 0px;
  width: 100px;
  font-size: 17px;
  font-family: monospace;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  display: none;
}

.video-time #currentTime {
  margin-right: 5px;
}

.video-time #totalTime {
  margin-left: 5px;
}

@media (min-width: 1024px) {
  #preview-wrapper {
    transform: scale(1);
  }
}

@media(max-width: 360px){
  #preview-wrapper {
    width: 90vw;
    height: min(calc(90vw*16/9), 95vh);
  }
}