/* =============================================================================
   PROFILE CENTER - Prototype Aligned
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.profile-center-page.main {
  max-width: none !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 0 2.2rem;
}

.profile-center-page .main__wrapper {
  padding-top: 1.2rem;
}

.pc-center {
  --pc-bg: #f2f5fa;
  --pc-surface: #ffffff;
  --pc-text: #0f172a;
  --pc-muted: #667085;
  --pc-border: #e2e8f0;
  --pc-accent: #14b8a6;
  --pc-hero-dark: #0f172a;

  max-width: 1120px;
  margin: 0 auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--pc-text);
}

.pc-hero {
  border-radius: 20px 20px 0 0;
  background:
    linear-gradient(150deg, rgba(10, 14, 28, 0.82) 0%, rgba(6, 17, 45, 0.86) 60%, rgba(13, 43, 84, 0.82) 100%),
    radial-gradient(130% 90% at 10% 10%, rgba(20, 184, 166, 0.28) 0%, rgba(20, 184, 166, 0) 60%);
  background-size: cover;
  background-position: center;
  min-height: 230px;
  padding: 2.2rem 2.3rem;
  display: flex;
  align-items: flex-end;
}

.pc-hero__inner {
  display: flex;
  align-items: flex-end;
  gap: 1.2rem;
}

.pc-avatar {
  width: 164px;
  height: 164px;
  border-radius: 999px;
  border: 5px solid rgba(255, 255, 255, 0.92);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.3);
  flex-shrink: 0;
}

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

.pc-identity__name {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.pc-identity__handle {
  margin-top: 0.35rem;
  color: #dbeafe;
  font-size: 1.25rem;
  line-height: 1.2;
}

.pc-tabs {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-top: none;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
}

.pc-tabs__item {
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  min-height: 54px;
  padding: 0 1.05rem;
  color: #475569;
  font-size: 1.3rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.pc-tabs__item:hover {
  color: #0f172a;
}

.pc-tabs__item._active {
  color: #0f172a;
  border-bottom-color: var(--pc-accent);
}

.pc-tabs__badge {
  min-width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.4rem;
}

.pc-panels {
  background: var(--pc-surface);
  border: 1px solid var(--pc-border);
  border-top: none;
  border-radius: 0 0 20px 20px;
  padding: 2rem 2.2rem 2.3rem;
}

.pc-panel {
  display: none;
}

.pc-panel._active {
  display: block;
}

.pc-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.pc-stat-card {
  border: 1px solid var(--pc-border);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  background: #fff;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 0.65rem;
  row-gap: 0.25rem;
  align-items: center;
}

.pc-stat-card._wide {
  grid-column: 1 / -1;
}

.pc-stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #ecfeff;
  color: #0f9e8f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-row: 1 / span 2;
}

.pc-stat-card__icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.pc-stat-card__value {
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.pc-stat-card__label {
  color: var(--pc-muted);
  font-size: 1.06rem;
  line-height: 1.35;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pc-reading-lists {
  margin-top: 2rem;
  padding-top: 1.8rem;
  border-top: 1px solid #eef2f7;
}

.pc-kpis {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  color: var(--pc-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.pc-kpis span {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  padding: 0.22rem 0.62rem;
}

.pc-section-title {
  margin: 0 0 1.35rem;
  text-align: center;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.pc-reading-lists__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.pc-list-card {
  border: 1px solid var(--pc-border);
  border-radius: 16px;
  padding: 1rem;
  background: #fff;
}

.pc-list-card__mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.pc-list-card__tile {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 0.74;
  background: #f8fafc;
  display: block;
}

.pc-list-card__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pc-list-card__tile._placeholder,
.pc-list-card__tile-fallback {
  width: 100%;
  height: 100%;
  display: block;
  background: linear-gradient(145deg, #f5f2ea 0%, #f1ecff 100%);
}

.pc-list-card__title {
  margin: 0.85rem 0 0.35rem;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 700;
}

.pc-list-card__meta {
  margin: 0;
  color: var(--pc-muted);
  font-size: 1.1rem;
}

.pc-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.pc-actions__button {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #f8fbff;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1;
  font-weight: 600;
  padding: 0.65rem 1rem;
}

.pc-actions__button:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.pc-empty {
  margin: 0;
  border: 1px dashed #d8e2f0;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 1rem;
}

.pc-activity,
.pc-reviews {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.pc-activity__item a,
.pc-reviews__item a {
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  background: #fff;
  padding: 0.85rem 1rem;
  color: inherit;
  text-decoration: none;
  display: block;
}

.pc-activity__item a:hover,
.pc-reviews__item a:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.pc-activity__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.pc-activity__row strong {
  font-size: 1rem;
  line-height: 1.3;
}

.pc-activity__row span {
  color: #0f9e8f;
  font-weight: 700;
}

.pc-activity__meta {
  margin-top: 0.4rem;
  color: var(--pc-muted);
  font-size: 0.86rem;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
}

.pc-story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.pc-story-card {
  border: 1px solid var(--pc-border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
}

.pc-story-card__cover {
  background: #f8fafc;
}

.pc-story-card__cover img,
.pc-story-card__fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pc-story-card__fallback {
  background: linear-gradient(145deg, #f5f2ea 0%, #f1ecff 100%);
}

.pc-story-card__body {
  padding: 0.8rem 0.9rem;
}

.pc-story-card__body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.pc-story-card__body h3 a {
  color: var(--pc-text);
  text-decoration: none;
}

.pc-story-card__body h3 a:hover {
  color: #1d4ed8;
}

.pc-story-card__body p {
  margin: 0.4rem 0 0;
  color: var(--pc-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.pc-reviews__title {
  font-weight: 700;
  font-size: 0.96rem;
}

.pc-reviews__item p {
  margin: 0.4rem 0 0.35rem;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.5;
}

.pc-reviews__item span {
  color: var(--pc-muted);
  font-size: 0.78rem;
}

[data-mode='dark'] .pc-center {
  --pc-bg: #0b1220;
  --pc-surface: #121c30;
  --pc-text: #dbe7f7;
  --pc-muted: #9eb1cb;
  --pc-border: #2a3b5b;
}

[data-mode='dark'] .pc-tabs,
[data-mode='dark'] .pc-panels,
[data-mode='dark'] .pc-stat-card,
[data-mode='dark'] .pc-list-card,
[data-mode='dark'] .pc-story-card,
[data-mode='dark'] .pc-activity__item a,
[data-mode='dark'] .pc-reviews__item a {
  background: var(--pc-surface);
  border-color: var(--pc-border);
}

[data-mode='dark'] .pc-stat-card__icon {
  background: #163147;
  color: #5eead4;
}

[data-mode='dark'] .pc-empty {
  border-color: #2e415f;
  background: #102036;
  color: var(--pc-muted);
}

[data-mode='dark'] .pc-tabs__item {
  color: #a9bdd8;
}

[data-mode='dark'] .pc-tabs__item._active,
[data-mode='dark'] .pc-tabs__item:hover {
  color: #dbe7f7;
}

[data-mode='dark'] .pc-tabs__badge {
  border-color: #324866;
  background: #14263e;
  color: #bdd0e9;
}

[data-mode='dark'] .pc-list-card__tile._placeholder,
[data-mode='dark'] .pc-list-card__tile-fallback,
[data-mode='dark'] .pc-story-card__fallback {
  background: linear-gradient(145deg, #1a2c47 0%, #243b59 100%);
}

[data-mode='dark'] .pc-actions__button {
  border-color: #325680;
  background: #12233b;
  color: #bfdbfe;
}

[data-mode='dark'] .pc-actions__button:hover {
  border-color: #4f7cb2;
  background: #173152;
}

[data-mode='dark'] .pc-kpis span {
  border-color: #324866;
  background: #14263e;
}

@media only screen and (max-width: 900px) {
  .pc-center {
    max-width: 100%;
  }

  .pc-hero {
    min-height: 210px;
    padding: 1.6rem 1.2rem;
  }

  .pc-avatar {
    width: 124px;
    height: 124px;
  }

  .pc-tabs {
    padding: 0 0.5rem;
  }

  .pc-panels {
    padding: 1.3rem 1rem 1.5rem;
  }

  .pc-reading-lists__grid,
  .pc-story-grid {
    grid-template-columns: 1fr;
  }
}

@media only screen and (max-width: 640px) {
  .pc-hero__inner {
    align-items: center;
    gap: 0.85rem;
  }

  .pc-avatar {
    width: 94px;
    height: 94px;
    border-width: 3px;
  }

  .pc-identity__name {
    font-size: 1.7rem;
  }

  .pc-identity__handle {
    font-size: 0.95rem;
  }

  .pc-tabs__item {
    min-height: 44px;
    font-size: 0.88rem;
    padding: 0 0.7rem;
  }

  .pc-tabs__badge {
    min-width: 1.35rem;
    height: 1.35rem;
    font-size: 0.72rem;
  }

  .pc-stats {
    grid-template-columns: 1fr;
  }

  .pc-stat-card {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 0.85rem 0.9rem;
  }

  .pc-stat-card__icon {
    width: 40px;
    height: 40px;
  }

  .pc-stat-card__value {
    font-size: 1.4rem;
  }

  .pc-stat-card__label {
    font-size: 0.82rem;
  }

  .pc-section-title {
    font-size: 1.35rem;
  }
}
