.profile-main {
  max-width: 1080px;
  margin: 0 auto;
  padding-top: calc(var(--site-main-top) - 12px);
}

.profile-hidden {
  display: none !important;
}

.profile-gate {
  text-align: center;
  color: rgba(30, 30, 50, 0.55);
  font-size: 0.9rem;
  padding: 80px 20px;
}

.profile-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-banner {
  position: relative;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1d24 0%, #252932 45%, #1e2229 100%);
  min-height: 168px;
}

.profile-banner-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 18px,
    rgba(255, 255, 255, 0.35) 18px,
    rgba(255, 255, 255, 0.35) 19px
  );
  pointer-events: none;
}

.profile-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 28px 28px 24px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a86ff, #2f6fed);
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.profile-banner-info {
  padding-bottom: 4px;
  min-width: 0;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 8px;
}

.profile-display-name {
  color: #f0f3f7;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  line-height: 1.15;
}

.profile-handle {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

.profile-tabs {
  display: flex;
  gap: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 0.5px solid rgba(255, 255, 255, 0.8);
  border-right: 0.5px solid rgba(255, 255, 255, 0.8);
  padding: 0 12px;
}

.profile-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(30, 30, 50, 0.55);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 14px 18px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.profile-tab:hover {
  color: #2563eb;
}

.profile-tab.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.profile-panel {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 0.5px solid rgba(255, 255, 255, 0.8);
  border-top: none;
  border-radius: 0 0 16px 16px;
  padding: 20px 24px 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.profile-joined {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(30, 30, 50, 0.65);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.profile-joined-icon {
  font-size: 1rem;
  opacity: 0.7;
}

.profile-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.profile-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 0.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
}

.profile-stat-icon {
  font-size: 1.1rem;
  opacity: 0.75;
  width: 24px;
  text-align: center;
}

.profile-stat-value {
  font-size: 1.15rem;
  font-weight: 650;
  color: #1a1a2e;
  line-height: 1.2;
}

.profile-stat-label {
  font-size: 0.75rem;
  color: rgba(30, 30, 50, 0.5);
  margin-top: 2px;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.profile-section {
  background: rgba(255, 255, 255, 0.55);
  border: 0.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  overflow: hidden;
}

.profile-section-head {
  padding: 14px 18px;
  border-bottom: 0.5px solid rgba(30, 30, 50, 0.08);
}

.profile-section-head h2 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
}

.profile-showcase {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
}

.profile-showcase-empty {
  color: rgba(30, 30, 50, 0.45);
  font-size: 0.85rem;
  margin: 0;
}

.profile-showcase-hint {
  font-size: 0.72rem;
  color: rgba(37, 99, 235, 0.7);
  background: rgba(37, 99, 235, 0.08);
  padding: 3px 10px;
  border-radius: 999px;
}

.profile-account-card {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-account-meta {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(30, 30, 50, 0.6);
}

.profile-logout-btn {
  background: transparent;
  border: 0.5px solid rgba(30, 30, 50, 0.15);
  border-radius: 8px;
  color: rgba(30, 30, 50, 0.65);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 6px 14px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.profile-logout-btn:hover {
  border-color: rgba(220, 38, 38, 0.35);
  color: #dc2626;
}

.profile-posts-status {
  color: rgba(30, 30, 50, 0.5);
  font-size: 0.85rem;
  padding: 8px 0 16px;
}

.profile-posts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-post-item {
  display: block;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 0.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.profile-post-item:hover {
  border-color: rgba(37, 99, 235, 0.25);
  transform: translateY(-1px);
}

.profile-post-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0 0 6px;
}

.profile-post-meta {
  font-size: 0.75rem;
  color: rgba(30, 30, 50, 0.5);
}

@media (max-width: 768px) {
  .profile-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .profile-avatar {
    width: 72px;
    height: 72px;
    font-size: 1.5rem;
  }

  .profile-display-name {
    font-size: 1.45rem;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
