.profile-page-display {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  margin-top: 0 !important;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

.content-card.profile-main-card {
  height: 90vh !important;
  max-height: 100% !important;
  width: 950px;
  max-width: 95vw;
  box-sizing: border-box;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.profile-main-card .card-content-area {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.profile-page-display .data-list-container {
  overflow-y: auto !important;
  flex: 1;
}

.content-card.profile-main-card.editing .avatar-btn--profile {
  cursor: pointer;
  pointer-events: auto;
  border: 3px solid #3a86ff;
  box-shadow: 0 0 15px rgba(58, 134, 255, 0.4);
  animation: border-pulse 2s infinite;
}

@keyframes border-pulse {
  0% {
    border-color: #8d86c9;
  }
  50% {
    border-color: #3a86ff;
    box-shadow: 0 0 20px rgba(58, 134, 255, 0.6);
  }
  100% {
    border-color: #8d86c9;
  }
}

.content-card.profile-main-card .avatar-overlay {
  background-color: rgba(30, 30, 63, 0.7);
  color: #fbf6e9;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.content-card.profile-main-card.editing .avatar-btn--profile::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease;
}

.content-card.profile-main-card.editing
  .avatar-btn--profile:hover
  .avatar-overlay {
  opacity: 1 !important;
  display: flex !important;
  background-color: rgba(30, 30, 63, 0.85);
}

.content-card.profile-main-card.editing
  .avatar-btn--profile:hover
  .avatar-overlay {
  display: flex;
}

.profile-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-shrink: 0;
}

.avatar-btn--profile {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px solid #8d86c9;
  background-color: #1e1e3f;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  cursor: default;
  pointer-events: none;
}

.header-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  text-align: left;
}

.username-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.profile-username-input {
  background: transparent;
  color: #fbf6e9;
  font-size: 2rem;
  font-weight: 700;
  outline: none;
  width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  border: 1px solid transparent;
  padding: 0.5rem 0;
}

.profile-edit-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.edit-profile-btn {
  background-color: #8d86c9;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition:
    background-color 0.2s ease,
    opacity 0.2s ease;
}

.edit-profile-btn:hover {
  opacity: 0.9;
  background-color: #7a73b0;
}

.cancel-profile-btn {
  background: transparent;
  border: 1px solid rgba(251, 246, 233, 0.3);
  color: #fbf6e9;
  border-radius: 8px;
  padding: 8px 15px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cancel-profile-btn:hover {
  background: rgba(248, 113, 113, 0.1);
  border-color: #f87171;
  color: #f87171;
}

.content-card.profile-main-card.editing .profile-username-input {
  background-color: rgba(30, 30, 63, 0.6);
  border: 1px solid rgba(141, 134, 201, 0.4);
  border-radius: 12px;
  padding: 0.5rem 1rem;
  color: #fbf6e9;
  cursor: text;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  margin-right: 20px;
  text-overflow: clip;
  overflow: visible;
  white-space: normal;
  transition: all 0.2s ease;
}

.content-card.profile-main-card.editing .profile-username-input:focus {
  border-color: #8d86c9;
  background-color: rgba(30, 30, 63, 0.8);
  outline: none;
}

.profile-bio-input {
  width: 100%;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0;
  color: rgba(251, 246, 233, 0.95);
  background-color: transparent;
  border: 1px solid transparent;
  outline: none;
  resize: none;
  box-sizing: border-box;
  transition: all 0.2s ease;
  cursor: default;
  text-align: left;
  display: block;
  height: 6rem;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-bio-input::placeholder {
  color: #b0aee0;
  opacity: 0.6;
  font-style: italic;
  letter-spacing: 0.5px;
}

.content-card.profile-main-card.editing .profile-bio-input::placeholder {
  font-style: normal;
  opacity: 0.5;
}

.content-card.profile-main-card.editing .profile-bio-input {
  height: 6rem;
  background-color: rgba(30, 30, 63, 0.6);
  border: 1px solid rgba(141, 134, 201, 0.4);
  border-radius: 12px;
  padding: 0.5rem 1rem;
  cursor: text;
  overflow-y: auto !important;
  display: block;
}

.content-card.profile-main-card.editing .profile-bio-input::-webkit-scrollbar {
  width: 4px;
}

.content-card.profile-main-card.editing
  .profile-bio-input::-webkit-scrollbar-thumb {
  background: #8d86c9;
  border-radius: 10px;
}

.edit-btn:hover img,
.delete-btn:hover img {
  filter: invert(30%) sepia(100%) saturate(2500%) hue-rotate(350deg)
    brightness(90%) contrast(110%);
}

.info-icon-btn {
  background: rgba(141, 134, 201, 0.1);
  color: #8d86c9;
  border: 1px solid #8d86c9;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 1.5rem;
  background-color: #13132b;
  border-top: 1px solid rgba(141, 134, 201, 0.2);
}

.pagination-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1e1e3f;
  border: 1px solid rgba(141, 134, 201, 0.4);
  border-radius: 10px;
  color: #fbf6e9;
  font-weight: 700;
  font-size: 1rem;
  box-sizing: border-box;
}

.pagination-btn {
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover {
  border-color: #8d86c9;
  background-color: rgba(141, 134, 201, 0.1);
}

.pagination-btn.active {
  background-color: #3a86ff;
  border-color: #3a86ff;
  cursor: default;
}

.pagination-dots {
  cursor: default;
  opacity: 0.8;
}

.content-card.profile-main-card:not(.editing)
  .avatar-btn--profile
  .avatar-overlay {
  opacity: 0 !important;
  display: none !important;
  pointer-events: none;
}

.content-card.profile-main-card:not(.editing) .avatar-btn--profile {
  cursor: default;
  pointer-events: none;
}

.content-card.profile-main-card.editing .avatar-btn--profile {
  cursor: pointer;
  pointer-events: auto;
}

.content-card.profile-main-card.editing
  .avatar-btn--profile:hover
  .avatar-overlay {
  opacity: 1 !important;
  display: flex !important;
}

@media (max-height: 850px) {
  .content-card {
    padding: clamp(1rem, 2vw, 1.5rem);
    gap: 1rem;
  }

  .profile-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
  }

  .avatar-btn--profile {
    width: 105px;
    height: 105px;
    flex-shrink: 0;
  }

  .header-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
  }

  .profile-username-input {
    font-size: 1.5rem;
    padding: 0;
    margin: 0;
  }

  .profile-bio-input {
    height: 3.6rem;
    font-size: 0.95rem;
    margin: 0;
  }

  .content-card.profile-main-card.editing .profile-bio-input {
    height: 4.5rem;
  }

  .tab-control {
    padding: 8px 4px;
    font-size: 0.75rem;
  }

  .list-item-row {
    height: 80px;
  }

  .list-item-img {
    width: 48px !important;
    height: 48px !important;
    margin: 4px;
  }

  .pagination {
    padding: 1rem;
    gap: 8px;
  }

  .pagination-item {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
}

@media (max-width: 800px) {
  .profile-header {
    gap: 1.5rem;
  }
  .avatar-btn--profile {
    width: 140px;
    height: 140px;
  }
  .profile-username-input {
    font-size: 1.6rem;
  }
}

@media (max-width: 600px) {
  .profile-page-display {
    padding: 0;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
  }

  .content-card.profile-main-card {
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: calc(100vh - 60px) !important;
    max-height: none !important;
    border-radius: 0;
    box-shadow: none;
    border: none;
    padding: 15px 0 0 0;
    background-color: transparent;
    gap: 1.2rem;
    margin: 0;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0 15px;
  }

  .avatar-btn--profile {
    width: 120px;
    height: 120px;
  }

  .header-right {
    width: 100%;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
  }

  .username-row {
    flex-direction: column;
    justify-content: center;
    gap: 12px;
  }

  .profile-username-input {
    width: 100%;
    text-align: center;
    font-size: 1.6rem;
    padding: 0;
    white-space: normal;
  }

  .content-card.profile-main-card.editing .profile-username-input {
    margin-right: 0;
    text-align: center;
  }

  .profile-edit-actions {
    width: 100%;
    justify-content: center;
  }

  .edit-profile-btn,
  .cancel-profile-btn,
  .save-profile-btn {
    width: 100%;
    max-width: 200px;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 12px;
  }

  .profile-bio-input {
    text-align: center;
    height: 150px;
    overflow-y: auto !important;
    padding: 0 10px;
  }

  .content-card.profile-main-card.editing .profile-bio-input {
    height: 170px;
    padding: 10px;
  }

  .profile-page-display .tabs-wrapper {
    margin: 0 0 10px 0;
    border-radius: 0;
  }

  .profile-page-display .tab-control {
    padding: 10px 4px;
    font-size: 0.8rem;
    letter-spacing: 0;
    border-radius: 0;
  }

  .card-content-area {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    background-color: transparent;
    border-top: 1px solid rgba(141, 134, 201, 0.2);
    overflow: visible;
  }

  .data-list-container {
    overflow: visible !important;
    height: auto;
  }

  .data-list-container .list-item-row {
    padding: 5px 15px !important;
    min-height: 75px;
  }

  .pagination {
    background-color: transparent;
    border-top: 1px solid rgba(141, 134, 201, 0.2);
    padding: 1rem 15px;
    gap: 8px;
  }

  .pagination-item {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  .profile-page-display {
    padding: 0;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
  }

  .content-card.profile-main-card {
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: calc(100vh - 60px) !important;
    max-height: none !important;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    padding: 15px 0 0 0;
    background-color: transparent;
    gap: 1.2rem;
  }

  .profile-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 0 15px;
    box-sizing: border-box;
  }

  .avatar-btn--profile {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
  }

  .header-right {
    flex: 1;
    gap: 0.4rem;
    align-items: flex-start;
    text-align: left;
    min-height: 120px;
  }

  .username-row {
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 2px;
  }

  .profile-username-input {
    font-size: 1.4rem;
    width: auto;
    max-width: 250px;
    padding: 0;
    line-height: 1.2;
  }

  .profile-edit-actions {
    margin-left: auto;
  }

  .edit-profile-btn,
  .cancel-profile-btn,
  .save-profile-btn {
    padding: 5px 12px;
    font-size: 0.75rem;
    min-width: 70px;
  }

  .profile-bio-input {
    height: 85px;
    overflow-y: auto !important;
    font-size: 0.95rem;
    text-align: left;
    padding: 0;
    width: 100%;
    line-height: 1.4;
  }

  .content-card.profile-main-card.editing .profile-bio-input {
    height: 85px;
    padding: 5px;
  }

  .profile-page-display .tabs-wrapper {
    margin: 0 0 10px 0;
    border-radius: 0;
  }

  .profile-page-display .tab-control {
    padding: 10px 4px;
    font-size: 0.8rem;
    border-radius: 0;
  }

  .card-content-area {
    border-radius: 0;
    border: none;
    background-color: transparent;
    border-top: 1px solid rgba(141, 134, 201, 0.2);
    overflow: visible;
  }

  .data-list-container {
    overflow: visible !important;
    height: auto;
  }

  .data-list-container .list-item-row {
    padding: 5px 15px !important;
    min-height: 70px;
  }

  .pagination {
    background-color: transparent;
    border-top: 1px solid rgba(141, 134, 201, 0.2);
    padding: 1rem 15px 2rem 15px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .content-card.profile-main-card.editing .avatar-overlay {
    opacity: 1 !important;
    display: flex !important;
    background-color: rgba(30, 30, 63, 0.55) !important;
  }

  .action-btn {
    width: 44px;
    height: 44px;
  }

  .action-btn:hover {
    transform: none;
  }
  .action-btn:active {
    transform: scale(0.9);
  }
}
