/* Video modal overlay */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal {
  width: 720px;
  max-width: 90vw;
  background: #111214;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

/* Top-right action buttons */
.video-modal-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.video-action-icon {
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.55);
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.video-action-icon:hover {
  background: rgba(0,0,0,0.75);
}

/* Transparent overlay to block pause/play clicks on the video */
.video-click-blocker {
  position: absolute;
  inset: 0;
  z-index: 5;
  cursor: default;
}

/* Video player */
.video-player-area {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  overflow: hidden;
}

.video-iframe,
#ytPlayer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

#ytPlayer iframe {
  width: 100%;
  height: 100%;
}

/* Splash image shown after video ends */
.video-splash-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

/* Light darkening + bottom gradient on splash */
.video-player-area.splash-active::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(to bottom, transparent 55%, rgba(0, 0, 0, 0.9) 100%),
    rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

/* Progress bar — floats inside video area */
.video-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  position: absolute;
  bottom: 8px;
  left: 12px;
  right: 12px;
  z-index: 7;
  border-radius: 2px;
}

.video-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #23a55a, #4ade80);
  border-radius: 2px;
  transition: width 0.1s linear;
  width: 0%;
  position: relative;
  box-shadow:
    0 0 4px rgba(255, 255, 255, 0.6),
    0 0 10px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(255, 255, 255, 0.3),
    0 0 40px rgba(200, 255, 220, 0.2);
}

.video-progress-fill::after {
  content: '';
  position: absolute;
  top: 25%;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(90deg, rgba(255,255,255,0.5), rgba(255,255,255,0.85));
  border-radius: 1px;
  filter: blur(0.3px);
}

.video-progress-fill.progress-white {
  background: #fff;
  box-shadow: none;
}

.video-progress-fill.progress-white::after {
  display: none;
}

/* Video controls bar (over gradient inside video area) */
.video-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: transparent;
  color: #b5bac1;
  font-size: 14px;
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  z-index: 6;
}

.video-controls-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.video-controls-left i,
.video-controls-right i {
  font-size: 14px;
}

.video-timestamp {
  font-size: 13px;
  color: #949ba4;
}

/* Sign up CTA that appears at end */
.video-end-cta {
  position: absolute;
  bottom: 52px;
  right: 24px;
  background: rgba(30, 31, 34, 0.85);
  backdrop-filter: blur(8px);
  color: #f2f3f5;
  padding: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: stretch;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.video-end-cta-text {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.video-end-cta-sub {
  font-weight: 400;
  font-size: 13px;
  color: #949ba4;
}

.video-end-cta-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-left: 1px solid rgba(255,255,255,0.1);
  font-size: 20px;
  color: #949ba4;
}

/* Bottom bar */
.video-modal-bottom {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #111214;
  gap: 12px;
}

.quest-bottom-icon-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.quest-bottom-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #111214;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: absolute;
  top: 4px;
  left: 4px;
}

.quest-progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  transform: rotate(-90deg);
}

.quest-progress-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3.5;
}

.quest-progress-ring-fill {
  fill: none;
  stroke: #23a55a;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 131.95;
  stroke-dashoffset: 131.95;
  transition: stroke-dashoffset 0.1s linear;
}

.quest-bottom-icon .quest-orb-gif {
  width: 200%;
  height: 200%;
  object-fit: cover;
  flex-shrink: 0;
}

.quest-bottom-info {
  flex: 1;
  min-width: 0;
}

.quest-bottom-title {
  font-size: 14px;
  font-weight: 700;
  color: #f2f3f5;
}

.quest-bottom-meta {
  font-size: 12px;
  color: #949ba4;
  display: flex;
  align-items: center;
  gap: 4px;
}

.quest-bottom-verified {
  color: #23a55a;
  font-size: 12px;
}

.quest-bottom-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.signup-btn {
  background: #5865f2;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.signup-btn:hover {
  background: #4752c4;
}

/* Claim reward button (hidden until video completes) */
.claim-reward-btn {
  background: transparent;
  color: #6d6f78;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  white-space: nowrap;
}

.claim-reward-btn.active {
  color: #f2f3f5;
  cursor: pointer;
}

.claim-reward-btn .lock-icon {
  font-size: 14px;
}
