/* ============================================
   VIDEO MODAL - Compact Modern Player
   ============================================ */

.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2rem;
}

.video-modal.active {
  display: flex;
  animation: vmFadeIn 0.3s ease forwards;
}

@keyframes vmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.video-modal.closing {
  animation: vmFadeOut 0.2s ease forwards;
}

@keyframes vmFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ========== CONTAINER ========== */

.vm-container {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset;
  display: flex;
  max-width: 1200px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  animation: vmSlideUp 0.35s ease forwards;
}

@keyframes vmSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========== CLOSE ========== */

.vm-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
}

.vm-close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #222;
  transform: rotate(90deg);
}

.vm-close svg {
  width: 16px;
  height: 16px;
}

/* ========== VIDEO SIDE ========== */

.vm-video-side {
  flex: 1.3;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  min-width: 0;
}

.vm-video-wrapper {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.vm-video-wrapper video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
}

.vm-video-wrapper video::-webkit-media-controls {
  display: none !important;
}

/* Big play overlay */
.vm-big-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.vm-video-wrapper.paused .vm-big-play {
  opacity: 1;
}

.vm-big-play-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.vm-video-wrapper:hover .vm-big-play-icon {
  transform: scale(1.06);
}

.vm-big-play-icon svg {
  width: 22px;
  height: 22px;
  color: #222;
  margin-left: 2px;
}

/* ========== CONTROLS ========== */

.vm-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding: 0.45rem 0.65rem;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
}

.vm-ctrl-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.vm-ctrl-btn:hover {
  color: #222;
  background: rgba(0, 0, 0, 0.06);
}

.vm-ctrl-btn svg {
  width: 16px;
  height: 16px;
}

/* Progress */
.vm-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.vm-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  transition: height 0.15s ease;
}

.vm-progress-bar:hover {
  height: 6px;
}

.vm-progress-filled {
  height: 100%;
  background: #25d366;
  border-radius: 2px;
  width: 0%;
  position: relative;
  transition: width 0.1s linear;
}

.vm-progress-filled::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  background: #25d366;
  border-radius: 50%;
  transform: translateY(-50%) scale(0);
  transition: transform 0.15s ease;
  box-shadow: 0 0 6px rgba(37, 211, 102, 0.4);
}

.vm-progress-bar:hover .vm-progress-filled::after {
  transform: translateY(-50%) scale(1);
}

.vm-time {
  font-size: 0.72rem;
  color: #999;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  text-align: center;
}

/* Volume */
.vm-volume-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.vm-volume-slider {
  width: 0;
  height: 3px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 2px;
  outline: none;
  opacity: 0;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.vm-volume-group:hover .vm-volume-slider {
  opacity: 1;
  width: 60px;
}

.vm-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  background: #555;
  border-radius: 50%;
  cursor: pointer;
}

.vm-volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: #555;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

/* ========== INFO SIDE ========== */

.vm-info-side {
  width: 370px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.25rem 0.75rem;
  overflow-y: auto;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.vm-info-side::-webkit-scrollbar {
  width: 3px;
}

.vm-info-side::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
}

/* Tag */
.vm-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.2);
  border-radius: 16px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #1a9e4e;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 0.6rem;
  width: fit-content;
}

.vm-tag svg {
  width: 11px;
  height: 11px;
}

/* Title */
.vm-title {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.35rem;
  color: #1a1a1a;
}

/* Location */
.vm-location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 1rem;
}

.vm-location svg {
  width: 13px;
  height: 13px;
  color: #25d366;
  flex-shrink: 0;
}

/* Divider */
.vm-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 0 0 1rem;
}

/* Description */
.vm-desc {
  font-size: 0.82rem;
  line-height: 1.6;
  color: #666;
  margin: 0 0 1rem;
}

/* Specs */
.vm-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.vm-spec {
  padding: 0.7rem;
  background: rgba(0, 0, 0, 0.025);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  text-align: center;
}

.vm-spec-label {
  display: block;
  font-size: 0.62rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.vm-spec-value {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #1a9e4e;
}

/* Features */
.vm-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

.vm-features .feat-check-item {
  padding: 0.3rem 0.6rem;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 6px;
  font-size: 0.72rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.vm-features .feat-check-item svg {
  width: 11px;
  height: 11px;
  color: #25d366;
}

/* CTA */
.vm-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #25d366;
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  transition: all 0.25s ease;
  margin-top: auto;
}

.vm-cta:hover {
  background: #20b858;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.vm-cta svg {
  width: 16px;
  height: 16px;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 900px) {
  .video-modal {
    padding: 1rem;
  }

  .vm-container {
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
  }

  .vm-video-side {
    flex: none;
    padding: 1rem 1rem 0.75rem;
  }

  .vm-info-side {
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1rem;
  }

  .vm-close {
    top: 0.5rem;
    right: 0.5rem;
  }
}

@media (max-width: 540px) {
  .video-modal {
    padding: 0.5rem;
  }

  .vm-container {
    border-radius: 14px;
    max-height: 92vh;
  }

  .vm-video-side {
    padding: 0.75rem 0.75rem 0.5rem;
  }

  .vm-video-wrapper {
    border-radius: 10px;
  }

  .vm-controls {
    gap: 0.3rem;
    padding: 0.35rem 0.5rem;
  }

  .vm-ctrl-btn {
    width: 28px;
    height: 28px;
  }

  .vm-volume-group {
    display: none;
  }

  .vm-info-side {
    padding: 0.75rem;
  }

  .vm-title {
    font-size: 1.1rem;
  }

  .vm-big-play-icon {
    width: 46px;
    height: 46px;
  }

  .vm-big-play-icon svg {
    width: 18px;
    height: 18px;
  }
}
