.middle-section {
  max-width: 960px;
  width: 100%; 
  margin: 0 auto;
  font-family: 'Noto Sans TC', sans-serif;
  padding: 20px 0;
}

/* User header */
.user-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    gap: 8px;
}

.user-info {
    margin-left: 0;
    text-align: center; 
}

.user-name-settings {
    display: flex;
    flex-direction: row; 
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.user-name-settings .nickname {
    flex-basis: 100%;
    text-align: center;
    margin-top: -8px;
    font-size: 12px;
}



.avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #55555529;
  object-fit: cover;
}


.username {
  font-weight: 600;
  font-size: 18px;
}

.settings-btn {
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.bio {
  margin-top: 6px;
  font-size: 14px;
}


.tab-switch {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #444;
  position: relative;
}


.tab-btn {
  background: transparent;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

#app {
  color: unset; 
}


.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ff9500; 
  border-radius: 2px;
  transition: all 0.3s ease;
}


.tab-btn + .tab-btn {
  margin-left: 20px;
}

/* Tab  */
.tab-content {
  display: none; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 2px;
}

.tab-content.active {
  display: grid;
}

.photo-item img,
.photo-item video,
.album-item video,
.photo-item audio,
.album-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-item img:hover,
.album-item img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px #999;
}
.photo-item.no-photo,
.album-item.no-album {
  grid-column: 1 / -1;
  font-size: 16px;
  color: #aaa;
  text-align: center;
  padding: 40px 0;
}


/* stat */
.user-stats {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    justify-content: center; 
}


.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-weight: 600;
    font-size: 16px;
}

.stat-label {
    font-size: 12px;
    color: #888;
}

/* r18 */
    .sensitive-card {
      position: relative;
      overflow: hidden;
    }

    .sensitive-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.65);
      color: #fff;
      font-weight: bold;
      font-size: 1rem;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 1rem;
      z-index: 10;
      cursor: pointer;
      border-radius: 8px;
      backdrop-filter: blur(8px);
    }

    .sensitive-card.blurred > *:not(.sensitive-overlay) {
      filter: blur(15px);
      user-select: none;
    }

/* bio */
	.bio-wrapper {
	  position: relative; 
	  max-width: 100%;
	}

	.bio-container {
	  display: -webkit-box;
	  -webkit-line-clamp: 3;
	  -webkit-box-orient: vertical;
	  overflow: hidden;
	  line-height: 1.5em;
	  word-break: break-word;
	  overflow-wrap: anywhere;
	  white-space: normal;
	}
	.bio-container a {
	  display: inline-block;
	  max-width: 100%;
	  overflow-wrap: anywhere;
	  word-break: break-word;
	  white-space: normal;
	  vertical-align: baseline;
	  color: currentColor;
	  text-decoration: underline;
	  opacity: 0.85;
	}
	.bio-container a:hover {
	  opacity: 1;
	}

	.bio-container.expanded {
	  display: block;
	  -webkit-line-clamp: unset;
	}

	.bio-more {
	  display: inline-block;
	  margin-top: 4px;
	  cursor: pointer;
	  text-decoration: none;
	}
/* Loading */
.urusai-loading {
  position: relative;
  display: inline-block;
}

.urusai-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.15);
  z-index: 5;
}

.urusai-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  border: 3px solid rgb(91,155,211);
  border-top-color: transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin 0.7s linear infinite;
  z-index: 6;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.urusai-php-badge {
	position: absolute !important;
	top: -4px !important;
	right: -6px !important;
	background-color: #ef4444 !important;
	color: #ffffff !important;
	font-size: 10px !important;
	font-weight: bold !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
	line-height: 1 !important;
	padding: 2px 5px !important;
	min-width: 12px !important;
	height: 12px !important;
	border-radius: 10px !important;
	border: 1.5px solid #ffffff !important;
	z-index: 99999 !important;
	pointer-events: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	white-space: nowrap !important;
	transform: none !important;
}

html.dark .urusai-php-badge {
	border-color: #1a1a1a !important;
}