/* Mobile-first responsive design */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --dark-bg: #121826;
  --sidebar-bg: #1f2937;
  --card-bg: #1e293b;
  --text-light: #f3f4f6;
  --text-muted: #9ca3af;
  --success: #10b981;
  --border-radius: 8px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--dark-bg);
  color: var(--text-light);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* Splash Screen */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  text-align: center;
  animation: fadeIn 1s ease;
}

.splash-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  background: linear-gradient(135deg, var(--primary), #0d47a1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  animation: pulse 2s infinite;
}

.splash-logo img {
  width: 60%;
  filter: brightness(0) invert(1);
}

.splash-content h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(to right, var(--primary), var(--success));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.splash-content p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Main Layout */
.guide-container {
  display: flex;
  height: calc(100% - 20px);
  padding: 20px;
  gap: 20px;
  box-sizing: border-box;
  flex: 1;
  flex-direction: column;
}

/* Sidebar */
.video-sidebar {
  width: 100%;
  background: var(--sidebar-bg);
  border-radius: var(--border-radius);
  padding: 15px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
}

.mobile-visible {
  transform: translateY(0) !important;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo img {
  width: 35px;
  height: 35px;
  background: var(--primary);
  border-radius: 50%;
  padding: 6px;
}

.sidebar-logo span {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.sidebar-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.search-container {
  position: relative;
  margin-bottom: 15px;
}

.search-container input {
  width: 100%;
  padding: 10px 12px 10px 35px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.search-container i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.video-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding-right: 5px;
}

.video-list::-webkit-scrollbar {
  width: 4px;
}

.video-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.video-list::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

.video-list li {
  padding: 12px;
  margin-bottom: 8px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.video-list li:hover {
  background: rgba(26, 115, 232, 0.15);
}

.video-list li.active {
  background: rgba(26, 115, 232, 0.25);
  border-left: 4px solid var(--primary);
}

.play-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.play-icon i {
  color: white;
  font-size: 12px;
  margin-left: 2px;
}

.video-info {
  flex: 1;
}

.video-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.video-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-info p i {
  font-size: 0.75rem;
}

/* Main Content */
.video-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 0;
}

.video-header {
  background: var(--sidebar-bg);
  border-radius: var(--border-radius);
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  position: relative;
}

.video-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.video-header-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
}
.video-header-buttons a{
  text-decoration: none;
}

.mobile-menu-toggle {
  display: block;
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 101;
}

.btn {
  padding: 10px 15px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 0.9rem;
  flex: 1;
  justify-content: center;
}

.btn:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
}

.video-wrapper {
  flex: 1;
  background: var(--sidebar-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.plyr {
  border-radius: var(--border-radius);
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.plyr video {
  max-height: 100%;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  text-align: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: var(--sidebar-bg);
}

.placeholder-icon {
  width: 70px;
  height: 70px;
  background: rgba(26, 115, 232, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.placeholder-icon i {
  font-size: 35px;
  color: var(--primary);
}

.video-placeholder h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.video-placeholder p {
  color: var(--text-muted);
  max-width: 100%;
  margin-bottom: 20px;
  font-size: 1rem;
}

.placeholder-btn {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.placeholder-btn:hover {
  background: var(--primary-dark);
}

/* Video Info Section */
.video-info-section {
  background: var(--sidebar-bg);
  border-radius: var(--border-radius);
  padding: 15px;
  box-shadow: var(--shadow);
  margin-top: auto;
  flex-shrink: 0;
  max-height: 30%;
  overflow-y: auto;
}

.video-info-section h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.video-description {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

/* Share Modal */
.share-modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  box-sizing: border-box;
}

.modal-content {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-light);
  font-size: 0.95rem;
}

.form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.social-share {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-share h4 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.social-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.social-btn {
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}

.social-btn i {
  font-size: 1rem;
}

.whatsapp { background: #25D366; color: white; }
.twitter { background: #1DA1F2; color: white; }
.facebook { background: #1877F2; color: white; }
.linkedin { background: #0A66C2; color: white; }

.social-btn:hover {
  opacity: 0.9;
}

/* Add to user_guide_videos.css */

/* Search highlight style */
.search-highlight {
  background-color: rgba(26, 115, 232, 0.3);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: bold;
}

/* Search container focus state */
.search-container:focus-within {
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.5);
}

/* No results animation */
#no-results {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Clear search button */
#no-results .btn {
  background: transparent;
  border: 1px solid var(--primary);
  padding: 8px 15px;
  font-size: 0.9rem;
}

/* Search input transitions */
#search-input {
  transition: all 0.3s ease;
}

#search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Tablet and Desktop Styles */
@media (min-width: 768px) {
  .guide-container {
    flex-direction: row;
    height: calc(100% - 20px);
  }
  
  .video-sidebar {
    width: 300px;
    max-height: none;
    padding: 20px;
  }
  
  .splash-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 25px;
  }
  
  .splash-content h1 {
    font-size: 2.2rem;
  }
  
  .splash-content p {
    font-size: 1.1rem;
  }
  
  .video-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
  
  .video-header h2 {
    margin-bottom: 0;
  }
  
  .video-header-buttons {
    width: auto;
    justify-content: flex-end;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
  
  .btn {
    flex: none;
    padding: 10px 20px;
  }
  
  .social-buttons {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .video-info-section {
    padding: 20px;
  }
}

@media (min-width: 1024px) {
  .splash-content h1 {
    font-size: 2.5rem;
  }
  
  .sidebar-logo img {
    width: 45px;
    height: 45px;
  }
  
  .sidebar-logo span {
    font-size: 1.4rem;
  }
  
  .video-list li {
    padding: 15px;
  }
  
  .video-info h3 {
    font-size: 1rem;
  }
}

/* NEW ADDITIONS: Center all popups */
.swal2-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Center the share modal */
.share-modal {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    margin: auto;
}

/* Center placeholder content */
.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .share-modal .modal-content {
        width: 90%;
    }
}