
.video-player-final {
  width: 100%;
  max-width: 900px;
  margin: 25px auto;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  background: #fff;
  border: 1px solid #e0e0e0;
  position: relative;
  transition: all 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, sans-serif;
}


.video-display-area {
  position: relative;
  width: 100%;
  padding-top: 56.25%; 
  background: #000;
  overflow: hidden;
}

.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}


.main-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain; 
  display: block;
  background: #000;
  transition: all 0.3s ease;
}


.video-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.video-loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.loading-animation {
  text-align: center;
  color: white;
  animation: pulse 1.5s infinite;
}

.loading-animation i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: block;
  color: #e74c3c;
}

.loading-animation span {
  display: block;
  font-size: 1.1rem;
  color: #ecf0f1;
  font-weight: 500;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}


.video-center-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background: rgba(231, 76, 60, 0.9);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.video-center-play-btn:hover {
  background: #e74c3c;
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.video-center-play-btn.visible {
  opacity: 1;
  visibility: visible;
  animation: buttonFadeIn 0.3s ease;
}

@keyframes buttonFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}


.video-floating-indicators {
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 15px;
  z-index: 6;
  pointer-events: none;
}

.floating-indicator {
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 8px 15px;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-indicator.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  animation: indicatorSlideIn 0.3s ease;
}

.floating-indicator i {
  font-size: 0.9rem;
}

@keyframes indicatorSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.video-controls-panel {
  background: #f8f9fa;
  padding: 15px 20px;
  border-top: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}


.video-meta-info {
  margin-bottom: 15px;
  animation: fadeIn 0.5s ease;
}

.video-current-title {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  color: #2c3e50;
  font-weight: 700;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.video-current-description {
  margin: 0;
  font-size: 0.9rem;
  color: #7f8c8d;
  line-height: 1.5;
  max-height: 3em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}


.video-progress-section {
  margin-bottom: 20px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 8px;
  position: relative;
  transition: all 0.3s ease;
}

.progress-track:hover {
  height: 8px;
}

.progress-slider {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #e74c3c, #ff7979);
  border-radius: 3px;
  position: relative;
  transition: width 0.1s linear;
}

.progress-slider::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

.slider-thumb {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: #e74c3c;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  cursor: grab;
}

.slider-thumb:active {
  cursor: grabbing;
  transform: translateY(-50%) scale(1.2);
}

.progress-track:hover .slider-thumb {
  opacity: 1;
  visibility: visible;
}

.time-indicators {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #7f8c8d;
  font-weight: 500;
}

.time-separator {
  margin: 0 5px;
  opacity: 0.7;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}


.main-controls-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  animation: slideUp 0.5s ease;
}

.controls-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.control-button {
  background: white;
  border: 2px solid #e0e0e0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #2c3e50;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
}

.control-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(52, 152, 219, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.control-button:hover::before {
  width: 100px;
  height: 100px;
}

.control-button:hover {
  background: #f0f0f0;
  border-color: #bdc3c7;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.control-button.active {
  background: #e74c3c;
  color: white;
  border-color: #e74c3c;
  animation: activePulse 0.6s ease;
}

.control-button:active {
  transform: scale(0.95);
}

@keyframes activePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}


.main-play-button {
  width: 50px;
  height: 50px;
  font-size: 1.3rem;
  background: #e74c3c;
  color: white;
  border-color: #e74c3c;
}

.main-play-button:hover {
  background: #c0392b;
  border-color: #c0392b;
}

.main-play-button.playing {
  background: #27ae60;
  border-color: #27ae60;
}


.video-counter-display {
  background: #2c3e50;
  color: white;
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 700;
  min-width: 80px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.video-counter-display:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.counter-separator {
  color: #bdc3c7;
  margin: 0 3px;
}


.function-button {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

.function-button:hover {
  background: #2980b9;
  border-color: #2980b9;
}

.action-button {
  background: #2ecc71;
  color: white;
  border-color: #2ecc71;
}

.action-button:hover {
  background: #27ae60;
  border-color: #27ae60;
}


.mobile-touch-controls {
  display: none;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  animation: slideUp 0.5s ease;
}

.touch-controls-row {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.touch-control-button {
  background: white;
  border: 2px solid #3498db;
  min-width: 70px;
  height: 70px;
  border-radius: 15px;
  color: #3498db;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.4rem;
  padding: 10px;
  flex: 1;
  max-width: 100px;
  position: relative;
  overflow: hidden;
}

.touch-control-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(52, 152, 219, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.touch-control-button:hover::after,
.touch-control-button:active::after {
  width: 200px;
  height: 200px;
}

.touch-control-button:hover,
.touch-control-button:active {
  background: #3498db;
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 20px rgba(52, 152, 219, 0.3);
}

.touch-control-button.large-touch-button {
  min-width: 90px;
  height: 90px;
  font-size: 1.8rem;
  background: #e74c3c;
  color: white;
  border-color: #e74c3c;
}

.touch-control-button.large-touch-button:hover,
.touch-control-button.large-touch-button:active {
  background: #c0392b;
  border-color: #c0392b;
  box-shadow: 0 5px 20px rgba(231, 76, 60, 0.3);
}

.touch-label {
  font-size: 0.75rem;
  margin-top: 5px;
  font-weight: 600;
  text-align: center;
  transition: color 0.3s ease;
}

.touch-control-button:hover .touch-label,
.touch-control-button:active .touch-label {
  color: white;
}

.touch-control-button.play-button {
  background: #2ecc71;
  color: white;
  border-color: #2ecc71;
}

.touch-control-button.play-button:hover {
  background: #27ae60;
  border-color: #27ae60;
}


.volume-slider-container {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 15px 20px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  width: 250px;
  max-width: 90vw; 
  box-sizing: border-box; 
}

.volume-slider-container.visible {
  opacity: 1;
  visibility: visible;
  bottom: 130px;
  animation: volumeSliderIn 0.3s ease;
}

.volume-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  width: 100%;
}

.volume-icon-low,
.volume-icon-high {
  color: #7f8c8d;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.volume-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, #e74c3c, #3498db);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 0; 
}

.volume-slider:hover {
  height: 8px;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 3px solid #e74c3c;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: 3px solid #e74c3c;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.volume-percentage {
  text-align: center;
  font-size: 0.9rem;
  color: #2c3e50;
  font-weight: 600;
  margin-top: 5px;
  transition: all 0.3s ease;
}

@keyframes volumeSliderIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}


.settings-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.settings-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.settings-menu-container {
  background: white;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: settingsSlideIn 0.3s ease;
  transform-origin: center center;
}

@keyframes settingsSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-menu-header {
  background: linear-gradient(135deg, #2c3e50, #4a6491);
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.settings-menu-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shimmerHeader 3s infinite;
}

@keyframes shimmerHeader {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.settings-menu-header h3 {
  margin: 0;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.settings-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.settings-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.settings-menu-content {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(80vh - 80px);
}


.settings-group {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid #eee;
  animation: fadeIn 0.5s ease;
}

.settings-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.settings-group h4 {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


.speed-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.speed-option {
  flex: 1;
  min-width: 70px;
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #7f8c8d;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.speed-option::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(52, 152, 219, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.speed-option:hover::before {
  left: 100%;
}

.speed-option:hover {
  background: #e9ecef;
  border-color: #bdc3c7;
  transform: translateY(-2px);
}

.speed-option.active {
  background: #3498db;
  color: white;
  border-color: #3498db;
  animation: optionSelect 0.3s ease;
}

@keyframes optionSelect {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}


.quality-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quality-option {
  flex: 1;
  min-width: 90px;
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #7f8c8d;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.quality-option:hover {
  background: #e9ecef;
  border-color: #bdc3c7;
  transform: translateY(-2px);
}

.quality-option.active {
  background: #2ecc71;
  color: white;
  border-color: #2ecc71;
}


.settings-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.setting-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.setting-option:hover {
  background: #f8f9fa;
}

.setting-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #3498db;
}

.option-label {
  font-size: 1rem;
  color: #2c3e50;
  font-weight: 500;
  flex: 1;
}


.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-btn {
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.action-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.action-btn:hover::after {
  width: 300px;
  height: 300px;
}

.action-btn:hover {
  background: #e9ecef;
  border-color: #bdc3c7;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.restart-btn {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

.restart-btn:hover {
  background: #2980b9;
  border-color: #2980b9;
}

.download-btn {
  background: #2ecc71;
  color: white;
  border-color: #2ecc71;
}

.download-btn:hover {
  background: #27ae60;
  border-color: #27ae60;
}

.share-btn {
  background: #9b59b6;
  color: white;
  border-color: #9b59b6;
}

.share-btn:hover {
  background: #8e44ad;
  border-color: #8e44ad;
}


.video-info-display {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed #dee2e6;
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95rem;
}

.info-value {
  color: #7f8c8d;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: "Courier New", monospace;
}


.video-player-final.fullscreen-active {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  max-width: none !important;
  background: #000 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  animation: fullscreenFadeIn 0.3s ease;
}

@keyframes fullscreenFadeIn {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 1;
  }
}

.video-player-final.fullscreen .video-display-area,
.video-player-final.fullscreen-active .video-display-area {
  padding-top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #000 !important;
  border-radius: 0 !important;
}

.video-player-final.fullscreen .video-container,
.video-player-final.fullscreen-active .video-container {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}


.video-player-final.fullscreen .main-video-player,
.video-player-final.fullscreen-active .main-video-player {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}


@media (orientation: portrait) {
  .video-player-final.fullscreen .main-video-player,
  .video-player-final.fullscreen-active .main-video-player {
    width: 100% !important;
    height: auto !important;
  }
}

@media (orientation: landscape) {
  .video-player-final.fullscreen .main-video-player,
  .video-player-final.fullscreen-active .main-video-player {
    width: auto !important;
    height: 100% !important;
  }
}


.video-player-final.fullscreen .video-controls-panel,
.video-player-final.fullscreen-active .video-controls-panel {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.7),
    transparent
  ) !important;
  color: white !important;
  border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
  padding: 15px 20px !important;
  z-index: 10 !important;
  opacity: 0.9 !important;
  transition: opacity 0.3s ease !important;
  border-radius: 0 !important;
}

.video-player-final.fullscreen .video-controls-panel:hover,
.video-player-final.fullscreen-active .video-controls-panel:hover {
  opacity: 1 !important;
}

.video-player-final.fullscreen .video-current-title,
.video-player-final.fullscreen .video-current-description,
.video-player-final.fullscreen .time-indicators,
.video-player-final.fullscreen-active .video-current-title,
.video-player-final.fullscreen-active .video-current-description,
.video-player-final.fullscreen-active .time-indicators {
  color: white !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

.video-player-final.fullscreen .touch-control-button,
.video-player-final.fullscreen-active .touch-control-button {
  background: rgba(255, 255, 255, 0.15) !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  -webkit-backdrop-filter: blur(5px) !important;
  backdrop-filter: blur(5px) !important;
}

.video-player-final.fullscreen .touch-control-button:hover,
.video-player-final.fullscreen .touch-control-button:active,
.video-player-final.fullscreen-active .touch-control-button:hover,
.video-player-final.fullscreen-active .touch-control-button:active {
  background: rgba(255, 255, 255, 0.25) !important;
  transform: scale(1.05) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.video-player-final.fullscreen .touch-control-button.large-touch-button,
.video-player-final.fullscreen-active .touch-control-button.large-touch-button {
  background: rgba(231, 76, 60, 0.9) !important;
  border-color: rgba(231, 76, 60, 0.9) !important;
}

.video-player-final.fullscreen .touch-control-button.large-touch-button:hover,
.video-player-final.fullscreen-active
  .touch-control-button.large-touch-button:hover {
  background: rgba(231, 76, 60, 1) !important;
  border-color: rgba(231, 76, 60, 1) !important;
}

.video-player-final.fullscreen .progress-track,
.video-player-final.fullscreen-active .progress-track {
  background: rgba(255, 255, 255, 0.2) !important;
}

.video-player-final.fullscreen .progress-slider,
.video-player-final.fullscreen-active .progress-slider {
  background: linear-gradient(90deg, #e74c3c, #ff7979) !important;
}



.fullscreen-active {

  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}


.fullscreen-close-btn {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  z-index: 1000001 !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border: none !important;
  color: white !important;
  width: 50px !important;
  height: 50px !important;
  border-radius: 50% !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 20px !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
  transition: all 0.3s !important;
}

.fullscreen-close-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.1) !important;
}

.video-player-final.fullscreen .fullscreen-close-btn,
.video-player-final.fullscreen-active .fullscreen-close-btn {
  display: flex !important;
  animation: fadeInRight 0.5s ease !important;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}


.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999998;
  pointer-events: none;
  display: none;
}

.fullscreen-overlay.active {
  display: block;
  pointer-events: auto;
}

.fullscreen-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 999999;
  pointer-events: auto;
}

.back-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  transition: background 0.3s;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.video-title-fullscreen {
  color: white;
  font-size: 18px;
  margin: 0;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.video-player-final.fullscreen-active .video-display-area {
  height: 100vh !important;
  padding-top: 0 !important;
  border-radius: 0 !important;
}

.video-player-final.fullscreen-active video {
  object-fit: contain !important;
  background: #000 !important;
}


.video-player-final.fullscreen-active .video-controls-panel {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
}



body:not(:fullscreen) .video-player-final:not(.fullscreen-active),
body:not(:-webkit-full-screen) .video-player-final:not(.fullscreen-active),
body:not(:-moz-full-screen) .video-player-final:not(.fullscreen-active) {
  all: unset !important;
  position: relative !important;
  width: 100% !important;
  max-width: 900px !important;
  margin: 25px auto !important;
  border-radius: 15px !important;
  overflow: visible !important;
  background: white !important;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid #e0e0e0 !important;
  display: block !important;
  height: auto !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  transform: none !important;
}


.video-player-final:not(.fullscreen-active) .video-display-area {
  padding-top: 56.25% !important;
  border-radius: 12px 12px 0 0 !important;
  position: relative !important;
  height: auto !important;
  background: #000 !important;
}

.video-player-final:not(.fullscreen-active) .video-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.video-player-final:not(.fullscreen-active) .main-video-player {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  background: #000 !important;
  position: static !important;
  transform: none !important;
  top: auto !important;
  left: auto !important;
}

.video-player-final:not(.fullscreen-active) .video-controls-panel {
  background: #f8f9fa !important;
  padding: 15px 20px !important;
  border-top: 1px solid #e0e0e0 !important;
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  color: inherit !important;
  border-radius: 0 0 15px 15px !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  opacity: 1 !important;
}

.video-player-final:not(.fullscreen-active) .video-current-title,
.video-player-final:not(.fullscreen-active) .video-current-description,
.video-player-final:not(.fullscreen-active) .time-indicators {
  color: inherit !important;
  text-shadow: none !important;
}

.video-player-final:not(.fullscreen-active) .touch-control-button {
  background: white !important;
  color: #3498db !important;
  border-color: #3498db !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.video-player-final:not(.fullscreen-active) .progress-track {
  background: #e0e0e0 !important;
}

.video-player-final:not(.fullscreen-active) .progress-slider {
  background: linear-gradient(90deg, #e74c3c, #ff7979) !important;
}

.video-player-final:not(.fullscreen-active) .fullscreen-close-btn {
  display: none !important;
}

.video-player-final:not(.fullscreen-active) .video-floating-indicators {
  display: flex !important;
}

.video-player-final:not(.fullscreen-active) .video-center-play-btn {
  display: flex !important;
}


body > .video-player-final:not(.fullscreen-active) {
  position: relative !important;
  transform: none !important;
}


.video-player-final:not(.fullscreen-active),
.video-player-final:not(.fullscreen-active) * {
  transform: none !important;
}


body:not(:fullscreen) {
  overflow-y: auto !important;
  position: static !important;
}


.video-player-final.fullscreen .video-floating-indicators,
.video-player-final.fullscreen-active .video-floating-indicators {
  display: none !important;
}

.video-player-final.fullscreen .video-center-play-btn,
.video-player-final.fullscreen-active .video-center-play-btn {
  display: none !important;
}


@media (max-width: 768px) {
  .video-player-final {
    border-radius: 10px;
    margin: 12px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .video-controls-panel {
    padding: 10px 12px;
  }

  .video-current-title {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  .video-current-description {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-height: 1.4;
  }


  .main-controls-section {
    display: none;
  }


  .mobile-touch-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
  }


  .touch-controls-row {
    display: flex;
    gap: 6px;
    justify-content: center;
  }

  .touch-control-button {
    min-width: 50px;
    height: 50px;
    font-size: 1rem;
    border-radius: 8px;
    padding: 8px;
    flex: 1;
    max-width: 70px;
  }

  .touch-control-button.large-touch-button {
    min-width: 55px;
    height: 55px;
    font-size: 1.2rem;
    max-width: 75px;
  }

  .touch-label {
    font-size: 0.6rem;
    margin-top: 3px;
    line-height: 1.2;
  }


  .volume-slider-container {
    width: 180px;
    padding: 10px 12px;
    bottom: 100px;
    max-width: 80vw;
    left: 50%;
    transform: translateX(-50%);
  }

  .volume-slider-container.visible {
    bottom: 110px;
  }

  .volume-slider-wrapper {
    gap: 6px;
  }

  .volume-slider {
    height: 5px;
  }

  .volume-slider::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
  }


  .settings-menu-container {
    width: 92%;
    max-height: 80vh;
    border-radius: 12px;
  }

  .settings-menu-content {
    max-height: calc(80vh - 70px);
    padding: 15px;
  }

  .settings-group {
    margin-bottom: 20px;
    padding-bottom: 20px;
  }

  .speed-option,
  .quality-option {
    min-width: 55px;
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .action-btn {
    padding: 10px 12px;
    font-size: 0.9rem;
    min-height: 44px;
  }

  .video-counter-display {
    min-width: 65px;
    padding: 5px 10px;
    font-size: 0.85rem;
  }


  .video-center-play-btn {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }


  .floating-indicator {
    padding: 6px 10px;
    font-size: 0.75rem;
  }


  .time-indicators {
    font-size: 0.75rem;
  }


  .progress-track {
    height: 4px;
    margin-bottom: 6px;
  }


  .fullscreen-header {
    padding: 15px;
  }

  .back-btn {
    padding: 8px 12px;
    font-size: 14px;
  }

  .video-title-fullscreen {
    font-size: 16px;
  }

  .fullscreen-close-btn {
    top: 15px !important;
    right: 15px !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 18px !important;
  }

  .video-player-final.fullscreen-active .video-controls-panel,
  .video-player-final.fullscreen .video-controls-panel {
    padding: 15px !important;
  }

  .video-player-final.fullscreen-active .control-btn,
  .video-player-final.fullscreen .control-btn {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  .video-player-final {
    margin: 8px auto;
    border-radius: 8px;
  }

  .video-controls-panel {
    padding: 8px 10px;
  }

  .video-current-title {
    font-size: 0.95rem;
  }

  .video-current-description {
    font-size: 0.75rem;
  }

  .touch-controls-row {
    gap: 4px;
  }

  .touch-control-button {
    min-width: 45px;
    height: 45px;
    font-size: 0.9rem;
    border-radius: 6px;
    padding: 6px;
    max-width: 65px;
  }

  .touch-control-button.large-touch-button {
    min-width: 48px;
    height: 48px;
    font-size: 1.1rem;
    max-width: 68px;
  }

  .touch-label {
    font-size: 0.55rem;
    margin-top: 2px;
  }


  @media (max-width: 360px) {
    .touch-control-button {
      min-width: 42px;
      height: 42px;
      font-size: 0.85rem;
      max-width: 60px;
    }

    .touch-control-button.large-touch-button {
      min-width: 45px;
      height: 45px;
      font-size: 1rem;
      max-width: 63px;
    }

    .touch-label {
      font-size: 0.5rem;
    }
  }


  .settings-menu-header {
    padding: 12px;
  }

  .settings-menu-header h3 {
    font-size: 1rem;
  }

  .settings-close-btn {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }

  .settings-menu-content {
    padding: 12px;
  }

  .speed-buttons,
  .quality-buttons {
    gap: 6px;
  }

  .speed-option,
  .quality-option {
    min-width: 45px;
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  .action-btn {
    padding: 8px 10px;
    font-size: 0.85rem;
    min-height: 40px;
  }


  .video-center-play-btn {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }


  .volume-slider-container {
    width: 160px;
    padding: 8px 10px;
    bottom: 90px;
    max-width: 75vw;
  }

  .volume-slider-container.visible {
    bottom: 100px;
  }

  .volume-slider-wrapper {
    gap: 4px;
  }

  .volume-icon-low,
  .volume-icon-high {
    font-size: 0.85rem;
  }

  .volume-percentage {
    font-size: 0.75rem;
  }


  .floating-indicator {
    font-size: 0.7rem;
    padding: 5px 8px;
  }
}


@media (max-width: 768px) and (orientation: landscape) {
  .mobile-touch-controls {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .touch-controls-row {
    flex: 1;
    min-width: 50%;
  }

  .touch-control-button {
    min-width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }

  .touch-control-button.large-touch-button {
    min-width: 45px;
    height: 45px;
    font-size: 1rem;
  }

  .touch-label {
    font-size: 0.55rem;
  }

  .video-center-play-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
}


@media (hover: none) and (pointer: coarse) {
  .touch-control-button,
  .video-center-play-btn,
  .control-button,
  .modal-close,
  .nav-btn {
    min-height: 44px;
  }

  .touch-control-button:active,
  .video-center-play-btn:active,
  .control-button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
}


button:focus {
  outline: 3px solid #3498db;
  outline-offset: 2px;
}

button:active {
  transform: scale(0.95) !important;
}


@keyframes buttonPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.button-pulse {
  animation: buttonPulse 0.3s ease;
}


#main-play-button.playing i::before {
  content: "\f04c";
}

#main-play-button.paused i::before {
  content: "\f04b";
}

#volume-toggle.muted i::before {
  content: "\f026";
}

#volume-toggle.unmuted i::before {
  content: "\f028";
}

#fullscreen-toggle.fullscreen i::before {
  content: "\f066";
}

#fullscreen-toggle.normal i::before {
  content: "\f065";
}


.video-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #2c3e50, #4a6491);
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  z-index: 10000;
  font-size: 0.95rem;
  animation: slideInRight 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-left: 4px solid #e74c3c;
  max-width: 300px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  font-weight: 500;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}


@supports (-webkit-touch-callout: none) {
  .touch-control-button {
    -webkit-tap-highlight-color: transparent;
  }

  .video-player-final.fullscreen .main-video-player,
  .video-player-final.fullscreen-active .main-video-player {
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
  }
}


@media (prefers-contrast: high) {
  .control-button {
    border-width: 3px;
  }

  .progress-slider {
    background: #ff0000;
  }

  .volume-slider {
    background: linear-gradient(to right, #0000ff, #ff0000);
  }
}


.video-player-final {
  animation: playerEntrance 0.6s ease;
}

@keyframes playerEntrance {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


@media (max-width: 350px) {
  .video-player-final.fullscreen .video-controls-panel,
  .video-player-final.fullscreen-active .video-controls-panel {
    padding: 10px 12px;
  }

  .video-player-final.fullscreen .touch-control-button,
  .video-player-final.fullscreen-active .touch-control-button {
    min-width: 55px;
    height: 55px;
    font-size: 1rem;
  }

  .video-player-final.fullscreen .touch-control-button.large-touch-button,
  .video-player-final.fullscreen-active
    .touch-control-button.large-touch-button {
    min-width: 70px;
    height: 70px;
    font-size: 1.3rem;
  }

  .touch-label {
    font-size: 0.6rem;
  }

  .fullscreen-close-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    top: 10px;
    right: 10px;
  }


  .volume-slider-container {
    width: 160px;
    padding: 8px 10px;
    bottom: 90px;
    max-width: 75vw;
  }

  .volume-slider-container.visible {
    bottom: 100px;
  }

  .volume-slider-wrapper {
    gap: 4px;
  }

  .volume-icon-low,
  .volume-icon-high {
    font-size: 0.9rem;
  }

  .volume-slider {
    height: 5px;
  }

  .volume-percentage {
    font-size: 0.75rem;
  }
}


.control-button,
.touch-control-button,
.action-btn,
.speed-option,
.quality-option {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


.video-player-final {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.volume-slider-container {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}


.video-player-final {
  overflow: visible;
}

.video-display-area {
  border-radius: 12px 12px 0 0;
}

.video-controls-panel {
  border-radius: 0 0 12px 12px;
}


@media (prefers-color-scheme: dark) {
  .video-player-final:not(.fullscreen):not(.fullscreen-active) {
    background: #1a1a1a;
    border-color: #333;
  }

  .video-controls-panel {
    background: #2d2d2d;
    border-color: #444;
  }

  .video-current-title {
    color: #fff;
  }

  .video-current-description {
    color: #aaa;
  }

  .control-button {
    background: #333;
    border-color: #444;
    color: #fff;
  }

  .control-button:hover {
    background: #444;
  }

  .progress-track {
    background: #444;
  }

  .time-indicators {
    color: #aaa;
  }

  .video-counter-display {
    background: #444;
  }
}
