/**
 * Public profile page (viewed when visiting /user/{id})
 * Same design as original profile-public.html
 */
.public-profile {
  min-height: 100vh;
  background: linear-gradient(180deg, #f8faf9 0%, #ffffff 100%);
}

.profile-hero {
  background: linear-gradient(135deg, #2d5016 0%, #3d6b1f 50%, #4a7c28 100%);
  padding: 4rem 2rem 6rem;
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.profile-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.1) 100%);
  pointer-events: none;
}

.profile-hero__content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  animation: profileFadeInUp 0.8s ease-out;
}

.profile-hero__avatar {
  width: 140px;
  height: 140px;
  background: white;
  color: var(--color-primary, #2d5016);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 800;
  border: 5px solid rgba(255,255,255,0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 0 0 8px rgba(255,255,255,0.1);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: profileScaleIn 0.6s ease-out 0.2s both;
}

.profile-hero__avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 0 8px rgba(255,255,255,0.2);
}

.profile-hero__info {
  flex: 1;
  color: white;
  animation: profileFadeInUp 0.8s ease-out 0.3s both;
}

.profile-hero__name {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  line-height: 1.2;
}

.verified-badge {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #1f2937;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.profile-hero__bio {
  font-size: 1.15rem;
  opacity: 0.95;
  margin-bottom: 1.25rem;
  max-width: 650px;
  line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.profile-hero__meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  opacity: 0.9;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.profile-hero__meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-hero__actions {
  display: flex;
  gap: 1rem;
  animation: profileFadeInUp 0.8s ease-out 0.4s both;
}

.btn-follow {
  background: white;
  color: var(--color-primary, #2d5016);
  padding: 0.875rem 2.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-follow:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.btn-message {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  color: white;
  padding: 0.875rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  text-decoration: none;
}

.btn-message:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-2px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 1rem;
}

.back-link:hover {
  color: white;
}

/* Stats bar */
.profile-stats {
  max-width: 1200px;
  margin: -3.5rem auto 3rem;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.stats-card {
  background: white;
  border-radius: 20px;
  padding: 2rem 2.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1.5rem;
  border: 1px solid rgba(45, 80, 22, 0.1);
  animation: profileFadeInUp 0.8s ease-out 0.5s both;
  position: relative;
}

.stat-item {
  text-align: center;
  padding: 0.75rem 1.5rem;
}

.stat-item--interactive {
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
  transition: background-color 0.2s ease;
}

.stat-item--interactive:hover {
  background: #f8fafc;
}

.profile-connections-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 1.25rem;
  width: min(360px, calc(100% - 2.5rem));
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(0,0,0,0.14);
  z-index: 20;
}

.profile-connections-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid #eef2f7;
}

.profile-connections-dropdown__header button {
  border: none;
  background: transparent;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
}

.profile-connections-dropdown__body {
  max-height: 320px;
  overflow-y: auto;
}

.profile-connections-dropdown__state {
  padding: 1rem;
  color: #64748b;
  font-size: 0.9rem;
}

.profile-connections-dropdown__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  color: #0f172a;
  border-bottom: 1px solid #f1f5f9;
}

.profile-connections-dropdown__item:last-child {
  border-bottom: none;
}

.profile-connections-dropdown__item:hover {
  background: #f8fafc;
}

.profile-connections-dropdown__avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
}

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

.profile-connections-dropdown__avatar-fallback {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.profile-connections-dropdown__meta {
  min-width: 0;
  display: block;
}

.profile-connections-dropdown__name {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-connections-dropdown__badge {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: #64748b;
}

.stat-item__value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary, #2d5016) 0%, #4a7c28 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.stat-item__label {
  font-size: 0.9rem;
  color: var(--color-text-secondary, #666);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Content */
.profile-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.profile-content .content-section {
  margin-bottom: 3rem;
}

.profile-content .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(45, 80, 22, 0.1);
}

.profile-content .section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1a1a1a;
  padding-left: 1rem;
  position: relative;
}

.profile-content .section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, var(--color-primary, #2d5016), #4a7c28);
  border-radius: 2px;
}

.see-all-link {
  color: var(--color-primary, #2d5016);
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.see-all-link:hover {
  background: rgba(45, 80, 22, 0.1);
}

/* Video grid (public profile page) */
.profile-content .video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}

.profile-content .video-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  transition: all 0.4s ease;
  cursor: pointer;
}

.profile-content .video-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15), 0 0 0 1px rgba(45, 80, 22, 0.1);
}

.profile-content .video-card__thumbnail {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.profile-content .video-card__duration {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0,0,0,0.85);
  color: white;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
}

.profile-content .video-card__content {
  padding: 1.25rem;
}

.profile-content .video-card__title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  color: #1a1a1a;
}

.profile-content .video-card:hover .video-card__title {
  color: var(--color-primary, #2d5016);
}

.profile-content .video-card__meta {
  font-size: 0.85rem;
  color: var(--color-text-secondary, #666);
}

/* About card */
.about-card {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  border: 1px solid rgba(45, 80, 22, 0.1);
}

.about-card h3 {
  margin-bottom: 1.25rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a1a;
}

.about-card p {
  color: var(--color-text-secondary, #666);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.interests-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.interest-tag {
  background: linear-gradient(135deg, #e6f4ea 0%, #d4edda 100%);
  color: var(--color-primary, #2d5016);
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(45, 80, 22, 0.2);
}

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  transition: all 0.4s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15), 0 0 0 1px rgba(45, 80, 22, 0.1);
}

.product-card__image {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: #f0f0f0;
}

.product-card__content {
  padding: 1.25rem;
}

.product-card__title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary, #2d5016);
}

.price-compare {
  font-size: 0.9rem;
  color: #999;
  text-decoration: line-through;
}

.product-card__meta {
  font-size: 0.85rem;
  color: var(--color-text-secondary, #666);
}

@keyframes profileFadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes profileScaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
  .profile-hero__content {
    flex-direction: column;
    text-align: center;
  }
  .profile-hero__name {
    justify-content: center;
    font-size: 1.75rem;
  }
  .profile-hero__meta {
    justify-content: center;
  }
  .profile-hero__actions {
    justify-content: center;
  }
}
