#bodydiv {
  min-width: 320px; /* Changed from 900px for mobile */
}

@media (max-width: 768px) {
  #bodydiv {
    padding: 15px 10px;
  }
}

#profileLevel {
  vertical-align: middle;
  display:inline-block;
}

#usernamespan {
  font-size: 26px;
  display: inline-block;
  font-weight: bold;
  margin-right: 10px;
  color: #333;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  vertical-align: middle;
}

#flamegif {

}

#profile-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  #profile-container {
    flex-direction: column;
    gap: 15px;
  }
}

#usercard {
  border: 1px solid #bdbdbd;
  padding: 20px;
  box-shadow: 4px 5px 1px 2px rgb(22 22 22 / 77%);
  font-family: 'Trebuchet MS',Lato,LatoExtended,sans-serif;
  background-color: white;
  border-radius: 8px;
  flex: 1;
  min-width: 350px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  #usercard {
    flex-direction: column;
    min-width: unset;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  #usercard {
    padding: 15px;
    min-width: unset;
    width: 100%;
  }
}

#usercard-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 200px;
}

#usercard-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 230px;
  padding-left: 10px;
}

@media (max-width: 768px) {
  #usercard-left,
  #usercard-right {
    min-width: unset;
    width: 100%;
  }
  
  #usercard-right {
    padding-left: 0;
    text-align: center;
  }
  
  .user-info-header {
    text-align: center;
    border-bottom: none;
    padding-bottom: 5px;
  }
  
  .username-rank-container {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  #stats {
    text-align: center;
  }
}

#stats {
  text-align: left;
  font-size: 19px;
  margin-bottom: 20px;
}

#stats p {
  margin: 8px 0;
  padding: 2px 0;
}

.statresult {
  font-weight: bold;
  background-color: #dadada;
  padding: 4px;
  margin-right: 3px;
}

#staffrank {
  margin-top: 0px;
  margin-bottom: 0px;
  font-style: italic;
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.8);
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  vertical-align: middle;
  margin-left: 5px;
}

#ava {
  background-repeat: no-repeat;
  margin-right: 100%;
  background-size: 100%;
  width: 188px;
  height: 360px;
  background-position: center;
}
.buybtn {
  border-radius: 4px;
  background-color: #f5b747;
  padding: 6px;
  font-weight: bold;
  border: 0;
  box-shadow: none;
  margin-right: 2px;
  margin-bottom: 6px;
}

#godrank {
  background-color: #ffda00;
  padding-left: 4px;
  padding-right: 6px;
  font-size: 15px;
}

#goodrank {
  background-color: #e8e8e8;
  padding-left: 4px;
  padding-right: 6px;
  font-size: 15px;
}

#goodrank {
  background-color: #e8e8e8;
  padding-left: 4px;
  padding-right: 6px;
  font-size: 15px;
}

#rank {
  background-color: #e8e8e8;
  padding-left: 4px;
  padding-right: 6px;
  font-size: 15px;
}

/* Import blog styles for consistent styling */
.blogbox {
  display: block;
  margin-bottom: 19px;
  min-height: 80px;
  overflow: hidden;
  box-shadow: 4px 5px 1px 2px rgb(22 22 22 / 77%);
  border-radius: 6px;
  background: white;
  padding: 8px;
  box-sizing: border-box;
  position: relative; /* Add position relative for pin indicator positioning */
  transition: all 0.3s ease;
}

.blogbox:hover {
  transform: translate3d(1px, -2px, 0);
  box-shadow: 4px 5px 1px 2px rgb(22 22 22 / 77%);
}

/* Pin indicator styling */
.pin-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.pin-indicator img {
  width: 16px;
  height: 16px;
  display: block;
}

/* Optional: subtle highlighting for pinned blogs */
.blogbox.pinned-blog {
  border-left: 2px solid #f39c12;
}

@media (max-width: 768px) {
  .blogbox {
    margin-bottom: 15px;
    min-height: 60px;
  }
}

.userava {
  background-repeat: no-repeat;
  margin-right: 10px;
  float: left;
  background-size: 140%;
  background-position: top;
  width: 70px;
  height: 85.5px;
}

@media (max-width: 480px) {
  .userava {
    width: 50px;
    height: 61px;
    background-size: 140%;
    background-position: top;
    margin-right: 8px;
  }
}

.content {
  width: calc(100% - 90px);
  margin-left: 80px;
  background-color: #fbfbfb;
  max-height: 137px;
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .content {
    width: calc(100% - 90px);
    margin-left: 80px;
  }
}

@media (max-width: 480px) {
  .content {
    width: calc(100% - 60px);
    margin-left: 60px;
  }
}

.title {
  background-color: #f1f1f1;
  margin-bottom: 5px;
  overflow: hidden;
  white-space: nowrap;
}

.title h3 {
  overflow: hidden;
  margin-bottom: 2px;
  text-overflow: ellipsis;
  margin-top: 0px;
  color: #616161;
  font-size: 17px;
  margin-left: 5px;
}

.firstspan {
  font-size: 15px;
  color: #61616185;
}

.content p {
  margin-top: 0px;
  margin-bottom: 0px;
}

.innercontent {
  padding: 0px 0px 30px 0px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  white-space: pre-wrap;
  text-overflow: ellipsis;
  word-wrap: break-word;
  max-height: 80px;
  line-height: 1.4em;
}

.innercontent p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-wrap;
}

.title, .title h3, .title span, .title a, .title p {
  text-decoration: none;
}

a { color: inherit; }

.spoilerz {
  background-color: #f973ad8f;
  color: #f973add6;
  text-align: center;
  margin-left: 15%;
  margin-right: 15%;
  margin-top: 17px;
  padding: 7px;
}

#friends-section {
  border: 1px solid #bdbdbd;
  padding: 20px;
  box-shadow: 4px 5px 1px 2px rgb(22 22 22 / 77%);
  font-family: 'Trebuchet MS',Lato,LatoExtended,sans-serif;
  background-color: white;
  border-radius: 8px;
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  box-sizing: border-box;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  #friends-section {
    min-width: unset;
    max-width: unset;
    width: 100%;
  }
}

@media (max-width: 480px) {
  #friends-section {
    padding: 15px;
    min-width: unset;
    width: 100%;
  }
}

#friends-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 15px;
}

@media (max-width: 480px) {
  #friends-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.friend-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding-top: 3px;
  padding-bottom: 3px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.friend-item:hover {
  background-color: #cddbdd;
}

.friend-item.mutual {
  background-color: #e4e7fc;
}

.friend-item.mutual:hover {
  background-color: #c1c3d8;
}

.friend-avatar {
  width: 50px;
  height: 60px;
  background-size: 170%;
  background-position: top;
  border-radius: 4px;
  margin-bottom: 5px;
}

.friend-name {
  font-size: 11px;
  text-align: center;
  word-break: break-word;
  line-height: 1.2;
}

.friends-pagination {
  text-align: center;
  margin-top: 15px;
}

.friends-pagination button {
  background-color: #f5ea47;
  border: none;
  padding: 5px 10px;
  margin: 0 5px;
  border-radius: 3px;
  cursor: pointer;
  font-weight: bold;
}

.friends-pagination button:hover {
  background-color: #f5d842;
}

.friends-pagination button.disabled {
  background-color: #e0e0e0;
  cursor: not-allowed;
}

.edit-friends-btn {
  font-size: 12px;
  padding: 4px 8px;
  margin-top: 10px;
}

#profilequote-in-card {
    font-style: italic;
    margin-bottom: 15px;
    white-space: pre-wrap;
    opacity: 0.8;
    font-size: 15px;
}

.user-info-header {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e9ecef;
}

.username-rank-container {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.user-stats-section {
  margin-top: auto;
}

.user-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .user-buttons {
    justify-content: center;
  }
}

#profiledesc {
  flex: 1;
  background-color: #efefef;
  padding: 15px;
  border-radius: 8px;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
  min-width: 300px;
  box-shadow: 4px 5px 1px 2px rgb(22 22 22 / 77%);
}

@media (max-width: 768px) {
  #profiledesc {
    min-width: unset;
    width: 100%;
    margin-bottom: 15px;
  }
}

#profiledesc img {
  max-width: 100%;
  height: auto;
}

#profilecontent {
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Content container for profiledesc and games side by side */
#content-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
}

@media (max-width: 768px) {
  #content-container {
    flex-direction: column;
    gap: 15px;
  }
}

/* Games section styling */
#games-section {
  border: 1px solid #bdbdbd;
  padding: 20px;
  box-shadow: 4px 5px 1px 2px rgb(22 22 22 / 77%);
  font-family: 'Trebuchet MS',Lato,LatoExtended,sans-serif;
  background-color: white;
  border-radius: 8px;
  box-sizing: border-box;
  height: fit-content;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  #games-section {
    min-width: unset;
    max-width: unset;
    width: 100%;
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  #games-section {
    padding: 15px;
    min-width: unset;
    width: 100%;
  }
}

/* Right column for games and spotify */
#right-column {
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  zoom: 80%;
}


@media (max-width: 768px) {
  #right-column {
    min-width: unset;
    max-width: unset;
    width: 100%;
  }
}

.games-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 15px;
  align-items: center;
}

.game-filter-btn {
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
  transition: all 0.3s ease;
}

.game-filter-btn.active {
  background-color: #f5ea47;
  color: #000;
}

.game-filter-btn:not(.active) {
  background-color: #f5f5f5;
  color: #666;
}

.game-filter-btn:hover {
  background-color: #e0e0e0;
}

.frenzy-filter, .outcasted-filter, .arena-filter, .celebrities-filter {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

#games-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 15px;
  min-height: 120px;
}

@media (max-width: 480px) {
  #games-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
}

@media (max-width: 360px) {
  #games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.game-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.game-item:hover {
  transform: scale(1.05);
}

.game-circle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  font-weight: bold;
  font-size: 11px;
  color: white;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.game-circle.frenzy {
  background: linear-gradient(135deg, #8e44ad, #9b59b6);
}

.game-circle.outcasted {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.game-circle.celebrities {
    background: linear-gradient(135deg, #ae2727, #cc2e2e);
}

.place-text {
  font-size: 10px;
  font-weight: bold;
}

.game-info {
  text-align: center;
  font-size: 10px;
  line-height: 1.2;
}

.game-id {
  font-weight: bold;
  color: #333;
}

.game-date {
  color: #666;
  margin-top: 1px;
}

.games-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.page-btn {
  background-color: #f5ea47;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

.page-btn:hover {
  background-color: #f5d842;
}

.page-btn:disabled {
  background-color: #e0e0e0;
  cursor: not-allowed;
}

.page-info {
  font-weight: bold;
  color: #666;
  font-size: 12px;
}

.no-games {
  grid-column: 1 / -1;
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 20px;
}

#recentblogs {
  margin-top: 25px;
  margin-bottom: 15px;
}

.blog-toggle {
  text-align: center;
  margin-bottom: 20px;
}

.blog-toggle-btn {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
    border: none;
}

.blog-toggle-btn:hover {
  background-color: #e0e0e0;
}

.blog-toggle-btn.active {
  background-color: #f5b747;
  color: #000;
}

.date {
  color: #9292927a;
  font-size: 13px;
  margin-left: 15px;
}

#othernames {
  margin-top: 10px;
}

/* Spotify Embed Styling */
#spotify-embed-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 20px;
}

#spotify-embed-container iframe[src*="spotify"] {
  border-radius: 8px;
  max-width: 400px;
  min-width: 300px;
  width: 100%;
    height: 152px;
    box-shadow: 4px 5px 1px 2px rgb(22 22 22 / 77%);
  border-radius: 10px;
}

@media (max-width: 768px) {
  #spotify-embed-container {
    justify-content: center;
    padding: 15px;
    margin-bottom: 15px;
  }
  
  #spotify-embed-container iframe[src*="spotify"] {
    min-width: unset;
    max-width: unset;
    width: 100%;
  }
}

#bodydiv {
  background-color: rgb(255, 65, 113);
}