#reelCreator {

  // Custom Tab Styles - Clean & Modern
  .nav-tabs {
    border-bottom: 1px solid #dee2e6 !important;
    display: flex;
    width: 100%;
    gap: 0;

    .nav-item {
      margin-bottom: 0;
      flex: 1; // Each tab takes equal space

      .nav-link {
        border: none !important;
        background: transparent;
        color: #6c757d;
        transition: color 0.3s ease;
        position: relative;
        border-radius: 0 !important;
        white-space: nowrap;
        text-align: center;
        width: 100%;
        padding: 1rem 1.5rem;

        &:hover {
          color: #495057;
          background-color: transparent;
          transform: none; // Remove elevation effect
        }

        &.active {
          color: var(--bs-primary) !important;
          background-color: transparent !important;
          font-weight: 600;

          .tab-indicator {
            opacity: 1;
            transform: translateX(-50%) scaleX(1);
          }
        }

        i {
          font-size: 1rem;
        }
      }
    }
  }

  // Tab indicator (underline effect)
  .tab-indicator {
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-info));
    border-radius: 2px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
  }

  // Tab content styling
  .tab-content {
    .tab-pane {
      animation: reelCreatorFadeIn 0.3s ease-in-out;
    }
  }

  // Clean card styling for tab container
  .card.border-0:has(.nav-tabs) {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);

    .card-header {
      background: #ffffff;
      border-bottom: none;
      padding-top: 0.5rem; // Reduce top gap
      padding-bottom: 0;
    }
  }

  .video-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);

      .video-overlay {
        opacity: 1;
      }
    }

    &.selected {
      border-color: var(--bs-primary);
      box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);

      .video-thumbnail {
        opacity: 0.8;
      }
    }
  }

  .video-preview-container {
    aspect-ratio: 16/9;
    background-color: #000;
    border-radius: 0.375rem 0.375rem 0 0;
    overflow: hidden;

    .video-thumbnail {
      height: 100%;
      object-fit: cover;
      transition: opacity 0.3s ease;
    }

    &.processing {
      .video-thumbnail {
        filter: brightness(0.6);
        pointer-events: none;
      }
    }
  }

  .audio-preview-container {
    aspect-ratio: 16/9;
    border-radius: 0.375rem 0.375rem 0 0;
    overflow: hidden;

    &.processing {
      .video-thumbnail {
        filter: brightness(0.6);
        pointer-events: none;
      }
    }
  }

  .processing-overlay {
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    border-radius: 0; // Remove border-radius to cover full area

    .spinner-border {
      width: 3rem;
      height: 3rem;
      border-width: 0.3em;
    }

    .processing-text {
      font-size: 0.9rem;
      font-weight: 500;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    }
  }

  .selection-overlay {
    // background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
    border-radius: 0.375rem 0 0 0;

    .form-check-input {
      scale: 1.2;

      &:checked {
        background-color: var(--bs-primary);
        border-color: var(--bs-primary);
      }
    }
  }

  // Grid size button group
  .btn-group {
    .btn {
      color: black;

      &.active {
        background-color: var(--bs-primary);
        border-color: var(--bs-primary);
        color: white;
      }
    }
  }

  // Selection alert styling
  .alert-info {
    border-left: 4px solid var(--bs-info);
    background-color: rgba(var(--bs-info-rgb), 0.1);
  }

  // Responsive tab design
  @media (max-width: 768px) {
    .nav-tabs {
      gap: 0;

      .nav-item {
        .nav-link {
          padding: 0.75rem 0.5rem !important;
          font-size: 0.875rem;
        }
      }
    }

    .video-overlay {
      width: 50px;
      height: 50px;

      i {
        font-size: 1.5rem !important;
      }
    }

    .btn-group {
      .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
      }
    }
  }

  .selected-highlights-section {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    border: 2px dashed #dee2e6;
    min-height: 120px;
  }

  .selected-highlight-item {
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;

    &:hover {
      box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
    }
  }

  .order-badge {
    background: var(--bs-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
  }

  .drag-handle {
    cursor: grab;
    color: #6c757d;

    &:active {
      cursor: grabbing;
    }
  }

  .sortable-chosen {
    opacity: 0.8;
  }

  .sortable-ghost {
    opacity: 0.4;
  }

  #highlightEditingModal {
    .modal-dialog {
      max-width: 800px; // Make modal wider

      @media (max-width: 576px) {
        max-width: 95%;
        margin: 1rem auto;
      }
    }

    .modal-content {
      max-height: 90vh; // Prevent modal from being too tall
      display: flex;
      flex-direction: column;
    }

    .modal-body {
      display: flex;
      flex-direction: column;
      overflow: hidden; // Prevent body from scrolling
      max-height: calc(90vh - 120px); // Account for header and footer height
    }

    .video-card {
      transition: none;
      box-shadow: none !important;

      &:hover {
        transform: none !important;
        box-shadow: none !important;
      }
    }

    .video-section {
      flex-shrink: 0; // Don't shrink the video section
      border-bottom: 1px solid #dee2e6;

      .video-preview-container {
        max-width: 400px;
        margin: 0 auto;
        aspect-ratio: 16/9;
        background-color: #000;
        border-radius: 0.375rem;
        overflow: hidden;

        .video-thumbnail {
          height: 100%;
          object-fit: cover;
        }
      }
    }

    .text-content-section {
      flex: 1;
      overflow-y: auto; // Only this section scrolls
      padding-bottom: 1rem;

      // Custom scrollbar styling
      &::-webkit-scrollbar {
        width: 6px;
      }

      &::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
      }

      &::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;

        &:hover {
          background: #a8a8a8;
        }
      }

      .form-label {
        color: #495057;
        margin-bottom: 0.5rem;
      }

      textarea {
        resize: vertical;
        min-height: 80px;
        transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;

        &:focus {
          border-color: var(--bs-primary);
          box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
        }
      }

      small {
        display: block;
        margin-top: 0.25rem;
        font-size: 0.875rem;
      }
    }

    .modal-footer {
      flex-shrink: 0; // Don't shrink the footer
      padding: 1rem 1.5rem;

      .btn {
        min-width: 120px;
        transition: all 0.2s ease;

        &:hover {
          transform: translateY(-1px);
        }
      }
    }
  }

  .filter-bar {
    background-color: #ffffff;
    transition: all 0.3s ease;

    .input-group-text {
      color: #adb5bd;
      padding-left: 0.75rem;
      padding-right: 0.25rem;
    }

    .form-select {
      font-size: 0.85rem;
      cursor: pointer;

      &:focus {
        box-shadow: none;
        border-color: #dee2e6;
      }
    }

    .tracking-wider {
      letter-spacing: 0.05em;
      font-size: 0.75rem;
    }

    .btn-link {
      color: #6c757d;
      font-size: 0.8rem;

      &:hover {
        color: var(--bs-danger);
      }
    }
  }

  // Animation for the video grid when filtering
  .video-card {
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
}

// Keyframe animation scoped to this component
@keyframes reelCreatorFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}