/* Container for the video player */
.dmhplayer-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #000;
  overflow: hidden;
  font-family: 'Roboto', Arial, sans-serif;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  aspect-ratio: 16 / 9;
}

/* Fullscreen mode */
.dmhplayer-container:fullscreen {
  max-width: none;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

/* Pro mode styles */
.dmhplayer-pro {
  border: 2px solid #1e90ff;
  background: linear-gradient(to bottom, rgba(30, 144, 255, 0.1), rgba(0, 0, 0, 1));
}

/* Basic mode styles */
.dmhplayer-basic {
  border: 2px solid #555;
  background: #000;
}

/* Video element */
#dmhplayer {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* External video (YouTube, Facebook, TikTok) */
.dmhplayer-external-video {
  width: 100%;
  height: 100%;
}

/* Control bar */
.dmhplayer-controls {
  display: flex;
  align-items: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 8px 10px;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 100;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  gap: 8px;
}

/* Show control bar on hover or when active */
.dmhplayer-container:hover .dmhplayer-controls,
.dmhplayer-controls.active {
  opacity: 1;
  visibility: visible;
}

/* Buttons (play, volume, fullscreen, settings) */
.dmhplayer-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 6px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.dmhplayer-btn svg {
  fill: white;
  width: 20px;
  height: 20px;
}

.dmhplayer-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Play button */
.dmhplayer-play {
  width: 36px;
  height: 36px;
}

.dmhplayer-play svg {
  width: 24px;
  height: 24px;
}

/* Volume container */
.dmhplayer-volume {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 6px;
}

/* Volume slider (horizontal, hidden by default) */
.dmhplayer-volume-slider {
  width: 100px;
  height: 4px;
  background: #666;
  border-radius: 2px;
  cursor: pointer;
  -webkit-appearance: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.dmhplayer-volume:hover .dmhplayer-volume-slider,
.dmhplayer-volume.active .dmhplayer-volume-slider {
  opacity: 1;
  visibility: visible;
}

.dmhplayer-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #ff0000;
  border-radius: 50%;
  cursor: pointer;
}

.dmhplayer-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #ff0000;
  border-radius: 50%;
  cursor: pointer;
}

/* Seek bar */
.dmhplayer-seek {
  flex-grow: 1;
  margin: 0 8px;
  background: #666;
  border-radius: 2px;
  cursor: pointer;
  height: 4px;
  max-width: 300px;
  -webkit-appearance: none;
  position: relative;
}

.dmhplayer-seek-buffer {
  position: absolute;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  z-index: 1;
}

.dmhplayer-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #ff0000;
  border-radius: 50%;
  cursor: pointer;
}

.dmhplayer-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #ff0000;
  border-radius: 50%;
  cursor: pointer;
}

/* Seek tooltip */
.dmhplayer-seek-tooltip {
  position: absolute;
  top: -30px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  display: none;
  z-index: 150;
}

.dmhplayer-seek:hover .dmhplayer-seek-tooltip {
  display: block;
}

/* Time display */
.dmhplayer-time {
  color: white;
  font-size: 12px;
  margin: 0 6px;
  min-width: 80px;
  text-align: center;
}

/* Settings button */
.dmhplayer-settings {
  width: 32px;
  height: 32px;
}

.dmhplayer-settings svg {
  width: 20px;
  height: 20px;
}

/* Settings menu */
.dmhplayer-settings-menu {
  position: absolute;
  bottom: 50px;
  right: 10px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  border-radius: 4px;
  padding: 8px;
  z construc-index: 200;
  display: none;
}

.dmhplayer-settings-menu.active {
  display: block;
}

.dmhplayer-settings-item {
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
}

.dmhplayer-settings-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Fullscreen button */
.dmhplayer-fullscreen {
  width: 32px;
  height: 32px;
}

/* Watermark */
.dmhplayer-watermark {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 100;
  max-width: 80px;
  opacity: 0.7;
}

/* Ad container */
.dmhplayer-ad {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  background: #000;
}

/* Ad status */
.dmhplayer-ad-status {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  font-size: 12px;
  z-index: 250;
}

/* Ad video or image */
.dmhplayer-ad-video,
.dmhplayer-ad-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Skip ad button */
.dmhplayer-skip-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  z-index: 250;
  transition: background 0.2s ease;
}

.dmhplayer-skip-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Pause banner */
.dmhplayer-pause-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  max-height: 80%;
  z-index: 150;
}

/* Version display */
.dmhplayer-version {
  position: absolute;
  bottom: 10px;
  right: 10px;
  color: white;
  font-size: 12px;
  opacity: 0.7;
  z-index: 100;
}

/* Responsive design for smaller screens */
@media (max-width: 600px) {
  .dmhplayer-controls {
    padding: 6px 8px;
    gap: 6px;
  }

  .dmhplayer-btn {
    width: 28px;
    height: 28px;
  }

  .dmhplayer-btn svg {
    width: 18px;
    height: 18px;
  }

  .dmhplayer-play {
    width: 32px;
    height: 32px;
  }

  .dmhplayer-play svg {
    width: 20px;
    height: 20px;
  }

  .dmhplayer-volume-slider {
    width: 80px;
    height: 3px;
  }

  .dmhplayer-seek {
    max-width: 200px;
    height: 3px;
  }

  .dmhplayer-seek-buffer {
    height: 3px;
  }

  .dmhplayer-time {
    font-size: 11px;
    min-width: 60px;
  }

  .dmhplayer-settings-menu {
    right: 5px;
    padding: 6px;
  }

  .dmhplayer-settings-item {
    font-size: 11px;
    padding: 5px 10px;
  }

  .dmhplayer-skip-btn {
    bottom: 10px;
    right: 10px;
    padding: 5px 10px;
    font-size: 11px;
  }

  .dmhplayer-watermark {
    max-width: 60px;
  }
}