/* Profile Container and Background */
.profile-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 35px;
  z-index: 10;
}

.profile-background {
  width: 95%;
  height: calc(100% - 60px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 2.5%;
}

/* Profile Card */
.profile-card {
  background-color: rgba(236, 236, 236, 0.95);
  border-radius: 15px;
  width: 100%;
  height: 100%;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  font-family: Luckiest;
  color: #333;
  margin: 0 auto;
  position: relative;
  padding: 0;
}

.profile-card::-webkit-scrollbar {
  display: none;
}

/* Profile Banner */
.profile-banner {
  background-color: var(--secondary-color);
  padding: 12px;
  text-align: center;
  font-size: 1.8em;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* User Info Section */
.user-info {
  display: flex;
  align-items: center;
  margin: 20px;
  background-color: white;
  border-radius: 15px;
  padding: 15px 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-avatar {
  margin: 0;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-username {
  margin: 0 0 0 20px;
  padding: 8px 15px;
  font-size: 2em;
  color: black;
  font-weight: lighter;
}

/* Stats Section */
.profile-section {
  background-color: white;
  border-radius: 15px;
  margin: 20px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-family: Luckiest;
  color: black;
  font-size: 2em;
  margin-bottom: 10px;
  display: block;
}

.prof-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 0;
}

/* prof-stat Items */
.prof-stat-item {
  position: relative;
  border: 2px solid #ddd;
  border-radius: 10px;
  margin: 10px 10px 10px 25px;
  padding: 20px 15px 15px 15px;
  text-align: center;
}

.prof-stat-title {
  position: absolute;
  top: -12px;
  left: 5px;
  background-color: white;
  padding: 0 20px;
  white-space: nowrap;
  font-size: 1.1em;
  color: black;
}

.prof-stat-title i {
  position: absolute;
  left: -45px;
  top: 50%;
  transform: translate(0, -4px);
  font-size: 1.9em;
  background: white;
  padding: 8px;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ddd;
  color: var(--primary-color);
  z-index: 1;
}

/* Share Button */
.btn-copy {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-family: Luckiest;
  font-size: 1.4em;
  width: 80%;
  margin: 0 auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-copy:hover {
  background-color: var(--primary-color);
}

.prof-stat-item:has(.btn-copy) {
  border: none;
  padding: 3px;
  margin: 1px 1px 1px 1px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Tooltip Styles */
.prof-stat-item:not(:has(button))::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.863);
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: lighter;
  font-family: 'Luckiest', sans-serif;
  white-space: normal;
  width: 220px;
  min-height: fit-content;
  height: auto;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1000;
  pointer-events: none;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 8px;
  box-sizing: border-box;
}

.prof-stat-item:not(:has(button)):hover::after,
.prof-stat-item:not(:has(button)):active::after {
  visibility: visible;
  opacity: 1;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .profile-banner {
    font-size: 1.5em;
    padding: 10px;
  }

  .profile-avatar img {
    width: 60px;
    height: 60px;
  }

  .profile-username {
    font-size: 1.5em;
    padding: 6px 10px;
    margin-left: 10px;
  }

  .section-title {
    font-size: 1.3em;
  }

  .prof-stats-grid, .profile-content {
    gap: 10px;
  }

  .prof-stat-item {
    padding: 15px 10px 10px;
  }

  .prof-stat-title {
    font-size: 0.9em;
  }

  .prof-stat-title i {
    width: 35px;
    height: 35px;
    font-size: 1.6em;
    left: -35px;
    transform: translate(0, -2px);
  }

  .btn-copy {
    font-size: 1.2em;
    padding: 10px 20px;
    width: 90%;
  }

  .prof-stat-item::after {
    font-size: 0.8em;
    max-width: 160px;
    padding: 6px 10px;
  }
}