.profilis-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: var(--background-dark-70);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
    }

    .profilis-container {
      width: 750px;
      background: var(--color-dark-gray);
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 5px 20px var(--background-dark-50);
      position: relative;
      max-height: 90vh;
      overflow-y: auto;
	  position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-48%, -50%);
    }

    .profilis-cover-photo {
      width: 100%;
      height: 150px;
      background-image: url('img/bg.jpg');
      background-size: cover;
      background-position: center;
      position: relative;
    }

    .profilis-cover-buttons {
      position: absolute;
      top: 10px;
      left: 20px;
      right: 50px; /* Increased from 20px to make room for close button */
      display: flex;
      justify-content: space-between;
      align-items: center;
      z-index: 2;
    }

    .profilis-cover-buttons .profilis-left-button {
      padding: 6px 12px;
      border: none;
      border-radius: 6px;
      font-size: 14px;

      background-color: rgba(255, 255, 255, 0.85);
      color: #050505;
      font-weight: 500;
    }

    .profilis-cover-buttons .profilis-right-buttons a {
      padding: 4px 12px;
      border: none;
      border-radius: 6px;
      font-size: 14px;

      background-color: rgba(255, 255, 255, 0.85);
      
      font-weight: 500;
    }


	.profilis-cover-buttons .profilis-right-buttons i {
			
			margin: none;
			padding: 0px;
			width: auto;
			background: none;
			color: #050505;
			opacity: 1;
			
		
	}

    .profilis-cover-buttons .profilis-right-buttons {
      display: flex;
      gap: 8px;
    }

    .profilis-picture {
      position: absolute;
      left: 30px;
      bottom: -60px;
      width: 120px;
      height: 120px;
      border: 5px solid var(--color-white);
      border-radius: 50%;
      overflow: hidden;
      background: var(--color-dark-gray);
      z-index: 1;
    }

    .profilis-picture img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .profilis-info-wrapper {
      position: relative;
	 
    }
	.profilis-info {
		padding: 10px 12px;
		background-color: var(--background-dark-50);
		border-radius: 10px;
		
	}
    /* Desktop profile info */
    .profilis-desktop-info {
      position: absolute;
      bottom: 10px;
      left: 170px;
      right: 30px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      z-index: 2;
    }

    .profilis-desktop-info .profilis-info h1 {
      margin: 0;
      font-size: 24px;
      color: white;
      text-shadow: 1px 1px 3px var(--background-dark-70);
	  text-align: left;
    }

    .profilis-desktop-info .profilis-info p {
      margin: 5px 0 0;
      font-size: 14px;
      color: #e4e6eb;
      text-shadow: 1px 1px 3px var(--background-dark-70);
    }

    /* Mobile profile info - hidden by default */
    .profilis-mobile-info {
      display: none;
      padding: 0 15px;
      flex-direction: column;
      align-items: center;
      text-align: center;
      margin-top: 45px;
    }

    .profilis-mobile-info .profilis-info {
      width: 100%;
      text-align: center;
    }

    .profilis-mobile-info .profilis-info h1 {
      color: var(--color-mid-gray);
      font-size: 18px;
      margin-bottom: 5px;
    }

    .profilis-mobile-info .profilis-info p {
      color: #666;
      font-size: 12px;
    }

    .profilis-mobile-info .profilis-buttons {
      margin-top: 15px;
      width: 100%;
      justify-content: center;
    }

    .profilis-buttons {
      display: flex;
      gap: 10px;
    }

    .profilis-buttons button {
      padding: 8px 16px;
      border: none;
      border-radius: 6px;

      font-weight: bold;
      color: white;
    }

    .profilis-add-friend {
      background-color: #1877f2;
    }

    .profilis-message {
      background-color: #42b72a;
    }

    .profilis-header-spacer {
      height: 70px;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      padding: 0 20px;
      background: var(--color-white);
      border-bottom: 1px solid #ddd;
    }

    .profilis-header-links a {
      margin-left: 10px;
      text-decoration: none;
      display: inline-block;
      background-color: #1877f2;
      color: white;
      font-weight: 500;
      font-size: 14px;
      padding: 8px 16px;
      border-radius: 6px;
      transition: background-color 0.3s;

    }

    .profilis-header-links a:hover {
      background-color: #0e58c7;
    }

    .profilis-details {
      display: flex;
      padding: 0;
      background: var(--color-white);
      border-top: 0px solid #ddd;
      position: relative;
    }

    .profilis-left-details {
      flex: 0 0 40%; /* Changed from flex: 2 to exact 40% */
      padding: 20px;
      box-sizing: border-box;
      position: relative;
    }

    .profilis-left-details::after {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      width: 1px;
      height: 100%;
      background-color: #ddd;
    }

    .profilis-right-details {
      flex: 0 0 60%; /* Changed from flex: 1 to exact 60% */
      padding: 20px;
      box-sizing: border-box;
    }

    .profilis-left-details p{
      margin: 10px 0;
      font-size: 15px;
      color: var(--color-mid-gray);
    }
    .profilis-right-details p {
      margin: 5px 0;
      font-size: 15px;
      color: var(--color-mid-gray);
    }

    .profilis-right-details h3 {
      margin-top: 0;
	  margin-bottom: 0;
      font-size: 18px;
      color: #1877f2;
    }


.profilis-slider-wrapper {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 15px 0;
  scroll-behavior: smooth;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 410px;

  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

/* Chrome, Edge, Safari */
.profilis-slider-wrapper::-webkit-scrollbar {
  height: 8px;
}

.profilis-slider-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.profilis-slider-wrapper::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.profilis-slider-wrapper::-webkit-scrollbar-thumb:hover {
  background-color: #999;
}

.profilis-slider-item {
  position: relative;
  flex: 0 0 calc(20% - 8px);
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profilis-slider-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.profilis-slider-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  transition: filter 0.3s ease;
}

.profilis-slider-item:hover img {
  filter: brightness(1.1);
}

    .profilis-close-btn {
      position: absolute;
      top: 10px;
      right: 15px;
      font-size: 24px;
      background: none;
      border: none;
      color: white;
      z-index: 20; /* Increased from 10 to ensure it's above other elements */
      text-shadow: 1px 1px 3px var(--background-dark-70);
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      background-color: rgba(0, 0, 0, 0); /* Added background for better visibility */
    }

    .profilis-close-btn:hover {
      background-color: rgba(0, 0, 0, 0.5);
    }

    .profilis-delete-btn {
      position: absolute;
      top: 6px;
      right: 6px;
      background-color: #1877f2;
      color: white;
      border: none;
      border-radius: 50%;
      font-size: 12px;
      width: 24px;
      height: 24px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-left: 4px;
	  left: 2px;
	    pointer-events: none;
    }

    .profilis-delete-btn:hover {
      background-color: #1877f2;
    }

    /* Add space between the buttons */
    .profilis-slider-item .profilis-delete-btn:nth-child(2) {
       /* Move the second button to the left a bit */
    }

    /* Mobile adjustments */
    @media (max-width: 768px) {
      .profilis-container {
        width: 95%;
        max-height: 85vh;
      }

      .profilis-cover-photo {
        height: 120px;
      }

      .profilis-picture {
        width: 80px;
        height: 80px;
        left: 20px;
        bottom: -40px;
        border-width: 3px;
      }

      .profilis-desktop-info {
        left: 110px;
        bottom: 5px;
      }

      .profilis-desktop-info .profilis-info h1 {
        font-size: 18px;
      }

      .profilis-desktop-info .profilis-info p {
        font-size: 12px;
      }

      .profilis-buttons button {
        padding: 6px 12px;
        font-size: 12px;
      }

      .profilis-cover-buttons {
        flex-direction: row;
        gap: 5px;
        right: 40px; /* Adjusted to make room for close button on mobile */
      }
      
      .profilis-cover-buttons .profilis-left-button {
        padding: 4px 8px;
        font-size: 12px;
      }

      .profilis-cover-buttons .profilis-right-buttons {
        gap: 5px;
      }

      .profilis-cover-buttons .profilis-right-buttons button {
        padding: 4px 8px;
        font-size: 12px;
      }
		.profilis-cover-buttons .profilis-right-buttons a {
      padding: 0px 8px;
      border: none;
      border-radius: 6px;
      font-size: 12px;

      background-color: rgba(255, 255, 255, 0.85);
      font-weight: 500;
    }


	.profilis-cover-buttons .profilis-right-buttons i {
			
			margin: none;
			padding: 0px;
			width: auto;
			background: none;
			color: #050505;
			opacity: 1;
			
		
	}

      .profilis-header-spacer {
        height: auto;
        flex-direction: row;
        justify-content: center;
        padding: 15px 10px;
      }

      .profilis-header-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
      }

      .profilis-header-links a {
        margin: 0;
        padding: 6px 12px;
        font-size: 12px;
      }

      .profilis-details {
        flex-direction: column;
      }

      .profilis-left-details {
        flex: 1;
        width: 100%;
        padding: 15px;
      }
      
      .profilis-left-details::after {
        width: 100%;
        height: 1px;
        top: auto;
        bottom: 0;
        right: 0;
      }

      .profilis-right-details {
        flex: 1;
        width: 100%;
        padding: 15px;
      }

      .profilis-image-slider {
        height: 80px;
      }

      .profilis-slider-item {
        width: 50%; /* Show exactly 2 items on tablet */
      }

      .profilis-slider-wrapper img {
        height: 70px;
      }

      .profilis-arrow {
        padding: 5px;
        font-size: 16px;
      }
      
      .profilis-close-btn {
        font-size: 20px;
        width: 26px;
        height: 26px;
      }
    }

    /* Small mobile adjustments */
    @media (max-width: 480px) {
      .profilis-cover-photo {
        height: 100px;
        margin-bottom: 60px; /* Make space for profile pic and info */
      }
      
      .profilis-picture {
        width: 80px;
        height: 80px;
        left: 50%;
        transform: translateX(-50%);
        bottom: -40px;
        border-width: 4px;
      }
      
      /* Switch display between desktop and mobile info */
      .profilis-desktop-info {
        display: none;
      }
      
      .profilis-mobile-info {
        display: flex;
      }
      
      .profilis-header-spacer {
        margin-top: 10px;
        border-top: 2px solid #ddd;
      }
      
      .profilis-cover-buttons .profilis-right-buttons {
        flex-wrap: wrap;
      }

      .profilis-slider-item {
        width: 50%; /* Show exactly 1 item on small mobile */
      }
      
      .profilis-cover-buttons {
        right: 35px; /* Further adjusted for very small screens */
      }
    }