/* Video Player Styles */
.video-player-wrapper {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.video-player {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.video-player-wrapper:hover .video-overlay {
  opacity: 1;
  pointer-events: auto;
}

.video-controls {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  pointer-events: auto;
}

.video-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.video-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.video-btn i {
  font-size: 16px;
}

.play-pause-btn {
  width: 50px;
  height: 50px;
}

.play-pause-btn i {
  font-size: 20px;
}

.video-progress {
  flex: 1;
  margin: 0 10px;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: #ff6b6b;
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s ease;
}

.video-volume {
  display: flex;
  align-items: center;
  gap: 10px;
}

.volume-slider {
  width: 80px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-volume:hover .volume-slider {
  opacity: 1;
}

.volume-slider input[type="range"] {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
}

.volume-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #ff6b6b;
  border-radius: 50%;
  cursor: pointer;
}

.volume-slider input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #ff6b6b;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.video-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  color: white;
  pointer-events: auto;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #ff6b6b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.video-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  color: white;
  text-align: center;
  pointer-events: auto;
}

.video-error i {
  font-size: 48px;
  color: #ff6b6b;
}

.retry-btn {
  background: #ff6b6b;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.retry-btn:hover {
  background: #ff5252;
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .video-controls {
    padding: 15px;
    gap: 10px;
  }
  
  .video-btn {
    width: 35px;
    height: 35px;
  }
  
  .play-pause-btn {
    width: 45px;
    height: 45px;
  }
  
  .volume-slider {
    width: 60px;
  }
  
  .video-volume:hover .volume-slider {
    opacity: 1;
  }
  
  /* Always show volume slider on mobile */
  .volume-slider {
    opacity: 1;
  }
}

/* Fullscreen styles */
.video-player-wrapper:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
}

.video-player-wrapper:-moz-full-screen {
  width: 100vw;
  height: 100vh;
}

.video-player-wrapper:fullscreen {
  width: 100vw;
  height: 100vh;
}

/* TV Mode Styles */
.tv-mode {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
}

.tv-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  color: white;
}

.tv-header i {
  font-size: 24px;
  color: #ff6b6b;
}

.tv-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.tv-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.tv-status .status-dot {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.tv-unavailable {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.6);
}

.tv-unavailable i {
  font-size: 48px;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.3);
}

/* Integration with existing players */
.player-section {
  margin-bottom: 30px;
}

.section-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 5px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
}

.toggle-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 12px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.toggle-btn.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-1px);
}

.toggle-btn:hover {
  color: white;
}

.player-content {
  display: none;
}

.player-content.active {
  display: block;
}

/* Media Player Integration Styles */
.media-player-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.radio-player-simple {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 15px;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.radio-info {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.radio-artwork {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.artwork-placeholder {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.8);
}

.radio-details h4 {
  margin: 0 0 5px 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.radio-details p {
  margin: 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

.radio-controls {
  display: flex;
  align-items: center;
}

.radio-play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-play-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.radio-play-btn:active {
  transform: scale(0.95);
}

/* Toggle Button Enhancements */
.toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.toggle-btn i {
  font-size: 16px;
}

/* Responsive Design for Media Player */
@media (max-width: 768px) {
  .radio-player-simple {
    padding: 20px;
    gap: 15px;
  }
  
  .radio-artwork {
    width: 50px;
    height: 50px;
  }
  
  .artwork-placeholder {
    font-size: 20px;
  }
  
  .radio-play-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .radio-details h4 {
    font-size: 1.1rem;
  }
  
  .radio-details p {
    font-size: 0.85rem;
  }
  
  .toggle-btn {
    font-size: 0.85rem;
    padding: 10px 15px;
  }
  
  .toggle-btn i {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .radio-player-simple {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  
  .radio-info {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .section-toggle {
    flex-direction: column;
    gap: 5px;
  }
  
  .toggle-btn {
    justify-content: center;
  }
}

/* Animation for mode switching */
.player-content {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.player-content.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Loading states */
.media-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.7);
  gap: 15px;
}

.media-loading .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Status indicators */
.stream-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 10px;
}

.stream-status.live {
  color: #4caf50;
}

.stream-status.offline {
  color: #f44336;
}

.stream-status.loading {
  color: #ff9800;
}

.status-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-indicator.pulse {
  animation: pulse 2s infinite;
}

/* TV Online Button Styles */
.tv-online-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
  margin-right: 15px;
}

.tv-online-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tv-online-btn i {
  font-size: 16px;
  color: #ff6b6b;
}

.tv-online-btn span {
  font-size: 0.85rem;
}

/* TV Popup Modal Styles */
.tv-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.tv-popup-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tv-popup-modal {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  width: 95vw;
  max-width: 1200px;
  max-height: 95vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.8) translateY(50px);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.tv-popup-overlay.active .tv-popup-modal {
  transform: scale(1) translateY(0);
}

.tv-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.tv-popup-header h3 {
  margin: 0;
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tv-popup-header h3 i {
  color: #ff6b6b;
  font-size: 1.4rem;
}

.tv-popup-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
}

.tv-popup-close:hover {
  background: rgba(255, 107, 107, 0.2);
  transform: scale(1.1);
}

.tv-popup-content {
  padding: 0;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.tv-popup-content .tv-mode {
  width: 100%;
  height: 100%;
  background: transparent;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.tv-popup-content .tv-header {
  display: none; /* Hide duplicate header */
}

.tv-popup-content .video-player-wrapper {
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  width: 100%;
  height: 100%;
  min-height: 500px;
}

.tv-popup-content .video-player {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.tv-popup-content .tv-status {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  z-index: 1000;
}

/* Loading and Error States in Popup */
.tv-popup-content .tv-unavailable {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.7);
}

.tv-popup-content .tv-unavailable i {
  font-size: 64px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.3);
}

.tv-popup-content .tv-unavailable h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: white;
}

.tv-popup-content .tv-unavailable p {
  font-size: 1rem;
  line-height: 1.5;
}

/* Responsive Design for TV Popup */
@media (max-width: 768px) {
  .tv-popup-modal {
    width: 95vw;
    max-height: 95vh;
    border-radius: 15px;
  }
  
  .tv-popup-header {
    padding: 15px 20px;
  }
  
  .tv-popup-header h3 {
    font-size: 1.1rem;
  }
  
  .tv-popup-content {
    padding: 20px;
    min-height: 300px;
  }
  
  .tv-online-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin-right: 10px;
  }
  
  .tv-online-btn span {
    display: none; /* Hide text on very small screens */
  }
}

@media (max-width: 480px) {
  .tv-popup-modal {
    width: 98vw;
    max-height: 98vh;
    border-radius: 10px;
  }
  
  .tv-popup-header {
    padding: 12px 15px;
  }
  
  .tv-popup-content {
    padding: 15px;
  }
}

/* Animation for popup appearance */
@keyframes tvPopupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.tv-popup-overlay.active .tv-popup-modal {
  animation: tvPopupFadeIn 0.3s ease-out;
}

/* Social section layout adjustment */
.social-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Fallback simple styles for TV popup */
.tv-popup-overlay.simple-fallback {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.9) !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.tv-popup-modal.simple-fallback {
  background: #1a1a2e !important;
  border-radius: 10px !important;
  width: 90vw !important;
  max-width: 800px !important;
  max-height: 80vh !important;
  overflow: hidden !important;
  transform: none !important;
}

/* Debug styles */
.debug-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: red;
  color: white;
  padding: 20px;
  z-index: 99999;
  border-radius: 10px;
}
/* Simple TV Player Styles */
#tv-video-simple {
  width: 100% !important;
  height: 100% !important;
  min-height: 500px !important;
  background: #000 !important;
  object-fit: contain !important;
  border-radius: 0 !important;
}

#tv-video-simple::-webkit-media-controls-panel {
  background-color: rgba(0, 0, 0, 0.8);
}

#tv-video-simple::-webkit-media-controls-play-button,
#tv-video-simple::-webkit-media-controls-pause-button {
  background-color: #ff6b6b;
  border-radius: 50%;
}

/* Full screen video in popup */
.tv-popup-content .tv-mode {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.tv-popup-content video {
  flex: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Status overlay */
.tv-popup-content .tv-status {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  z-index: 1000;
  pointer-events: none;
}

/* Responsive adjustments for popup */
@media (max-width: 768px) {
  .tv-popup-modal {
    width: 98vw;
    max-width: none;
    height: 95vh;
    max-height: none;
    border-radius: 10px;
  }
  
  #tv-video-simple {
    min-height: 400px !important;
  }
  
  .tv-popup-content .tv-status {
    bottom: 10px;
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .tv-popup-modal {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
  
  .tv-popup-header {
    padding: 10px 15px;
  }
  
  #tv-video-simple {
    min-height: 300px !important;
  }
}