/* UI Elements styles - Logo and Navigation Buttons */

/* Base body styles - Dark theme */
body { 
    background: #1a1a1a; 
    padding: 0;
    margin: 0;
    overflow-x: hidden;
  }

  /* Ensure control bar stays visible on mobile when zoomed */
  @media (max-width: 768px) {
    /* Ensure control bar is always visible on mobile */
    .control-bar {
      /* Force fixed positioning on mobile */
      position: fixed !important;
      /* Ensure it's always at the bottom */
      bottom: 10px !important;
      /* Center horizontally */
      left: 50% !important;
      transform: translateX(-50%) !important;
      /* High z-index to stay on top */
      z-index: 10000 !important;
      /* Ensure it's not affected by parent transforms */
      transform-style: flat !important;
      /* Prevent any transforms from affecting it */
      isolation: isolate;
    }
  }
  
  /* Floating navigation buttons - Minimal arrow design */
  .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1000;
    transition: all 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    background: transparent;
    border: none;
    opacity: 1;
    visibility: visible;
    cursor: pointer;
  }
  
  .nav-btn.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) scale(0.8);
  }
  
  .nav-btn:hover {
    transform: translateY(-50%) scale(1.2);
    opacity: 0.8;
  }
  
  .nav-btn:active {
    transform: translateY(-50%) scale(1.1);
  }
  
  .nav-btn.prev {
    left: 20px;
  }
  
  .nav-btn.next {
    right: 20px;
  }
  
  .nav-btn i {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  }
  
  .nav-btn:hover i {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.7);
  }
  
  /* Logo styling - Enhanced visibility */
  .logo-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }
  
  .logo-image {
    max-width: 140px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: 
      /* drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5))
      drop-shadow(0 0 10px rgba(147, 51, 234, 0.3)) */
      brightness(1.1)
      contrast(1.2);
    transition: all 0.3s ease;
  }
  
  .logo-image:hover {
    transform: scale(1.05);
    filter: 
      drop-shadow(0 3px 12px rgba(0, 0, 0, 0.6))
      drop-shadow(0 0 15px rgba(147, 51, 234, 0.5))
      brightness(1.2)
      contrast(1.3);
  }
  
  /* Thumbnails at top */
  .thumbnails-top {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  }
  
  /* Control bar styling */
  .control-bar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 16px;
    border-radius: 8px;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 600px;
    min-width: 300px;
    gap: 15px;
  }
  
  /* Left controls */
  .left-controls {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  /* Right controls */
  .right-controls {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  
  /* Control button styling */
  .control-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    /* box-shadow: 
      0 2px 4px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1); */
  }
  
  .control-btn:hover {
    /* background: linear-gradient(135deg, #4B5563 0%, #6B7280 100%); */
    transform: translateY(-2px);
    /* box-shadow: 
      0 4px 8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2); */
  }
  
  .control-btn:active {
    transform: translateY(0);
    box-shadow: 
      0 1px 2px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .control-btn i {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  }

  /* Active state for control buttons */
  .control-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 
      0 4px 12px rgba(102, 126, 234, 0.4),
      0 2px 6px rgba(0, 0, 0, 0.2);
  }
  
  /* Control button tooltips */
  .control-btn {
    position: relative;
  }
  
  .control-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1004;
    box-shadow: 
      0 4px 12px rgba(102, 126, 234, 0.4),
      0 2px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
  }
  
  .control-btn::after {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #667eea;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1004;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  }
  
  .control-btn:hover::before,
  .control-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
  }
  
  /* Thumbnail styles */
  .thumbnail {
    width: 50px;
    height: 35px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    overflow: hidden;
  }
  
  .thumbnail:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
  }
  
  .thumbnail.active {
    border-color: #3B82F6;
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  }
  
  .thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
  }
  
  .thumbnail:hover .thumbnail-image {
    transform: scale(1.05);
  }
  
  /* Progress bar styling - Modern design */
  .progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
  }
  
  .progress-bar {
    position: relative;
    width: 100%;
    min-width: 200px;
    max-width: 400px;
    height: 6px;
    background: linear-gradient(90deg, 
      rgba(255, 255, 255, 0.1) 0%, 
      rgba(255, 255, 255, 0.2) 50%, 
      rgba(255, 255, 255, 0.1) 100%);
    border-radius: 10px;
    cursor: pointer;
    flex: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, 
      #667eea 0%, 
      #764ba2 25%, 
      #f093fb 50%, 
      #f5576c 75%, 
      #4facfe 100%);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 16.67%; /* Start at page 1 of 6 */
    box-shadow: 
      0 0 10px rgba(102, 126, 234, 0.4),
      0 0 20px rgba(118, 75, 162, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  
  .progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 
      0 4px 12px rgba(102, 126, 234, 0.4),
      0 2px 6px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid #ffffff;
    cursor: grab;
  }
  
  .progress-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.1);
  }
  
  .progress-handle:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 
      0 6px 16px rgba(102, 126, 234, 0.5),
      0 3px 8px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
  }
  
  .progress-text {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 45px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
  }
  
  /* Hover tooltip for page numbers */
  .progress-tooltip {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1003;
    box-shadow: 
      0 4px 12px rgba(102, 126, 234, 0.4),
      0 2px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
  }
  
  .progress-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #667eea;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  }
  
  .progress-bar:hover .progress-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
  }
  
  /* Play button specific styles */
  .play-btn.playing {
    /* background: #EF4444;
    border-color: #EF4444; */
    animation: pulse 1.5s infinite;
  }
  
  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
  }
  
  /* Large screens */
  @media (min-width: 1400px) {
    .control-bar {
      max-width: 700px;
    }
    
    .progress-bar {
      max-width: 500px;
    }
  }
  
  /* Responsive adjustments for UI elements */
  @media (max-width: 1024px) {
    .control-bar {
      width: 95%;
      max-width: 550px;
      gap: 12px;
    }
    
    .progress-bar {
      min-width: 180px;
      max-width: 300px;
      height: 5px;
    }
    
    .progress-handle {
      width: 16px;
      height: 16px;
    }
  }
  
  @media (max-width: 768px) {
    .nav-btn {
      width: 50px;
      height: 50px;
      font-size: 20px;
    }
    
    .nav-btn.prev {
      left: 10px;
    }
    
    .nav-btn.next {
      right: 10px;
    }
    
    .logo-container {
      padding: 7px 11px;
    }
    
    .logo-image {
      max-width: 120px;
      max-height: 60px;
      filter: 
        drop-shadow(0 2px 7px rgba(0, 0, 0, 0.55))
        drop-shadow(0 0 9px rgba(147, 51, 234, 0.35))
        brightness(1.12)
        contrast(1.22);
    }
    
    .thumbnails-top {
      top: 15px;
      padding: 8px 15px;
      gap: 10px;
    }
    
    .control-bar {
      position: fixed !important;
      bottom: 10px !important;
      left: 50% !important;
      transform: translateX(-50%) !important;
      z-index: 10000 !important;
      padding: 6px 12px;
      width: 95%;
      max-width: 500px;
      min-width: 320px;
      gap: 10px;
      /* Ensure control bar stays visible when zoomed */
      will-change: transform;
      backface-visibility: hidden;
      /* Prevent control bar from being affected by zoom transforms */
      transform-origin: center bottom;
    }
    
    .thumbnail {
      width: 40px;
      height: 28px;
    }
    
    .thumbnail-image {
      border-radius: 3px;
    }
    
    .control-btn {
      width: 35px;
      height: 35px;
      font-size: 12px;
      color: #ffffff;
    }
    
    .progress-bar {
      min-width: 150px;
      max-width: 250px;
      height: 4px;
    }
    
    .progress-handle {
      width: 14px;
      height: 14px;
    }
    
    .progress-text {
      font-size: 11px;
      min-width: 35px;
    }
  }
  
  @media (max-width: 480px) {
    .nav-btn {
      width: 45px;
      height: 45px;
      font-size: 18px;
    }
    
    .nav-btn.prev {
      left: 5px;
    }
    
    .nav-btn.next {
      right: 5px;
    }
    
    .logo-container {
      top: 10px;
      left: 10px;
      padding: 6px 10px;
    }
    
    .logo-image {
      max-width: 100px;
      max-height: 50px;
      filter: 
        drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6))
        drop-shadow(0 0 8px rgba(147, 51, 234, 0.4))
        brightness(1.15)
        contrast(1.25);
    }
    
    .thumbnails-top {
      top: 10px;
      padding: 6px 12px;
      gap: 8px;
    }
    
    .control-bar {
      position: fixed !important;
      bottom: 10px !important;
      left: 50% !important;
      transform: translateX(-50%) !important;
      z-index: 10000 !important;
      padding: 5px 10px;
      width: 98%;
      max-width: 320px;
      min-width: 280px;
      gap: 6px;
      /* Ensure control bar stays visible when zoomed */
      will-change: transform;
      backface-visibility: hidden;
      /* Prevent control bar from being affected by zoom transforms */
      transform-origin: center bottom;
    }
    
    .thumbnail {
      width: 35px;
      height: 25px;
    }
    
    .thumbnail-image {
      border-radius: 2px;
    }
    
    .control-btn {
      width: 30px;
      height: 30px;
      font-size: 10px;
      color: #ffffff;
    }
    
    .progress-bar {
      min-width: 120px;
      max-width: 180px;
      height: 4px;
    }
    
    .progress-handle {
      width: 12px;
      height: 12px;
    }
    
    .progress-text {
      font-size: 10px;
      min-width: 30px;
    }
  }
  
  /* Extra small screens */
  @media (max-width: 320px) {
    .control-bar {
      position: fixed !important;
      bottom: 10px !important;
      left: 50% !important;
      transform: translateX(-50%) !important;
      z-index: 10000 !important;
      width: 98%;
      max-width: 300px;
      min-width: 250px;
      gap: 4px;
      padding: 4px 8px;
      /* Ensure control bar stays visible when zoomed */
      will-change: transform;
      backface-visibility: hidden;
      /* Prevent control bar from being affected by zoom transforms */
      transform-origin: center bottom;
    }
    
    .progress-bar {
      min-width: 100px;
      max-width: 150px;
      height: 3px;
    }
    
    .progress-handle {
      width: 10px;
      height: 10px;
    }
    
    .control-btn {
      width: 28px;
      height: 28px;
      font-size: 9px;
      color: #ffffff;
    }
    
    .progress-text {
      font-size: 9px;
      min-width: 25px;
    }
  }
  