/* Social Feed Styles */
/* Matches dark theme aesthetic of the app */

.feed-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
  padding-top: 0; /* No top padding - headline handles spacing */
  padding-bottom: 2rem;
  box-sizing: border-box;
}

.feed-container,
.feed-container * {
  font-family: 'Nunito Sans', sans-serif;
}

/* Feed Header - matches history.html */
.feed-header {
  text-align: center;
  padding: 5rem 1rem 1rem;
}

.feed-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  background: -webkit-linear-gradient(#fff, #aaa);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.feed-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* Leaderboard Section */
.leaderboard-section {
  margin-bottom: 1.5rem;
}

.leaderboard-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.leaderboard-tabs::-webkit-scrollbar {
  display: none;
}

.leaderboard-tab {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.leaderboard-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.leaderboard-tab.active {
  background: linear-gradient(135deg, #1565c0 0%, #1976d2 50%, #2196f3 100%);
  border-color: transparent;
  color: #fff;
}

/* Leaderboard Content - matches history.html section style */
.leaderboard-content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 1rem 1.25rem;
}

.leaderboard-panel {
  display: none;
}

.leaderboard-panel.active {
  display: block;
}

.leaderboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.leaderboard-rank {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}

.leaderboard-rank.rank-1 {
  color: #ffd700;
}

.leaderboard-rank.rank-2 {
  color: #c0c0c0;
}

.leaderboard-rank.rank-3 {
  color: #cd7f32;
}

.leaderboard-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333 0%, #555 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  overflow: hidden;
}

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

.leaderboard-info {
  flex: 1;
  min-width: 0;
}

.leaderboard-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-xp {
  font-size: 0.75rem;
  font-weight: 700;
  color: #dfa400;
}

/* Feed Section Header - matches history.html */
.feed-section {
  /* Removed card styling for cleaner, native mobile-first look */
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-top: 1.5rem;
  margin-bottom: 1.125rem;
  box-sizing: border-box;
}

.feed-section-header {
  display: none; /* Hidden for consistency with history.html - main headline "Community" is sufficient */
}

/* Feed List Title - used when not in a section box */
.feed-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 1.5rem 0 1rem;
}

/* Feed Headline - matches history.html */
.feed-headline {
  font-size: 2.2rem;
  text-align: center;
  margin: 0 0 1.5rem 0;
  font-weight: 800;
  line-height: 1.1;
  padding: 1.5rem 1rem 0 1rem; /* Clean top spacing without header overlay */
  box-sizing: border-box;
}

.feed-headline-static {
  background: -webkit-linear-gradient(#fff, #aaa);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
  .feed-headline {
    font-size: 1.8rem;
    margin: 0.3rem 0 1rem 0;
    padding-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .feed-headline {
    font-size: 1.5rem;
    margin: 0.3rem 0 0.8rem 0;
    padding-top: 1.5rem;
  }
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Session Card - matches journey card style from history.html */
.session-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 4px solid rgba(33, 150, 243, 0.5);
  border-radius: 16px;
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-left-color 0.2s ease;
  opacity: 0;
  animation: session-card-fade-in 0.5s ease forwards;
}

@keyframes session-card-fade-in {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.session-card:nth-child(1) {
  animation-delay: 0.1s;
}

.session-card:nth-child(2) {
  animation-delay: 0.2s;
}

.session-card:nth-child(3) {
  animation-delay: 0.3s;
}

.session-card:nth-child(4) {
  animation-delay: 0.4s;
}

.session-card:nth-child(5) {
  animation-delay: 0.5s;
}

.session-card:nth-child(n+6) {
  animation-delay: 0.6s;
}

.session-card:hover {
  border-left-color: rgba(33, 150, 243, 0.8);
  background: rgba(0, 0, 0, 0.35);
}

.session-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.session-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333 0%, #555 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.session-avatar:hover {
  transform: scale(1.05);
}

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

.session-user-info {
  flex: 1;
  min-width: 0;
}

.session-user-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: color 0.2s ease;
}

.session-user-name:hover {
  color: #dfa400;
}

.session-timestamp {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.session-skill-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Session Content */
.session-content {
  margin-bottom: 0.75rem;
}

.session-skill-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.session-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.session-stat {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.session-stat-icon {
  font-size: 0.9rem;
  opacity: 0.7;
}

.session-stat-value {
  font-weight: 700;
}

.session-stat-label {
  opacity: 0.7;
}

/* XP Badge */
.xp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  background: linear-gradient(135deg, #b8860b 0%, #dfa400 100%);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #000;
  box-shadow: 0 2px 8px rgba(223, 164, 0, 0.3);
}

.xp-badge-icon {
  font-size: 0.7rem;
}

/* Session Footer */
.session-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.session-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Fire Button */
.fire-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fire-button:hover {
  background: rgba(255, 165, 0, 0.1);
  border-color: rgba(255, 165, 0, 0.3);
  color: #ffa500;
}

.fire-button.active {
  background: rgba(255, 165, 0, 0.15);
  border-color: rgba(255, 165, 0, 0.4);
  color: #ffa500;
}

.fire-button-icon {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.fire-button.active .fire-button-icon {
  animation: fireGlow 0.3s ease;
}

@keyframes fireGlow {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Empty State - matches history.html style */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: #2196F3;
  opacity: 0.6;
}

.empty-state-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.75rem;
}

.empty-state-text {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 2rem;
  max-width: 280px;
  line-height: 1.5;
}

.empty-state-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  background: linear-gradient(135deg, #1565c0 0%, #1976d2 50%, #2196f3 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.empty-state-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

/* Loading State - matches history.html skeleton pattern */
.loading-state {
  text-align: center;
  padding: 2rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #2196F3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* ============================================
   SKELETON LOADING STYLES (matches history.html)
   ============================================ */
@keyframes skeleton-shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(33, 150, 243, 0.05) 0%,
    rgba(33, 150, 243, 0.12) 50%,
    rgba(33, 150, 243, 0.05) 100%
  );
  background-size: 1000px 100%;
  animation: skeleton-shimmer 2s infinite linear;
  border-radius: 8px;
}

/* Session Card Skeleton */
.skeleton-session-card {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
  border-left: 4px solid rgba(33, 150, 243, 0.3);
}

.skeleton-session-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-user-info {
  flex: 1;
}

.skeleton-user-name {
  height: 16px;
  width: 120px;
  margin-bottom: 4px;
}

.skeleton-timestamp {
  height: 12px;
  width: 60px;
}

.skeleton-skill-name {
  height: 20px;
  width: 150px;
  margin-bottom: 0.5rem;
}

.skeleton-stats {
  height: 28px;
  width: 200px;
}

.skeleton-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.skeleton-meta {
  height: 14px;
  width: 100px;
}

.skeleton-button {
  height: 32px;
  width: 60px;
  border-radius: 20px;
}

/* Load More Button */
.load-more-container {
  text-align: center;
  padding: 1.5rem 0;
}

.load-more-btn {
  padding: 0.75rem 2rem;
  background: rgba(33, 150, 243, 0.1);
  border: 1px solid rgba(33, 150, 243, 0.3);
  border-radius: 12px;
  color: #2196F3;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Nunito Sans', sans-serif;
}

.load-more-btn:hover {
  background: rgba(33, 150, 243, 0.2);
  border-color: rgba(33, 150, 243, 0.5);
}

/* Skill Leaders Section */
.skill-leaders-section {
  margin-top: 0.5rem;
}

.skill-leader-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 3px solid rgba(33, 150, 243, 0.3);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.skill-leader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skill-leader-skill {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.skill-leader-list {
  display: flex;
  gap: 1rem;
}

.skill-leader-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.skill-leader-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333 0%, #555 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

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

.skill-leader-name {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.skill-leader-xp {
  font-size: 0.7rem;
  color: #dfa400;
  font-weight: 600;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .feed-headline {
    font-size: 1.8rem;
    margin: 0.3rem 0 1rem 0;
    padding-top: 1.5rem;
  }
  
  .feed-header {
    padding-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .feed-headline {
    font-size: 1.5rem;
    margin: 0.3rem 0 0.8rem 0;
    padding-top: 1.5rem;
  }
  
  .feed-header {
    padding-top: 1.5rem;
  }
  
  .feed-title {
    font-size: 1.6rem;
  }
  
  .session-stats {
    gap: 0.5rem;
  }
  
  .session-stat {
    font-size: 0.8rem;
  }
  
  .leaderboard-tab {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .feed-section-header {
    font-size: 1.1rem;
  }
}

