* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: #f9f9f9;
  color: #111;
  padding: 20px;
}

/* Navigation Menu Styling */
.navbar {
  background: linear-gradient(135deg, #e62117 0%, #ff6b6b 100%);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: bold;
  font-size: 20px;
}

.logo-icon {
  font-size: 28px;
  animation: bounce 2s infinite;
}

.logo-text {
  font-size: 22px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

.nav-menu {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.3);
  font-weight: bold;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle:hover span {
  background: #f0f0f0;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  font-size: 2.5rem;
  color: #e62117;
  margin: 10px 0px;
}

/* Flash Message Styling */
.flash-message {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.5s ease;
  position: relative;
  overflow: hidden;
}

.flash-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

.flash-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  position: relative;
  z-index: 1;
}

.flash-icon {
  font-size: 20px;
  animation: pulse 2s infinite;
}

.flash-text {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.flash-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.flash-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 10px;
}

.video-card {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  transition: transform 0.2s ease-in-out;
}

.video-card:hover {
  transform: translateY(-5px);
}

.video-wrapper {
  position: relative;
  cursor: pointer;
}

.video-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: #e62117;
  animation: spin 0.8s ease-in-out infinite;
  display: none;
  z-index: 10;
}

.video-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 50px;
  color: white;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  padding: 15px 20px;
  opacity: 0.8;
  transition: all 0.3s ease;
  pointer-events: none;
}

.video-wrapper:hover .play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-info h3 {
  font-size: 18px;
  margin-bottom: 5px;
  color: #333;
}

.video-info p {
  font-size: 14px;
  color: #777;
}
.msg{
    margin: 5px;
    text-align: center;
    line-height: 150%;
}
.Note{
    color: #e62117;
    font-weight: bold;
}
.get-code-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #e62117;
  color: white;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
  margin-top: 10px;
}

.get-code-btn:hover {
  background-color: #b31217;
}

.video-info {
  padding: 15px;
  text-align: center; /* centers the button */
}

/* Custom Popup Styling */
.custom-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.popup-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
  position: relative;
}

.popup-header {
  margin-bottom: 25px;
}

.popup-header h2 {
  color: #e62117;
  font-size: 24px;
  margin-bottom: 10px;
}

.popup-header p {
  color: #666;
  font-size: 16px;
}

.popup-input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 20px;
  transition: border-color 0.3s ease;
  text-align: center;
  font-weight: bold;
  letter-spacing: 2px;
}

.popup-input:focus {
  outline: none;
  border-color: #e62117;
  box-shadow: 0 0 0 3px rgba(230, 33, 23, 0.1);
}

.popup-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.popup-btn {
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
}

.popup-btn.primary {
  background: linear-gradient(135deg, #e62117 0%, #ff6b6b 100%);
  color: white;
}

.popup-btn.secondary {
  background: #6c757d;
  color: white;
}

.popup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.popup-btn:active {
  transform: translateY(0);
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  transition: color 0.3s ease;
}

.popup-close:hover {
  color: #e62117;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message {
  padding: 15px 20px;
  border-radius: 10px;
  margin: 10px 0;
  font-weight: bold;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .video-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 5px;
  }
  
  .video-thumbnail {
    height: auto;
  }
  
  .play-overlay {
    font-size: 40px;
    padding: 12px 16px;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: linear-gradient(135deg, #e62117 0%, #ff6b6b 100%);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 50px;
    transition: left 0.3s ease;
    z-index: 999;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .flash-content {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  
  .flash-text {
    font-size: 14px;
  }
  
  .popup-content {
    padding: 30px 20px;
    margin: 20px;
  }
  
  .popup-buttons {
    flex-direction: column;
  }
  
  .popup-btn {
    width: 100%;
  }
}

/* Video Player Overlay Styling */
.video-player-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.video-player-container {
  background: #1a1a1a;
  border-radius: 15px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.3s ease;
}

.player-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
}

.player-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.video-player {
  padding: 20px;
  border-radius: 15px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.buffering-screen {
  text-align: center;
  color: white;
  width: 100%;
}

.buffering-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #e62117;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.buffering-text {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 30px;
  color: #fff;
}

.buffering-progress {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 15px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #e62117, #ff6b6b);
  width: 0%;
  transition: width 0.1s ease;
  border-radius: 4px;
  position: relative;
}

.progress-bar::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 1.5s infinite;
}

.buffering-percentage {
  font-size: 16px;
  font-weight: bold;
  color: #e62117;
}

@keyframes spin {
  to { 
    transform: rotate(360deg); 
  }
}

/* Responsive Video Player */
@media (max-width: 768px) {
  .video-player-container {
    width: 95%;
    margin: 10px;
    max-height: 70vh;
  }
  
  .video-player {
    padding: 10px;
    min-height: 200px;
  }
  
  .buffering-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
    margin: 0 auto 15px;
  }
  
  .buffering-text {
    font-size: 14px;
    margin-bottom: 20px;
  }
  
  .buffering-progress {
    height: 6px;
    margin-bottom: 10px;
  }
  
  .buffering-percentage {
    font-size: 14px;
  }
  
  .player-close {
    top: 10px;
    right: 15px;
    width: 35px;
    height: 35px;
    font-size: 20px;
  }
}

/* Additional mobile responsive fixes */
@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .video-thumbnail {
    height: 180px;
  }
  
  .video-loading {
    width: 18px;
    height: 18px;
    border-width: 1px;
  }
  
  .video-info {
    padding: 12px;
  }
  
  .video-info h3 {
    font-size: 16px;
  }
  
  .video-info p {
    font-size: 13px;
  }
  
  .get-code-btn {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  /* Mobile loading animation */
  .video-player-container {
    width: 98%;
    margin: 5px;
    max-height: 60vh;
  }
  
  .video-player {
    padding: 8px;
    min-height: 150px;
  }
  
  .buffering-spinner {
    width: 35px;
    height: 35px;
    border-width: 2px;
    margin: 0 auto 10px;
  }
  
  .buffering-text {
    font-size: 12px;
    margin-bottom: 15px;
  }
  
  .buffering-progress {
    height: 4px;
    margin-bottom: 8px;
  }
  
  .buffering-percentage {
    font-size: 12px;
  }
  
  .player-close {
    top: 8px;
    right: 12px;
    width: 30px;
    height: 30px;
    font-size: 18px;
  }
}

/* Video Thumbnail Display in Player */
.video-thumbnail-display {
  position: relative;
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
  max-width: 400px;
  margin: 0 auto 20px;
}

.player-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
}

.play-overlay-large {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 60px;
  color: white;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  padding: 20px 25px;
  opacity: 0.9;
  animation: pulse 2s infinite;
}

/* Unable to Play Screen */
.unable-to-play-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  width: 100%;
  min-height: 300px;
}

.unable-message {
  max-width: 400px;
  padding: 20px;
}

.unable-message h3 {
  font-size: 24px;
  color: #ff6b6b;
  margin-bottom: 15px;
  font-weight: bold;
}

.unable-message p {
  font-size: 16px;
  color: #ccc;
  margin-bottom: 25px;
  line-height: 1.5;
}

.play-external-btn {
  background: linear-gradient(135deg, #e62117 0%, #ff6b6b 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(230, 33, 23, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
}

.play-external-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 33, 23, 0.4);
  background: linear-gradient(135deg, #ff6b6b 0%, #e62117 100%);
}

.play-external-btn:active {
  transform: translateY(0);
}

/* Mobile styles for new elements */
@media (max-width: 768px) {
  .video-thumbnail-display {
    max-width: 300px;
    margin-bottom: 15px;
  }
  
  .player-thumbnail {
    height: 150px;
  }
  
  .play-overlay-large {
    font-size: 40px;
    padding: 15px 18px;
  }
  
  .unable-to-play-screen {
    min-height: 200px;
  }
  
  .unable-message h3 {
    font-size: 20px;
    margin-bottom: 12px;
  }
  
  .unable-message p {
    font-size: 14px;
    margin-bottom: 20px;
  }
  
  .play-external-btn {
    padding: 12px 25px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .video-thumbnail-display {
    max-width: 250px;
    margin-bottom: 10px;
  }
  
  .player-thumbnail {
    height: 120px;
  }
  
  .play-overlay-large {
    font-size: 35px;
    padding: 12px 15px;
  }
  
  .unable-message h3 {
    font-size: 18px;
    margin-bottom: 10px;
  }
  
  .unable-message p {
    font-size: 13px;
    margin-bottom: 15px;
  }
  
  .play-external-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}
