/* ====== PROFILE WRAPPER ====== */
.profile-container {
  max-width: 100%;
  margin: 0 auto;
  background: none;
  overflow: hidden;
}

/* ====== BANNER ====== */
.profile-banner {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: visible; 
}
.profile-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.clickable-banner {
  position: relative;
  width: 100%;
  height: 200px;
  cursor: pointer;
  z-index: 1; 
}

.clickable-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.clickable-banner:hover img {
  transform: scale(1.02);
}

.banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  text-align: center;
  line-height: 40px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: auto; /* normal hover on visible parts */
}

.clickable-banner:hover .banner-overlay {
  opacity: 1;
}

/* Hidden file input */
#banner-file {
  display: none;
}
/* ====== AVATAR ====== */
.profile-avatar {
  position: absolute;
  top: 150px;
  left: 40px;
  width: 90px;
  height: 90px;
  background: none;
  border: 3px solid #111111;
  border-radius : 50%;
  overflow: hidden;
  z-index: 2;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-avatar.online {
  border-color: #00ff80;
  box-shadow: 0 0 15px rgba(0, 255, 128, 0.6);
}
.profile-avatar.offline {
  border-color: #444;
  box-shadow: 0 0 8px rgba(68, 68, 68, 0.5);
  filter: grayscale(0.3);
}
@keyframes pulseGlow {
  0% { box-shadow: 0 0 10px rgba(0, 255, 128, 0.4); }
  50% { box-shadow: 0 0 20px rgba(0, 255, 128, 0.8); }
  100% { box-shadow: 0 0 10px rgba(0, 255, 128, 0.4); }
}
.profile-avatar.online {
  animation: pulseGlow 2s infinite ease-in-out;
}
.clickable-avatar {
  position: absolute;
  width: 90px; 
  height: 90px; 
  cursor: pointer;
  display: inline-block;
  z-index: 10;
  pointer-events: auto;
}

.clickable-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%; 
  transition: transform 0.3s ease;
}

.clickable-avatar:hover img {
  transform: scale(1.05);
}

.upload-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  line-height: 30px;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-bottom-left-radius: 50%; /* match avatar shape */
  border-bottom-right-radius: 50%;
}

.clickable-avatar:hover .upload-overlay {
  opacity: 1;
}
.avatar-upload-form {
  position: absolute; /* sits over the avatar without shifting layout */
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 10;
}
.file-upload {
  display: none; 
}
#avatar-file {
  display: none;
}
/* ====== HEADER INFO ====== */
.profile-header {
  padding: 60px 40px 20px 40px;
  display: flex;
  flex-direction: column;
}
.profile-header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: #fff;
}
.profile-header p.rank {
  margin : 0 0 1px 0;
  font-size: 0.90rem;
}

/* ====== MAIN CONTENT ====== */
.profile-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  padding: 0 40px 40px 40px;
  gap: 2rem;
}


/* ====== SIDEBAR ====== */
.profile-sidebar {
  flex: 1 1 250px;
  max-width: 260px;
}
.profile-sidebar p.bio {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}
.profile-stats {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}
.profile-stats li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
}
.profile-stats li strong {
  font-weight : 700;
}
.profile-actions {
  display: flex;
  gap: 0.6rem;
}

.profile-actions button,
.profile-actions a.btn {
  flex: 1;
  padding: 0.5rem 0;
  background: transparent;
  border: 1px solid #00bcd4;        /* cyan border */
  color: #00bcd4;                   /* cyan text */
  border-radius: 12px; 
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Segoe UI", Roboto, sans-serif;
  text-transform : uppercase;
  font-size: 0.95rem;
  font-weight : 700;
}

.profile-actions button:hover,
.profile-actions a.btn:hover {
  background: #00bcd4;
  color: #ffffff;
}
/* ====== TABS ====== */
.profile-content {
  flex: 1; 
  min-width: 0; 
  max-width: 100%;        /* prevent growing beyond parent */
  box-sizing: border-box; /* include padding/border in width */
  overflow-x: hidden;     /* clip horizontal overflow */
}
.profile-tabs {
  display: flex;
  border-bottom: 1px solid #2a2a2a; 
  margin-bottom: 1rem;
  overflow-x: auto;
}

.profile-tabs a {
  padding: 0.8rem 1.2rem;
  text-decoration: none;
  color: #aaa;  
  transition: all 0.3s ease; 
  white-space: nowrap;
}

.profile-tabs a:hover,
.profile-tabs a.active {
  color: #00bcd4;   
  border-bottom: 2px solid #00bcd4; 
}

/* ====== TAB CONTENT EXAMPLE ====== */
.tab-content {
  padding: 0 0 0 0;
  overflow: hidden;
  box-sizing: border-box; 
  display: flex; 
  flex-wrap: wrap; 
}
/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .profile-header {
    padding: 50px 20px 20px 20px;
  }
  .profile-main {
    flex-direction: column;
    padding: 0 20px 30px 20px;
  }
  .profile-banner {
  height: 150px;
}
  .profile-avatar {
    top : 90px;
    left: 20px;
    width: 90px;
    height: 90px;
  }
  .profile-sidebar {
    width : 100%;
    max-width: 100%;
  }
}