/* Profile Page Styles */

/* Profile Header */
.profile-container {
  max-width: 900px;
  margin: 70px auto 0;
  padding: 0 15px;
}

.profile-header {
  margin-bottom: 30px;
}

.profile-cover {
  height: 180px;
  background-color: #333;
  border-radius: 8px 8px 0 0;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.profile-avatar {
  position: absolute;
  bottom: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #222;
  background-color: #333;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-edit-button {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #1DB954;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.avatar-edit-button:hover {
  background-color: #1ed760;
}

.profile-info-container {
  background-color: #222;
  border-radius: 0 0 8px 8px;
  padding: 60px 30px 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-top: -10px;
}

.profile-details {
  text-align: center;
  margin-bottom: 30px;
}

#profile-username {
  font-size: 24px;
  margin-bottom: 10px;
}

#profile-bio {
  font-size: 16px;
  color: #aaa;
  margin-bottom: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
  white-space: pre-wrap;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.stat-item {
  text-align: center;
}

.stat-count {
  font-size: 20px;
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: #aaa;
}

.profile-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.action-button {
  background-color: #333;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.action-button:hover {
  background-color: #444;
}

.action-button i {
  font-size: 16px;
}

/* Profile Content */
.profile-content {
  background-color: #222;
  border-radius: 8px;
  padding: 0px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
}

/* Avatar Preview */
.avatar-preview {
  margin: 20px 0;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Character Count */
.char-count {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #aaa;
  margin-top: 5px;
}

/* Bio character count highlighting */
.char-limit-warning {
  color: #ffa500;
}

.char-limit-exceeded {
  color: #ff4d4d;
}

/* Responsive styles */
@media (max-width: 768px) {
  .profile-cover {
    height: 140px;
  }
  
  .profile-avatar {
    width: 100px;
    height: 100px;
    bottom: -30px;
  }
  
  .profile-info-container {
    padding: 50px 20px 20px;
  }
  
  #profile-username {
    font-size: 20px;
  }
  
  .profile-stats {
    gap: 20px;
  }
  
  .stat-count {
    font-size: 18px;
  }
  
  .action-button {
    padding: 8px 15px;
    font-size: 14px;
  }
}

/* Post Media Styling */
.post-media {
  width: 100%;
  margin: 10px 0;
  overflow: hidden;
  position: relative;
}

.post-media img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}

.post-media video,
.post-media audio {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  display: block;
}

/* Mobile-specific media styles */
@media (max-width: 767px) {
  .post-media {
    width: 100vw;
    margin: 10px 0;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
  }

  .post-media img {
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
    object-fit: cover;
  }

  .post-media video,
  .post-media audio {
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
  }
}

/* Loading and error states for media */
.loading-media {
  background-color: #333;
  color: #aaa;
  padding: 20px;
  text-align: center;
  font-size: 14px;
  border-radius: 8px;
}

.media-error {
  background-color: #442;
  color: #fcc;
  padding: 20px;
  text-align: center;
  font-size: 14px;
  border-radius: 8px;
}

.media-error-details {
  font-size: 12px;
  margin-top: 5px;
  color: #aaa;
} 