/* ════════════════════════════════════════════════════════════
   Fun Over Here — Profile Page Styles
   Modern, Facebook-inspired profile layout
   ════════════════════════════════════════════════════════════ */

/* ── Cover Photo ──────────────────────────────────────────── */
.profile-cover {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--foh-primary) 0%, var(--foh-secondary) 50%, var(--foh-accent) 100%);
  position: relative;
  overflow: hidden;
}

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

@media (min-width: 768px) {
  .profile-cover { height: 320px; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
}

/* ── Profile Header (avatar + name area) ──────────────────── */
.profile-header {
  background: var(--foh-surface);
  padding: 0 var(--sp-md) var(--sp-lg);
  position: relative;
  text-align: center;
}

.profile-avatar-wrapper {
  display: flex;
  justify-content: center;
  margin-top: -56px;
  position: relative;
  z-index: 2;
}

.profile-avatar {
  width: 112px;
  height: 112px;
  border-radius: var(--radius-full);
  border: 4px solid var(--foh-surface);
  object-fit: cover;
  background: var(--foh-border-light);
  box-shadow: var(--shadow-md);
}

.profile-avatar-placeholder {
  width: 112px;
  height: 112px;
  border-radius: var(--radius-full);
  border: 4px solid var(--foh-surface);
  background: linear-gradient(135deg, var(--foh-primary), var(--foh-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.profile-name {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-top: var(--sp-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-name .verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--foh-primary);
  border-radius: var(--radius-full);
  font-size: 12px;
  flex-shrink: 0;
}

.profile-headline {
  font-size: var(--text-lg);
  color: var(--foh-text-secondary);
  margin-top: 4px;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-sm) var(--sp-md);
  margin-top: var(--sp-sm);
  font-size: var(--text-sm);
  color: var(--foh-text-muted);
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--sp-sm);
  padding: 6px 14px;
  background: var(--foh-border-light);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
}

/* ── Action buttons row ───────────────────────────────────── */
.profile-actions {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
  margin-top: var(--sp-md);
  padding: 0 var(--sp-md);
  flex-wrap: wrap;
}

.profile-actions .btn {
  flex: 1;
  max-width: 200px;
}

/* ── Stats bar ────────────────────────────────────────────── */
.profile-stats {
  display: flex;
  justify-content: space-around;
  padding: var(--sp-md);
  background: var(--foh-surface);
  border-top: 1px solid var(--foh-border-light);
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-value {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--foh-text-primary);
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--foh-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Bio section ──────────────────────────────────────────── */
.profile-bio {
  font-size: var(--text-base);
  color: var(--foh-text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ── Info grid (details section) ──────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-sm);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  padding: var(--sp-sm) 0;
}

.info-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(102, 126, 234, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.info-label {
  font-size: var(--text-xs);
  color: var(--foh-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: var(--text-sm);
  color: var(--foh-text-primary);
  font-weight: 500;
}

@media (min-width: 480px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Interest tags ────────────────────────────────────────── */
.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.interest-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: rgba(102, 126, 234, 0.08);
  color: var(--foh-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* ── Photo grid ───────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.photo-grid-item {
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.photo-grid-item:hover img { transform: scale(1.05); }

.photo-grid-more {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: var(--text-xl);
  font-weight: 700;
}

/* ── Profile stories ──────────────────────────────────────── */
.profile-story-card {
  padding: var(--sp-md);
  border-bottom: 1px solid var(--foh-border-light);
}

.profile-story-card:last-child { border-bottom: none; }

.story-header {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-sm);
}

.story-emoji {
  font-size: 24px;
  width: 40px;
  height: 40px;
  background: rgba(102, 126, 234, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.story-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--foh-text-primary);
}

.story-type {
  font-size: var(--text-xs);
  color: var(--foh-text-muted);
  text-transform: capitalize;
}

.story-content {
  font-size: var(--text-base);
  color: var(--foh-text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
}

.story-cover {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-sm);
}

.story-footer {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  margin-top: var(--sp-sm);
  font-size: var(--text-sm);
  color: var(--foh-text-muted);
}

.story-like-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--foh-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  min-height: 36px;
}

.story-like-btn:hover { background: var(--foh-border-light); }
.story-like-btn.liked { color: var(--foh-danger); }

/* ── Badge showcase ───────────────────────────────────────── */
.badge-showcase {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.showcase-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--sp-sm);
  border-radius: var(--radius-md);
  background: var(--foh-border-light);
  min-width: 72px;
  text-align: center;
}

.showcase-badge-icon { font-size: 24px; }
.showcase-badge-name {
  font-size: var(--text-xs);
  color: var(--foh-text-secondary);
  font-weight: 600;
}

/* ── Online indicator ─────────────────────────────────────── */
.online-dot {
  width: 12px;
  height: 12px;
  background: var(--foh-success);
  border: 2px solid var(--foh-surface);
  border-radius: var(--radius-full);
  display: inline-block;
}

.online-dot.offline { background: var(--foh-text-muted); }

/* ── Section titles ───────────────────────────────────────── */
.section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.section-title .section-count {
  font-size: var(--text-sm);
  color: var(--foh-text-muted);
  font-weight: 400;
}

/* ── Vanity URL display ───────────────────────────────────── */
.vanity-url-display {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--foh-border-light);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--foh-text-secondary);
  margin-top: var(--sp-sm);
  justify-content: center;
}

.vanity-url-display .url-text {
  color: var(--foh-primary);
  font-weight: 600;
}

/* ── Empty states ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--sp-2xl) var(--sp-md);
  color: var(--foh-text-muted);
}

.empty-state-icon { font-size: 48px; margin-bottom: var(--sp-sm); }
.empty-state-text { font-size: var(--text-base); }

/* ── Responsive improvements for profile ──────────────────── */
@media (min-width: 768px) {
  .profile-avatar-wrapper { margin-top: -72px; }
  .profile-avatar, .profile-avatar-placeholder {
    width: 148px;
    height: 148px;
    border-width: 5px;
    font-size: 56px;
  }
  .profile-name { font-size: var(--text-3xl); }
  .profile-actions .btn { max-width: 240px; }
}
