/**
 * Leaderboard Page CSS
 * AI Link Platform - 추천 리더보드
 * UI/UX 개선 버전 - 기존 스타일 100% 유지 + 개선사항 추가
 */

/* ============================================
   Variables
   ============================================ */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --primary-bg: #eef2ff;
  
  --gold: #fbbf24;
  --gold-light: #fef3c7;
  --silver: #9ca3af;
  --silver-light: #f3f4f6;
  --bronze: #d97706;
  --bronze-light: #fef3c7;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
  
  /* 종합 점수 시스템 색상 */
  --score-activity: #3b82f6;
  --score-contribution: #10b981;
  --score-trust: #8b5cf6;
  --score-recognition: #f59e0b;
}

/* ============================================
   Base
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
}

.lb-page {
  min-height: 100vh;
  padding-top: 70px;
}

.lb-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Hero Section
   ============================================ */
.lb-hero {
  background: linear-gradient(135deg, #6366f1 0%, #7c3aed 50%, #6d28d9 100%);
  padding: 40px 24px 48px;
  margin-top: 70px; /* 헤더 높이만큼 아래로 이동 */
  position: relative;
  overflow: hidden;
}

.lb-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
}

.lb-hero::after {
  content: '🏆';
  position: absolute;
  top: 20%;
  right: 10%;
  font-size: 8rem;
  opacity: 0.1;
}

.lb-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.lb-hero-text h1 {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lb-hero-text p {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 24px;
}

/* 필터 */
.lb-hero-filters {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.lb-filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.lb-period-tabs {
  display: flex;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding: 4px;
}

.lb-period-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.lb-period-btn:hover {
  background: rgba(255,255,255,0.15);
}

.lb-period-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow);
}

.lb-category-select {
  padding: 10px 16px;
  border: none;
  background: white;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  color: var(--gray-700);
  cursor: pointer;
  min-width: 140px;
}

/* 정렬 탭 */
.lb-sort-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.lb-sort-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  margin-right: 8px;
  font-weight: 500;
}

.lb-sort-btn {
  padding: 8px 16px;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.lb-sort-btn:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}

.lb-sort-btn.active {
  background: white;
  color: var(--primary);
  border-color: white;
  font-weight: 600;
}

/* ============================================
   Podium Section
   ============================================ */
.lb-podium-section {
  padding: 40px 0;
  background: white;
  border-bottom: 1px solid var(--gray-100);
}

.lb-section-header {
  text-align: center;
  margin-bottom: 32px;
}

.lb-section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.lb-section-sub {
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* 포디움 */
.lb-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  padding: 20px 0 0;
}

.lb-podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease;
}

.lb-podium-item:hover {
  transform: translateY(-5px);
}

.lb-podium-item.empty {
  opacity: 0.6;
}

.lb-podium-item.empty:hover {
  transform: none;
}

.lb-podium-crown {
  position: absolute;
  top: -40px;
  font-size: 2rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.lb-podium-rank {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.lb-podium-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.lb-podium-avatar.empty {
  background: var(--gray-200) !important;
  color: var(--gray-400);
}

.lb-podium-item.first .lb-podium-avatar {
  width: 88px;
  height: 88px;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.4);
}

.lb-podium-item.second .lb-podium-avatar {
  background: linear-gradient(135deg, #e5e7eb, #9ca3af);
  box-shadow: 0 6px 20px rgba(156, 163, 175, 0.4);
}

.lb-podium-item.third .lb-podium-avatar {
  background: linear-gradient(135deg, #fcd34d, #d97706);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
}

.lb-podium-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.lb-podium-item.first .lb-podium-name {
  font-size: 1.25rem;
}

.lb-podium-company {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.lb-podium-count {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
}

.lb-podium-count span {
  font-size: 1.2rem;
}

.lb-podium-badge {
  margin-top: 8px;
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--gold-light), #fef3c7);
  border: 1px solid var(--gold);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bronze);
}

/* 포디움 점수 표시 */
.lb-podium-score {
  margin: 8px 0;
}

.lb-podium-score .lb-score-total {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
}

.lb-podium-item.first .lb-podium-score .lb-score-total {
  font-size: 2rem;
}

/* 포디움 세부 점수 - 크기 증가 */
.lb-podium-breakdown {
  display: flex;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.lb-podium-breakdown span {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  background: var(--gray-50);
  border-radius: 4px;
}

.lb-podium-breakdown .lb-no-data {
  color: var(--gray-400);
  font-size: 0.75rem;
  font-style: italic;
}

/* 포디움 배지 */
.lb-podium-badges {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}

/* 포디움 스탠드 */
.lb-podium-stand {
  width: 120px;
  margin-top: 16px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.lb-podium-item.first .lb-podium-stand {
  width: 140px;
  height: 100px;
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
}

.lb-podium-item.second .lb-podium-stand {
  height: 70px;
  background: linear-gradient(180deg, #e5e7eb 0%, #9ca3af 100%);
}

.lb-podium-item.third .lb-podium-stand {
  height: 50px;
  background: linear-gradient(180deg, #fcd34d 0%, #d97706 100%);
}

/* ============================================
   Main Section
   ============================================ */
.lb-main-section {
  padding: 40px 0;
}

.lb-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* 컨텐츠 그리드 */
.lb-content-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
}

/* 랭킹 카드 */
.lb-ranking-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

/* 랭킹 섹션 */
.lb-ranking-section {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  padding: 24px;
}

.lb-ranking-section .lb-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-100);
}

.lb-ranking-section .lb-section-header h3 {
  font-size: 1.1rem;
  margin: 0;
}

.lb-count {
  font-size: 0.875rem;
  color: var(--gray-500);
  background: var(--gray-100);
  padding: 4px 12px;
  border-radius: 20px;
}

.lb-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
}

.lb-card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.lb-card-sub {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.lb-ranking-list {
  padding: 8px 0;
  min-height: 300px;
}

/* 랭킹 아이템 */
.lb-rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(10px);
}

.lb-rank-item.fade-in {
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.3s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lb-rank-item:hover {
  background: var(--gray-50);
  transform: translateX(4px);
}

.lb-rank-medal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.lb-rank-medal.gold {
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.lb-rank-medal.silver {
  background: linear-gradient(135deg, #f3f4f6, #9ca3af);
  box-shadow: 0 2px 8px rgba(156, 163, 175, 0.3);
}

.lb-rank-medal.bronze {
  background: linear-gradient(135deg, #fef3c7, #d97706);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.lb-rank-medal.default {
  background: var(--gray-100);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-500);
}

/* 랭킹 아바타 */
.lb-rank-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.lb-rank-info {
  flex: 1;
  min-width: 0;
}

.lb-rank-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lb-rank-sub,
.lb-rank-company {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 2px;
}

/* 랭킹 배지 */
.lb-rank-badges {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.lb-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--primary-bg);
  cursor: help;
}

.lb-rank-stats {
  text-align: right;
  min-width: 80px;
}

/* 종합 점수 표시 */
.lb-rank-scores {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.lb-rank-total {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.lb-rank-unit {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--gray-500);
  margin-left: 2px;
}

/* 점수 바 - 크기 증가 */
.lb-score-bar {
  width: 140px;
  height: 8px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.lb-score-bar-segment {
  height: 100%;
  transition: width 0.5s ease;
}

.lb-score-bar-segment.activity {
  background: var(--score-activity);
}

.lb-score-bar-segment.contribution {
  background: var(--score-contribution);
}

.lb-score-bar-segment.trust {
  background: var(--score-trust);
}

.lb-score-bar-segment.recognition {
  background: var(--score-recognition);
}

/* 세부 점수 표시 - 크기 증가 */
.lb-rank-breakdown {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 4px;
}

.lb-rank-breakdown span {
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: help;
}

.lb-rank-count {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.lb-rank-progress {
  margin-top: 6px;
  height: 4px;
  background: var(--gray-100);
  border-radius: 2px;
  overflow: hidden;
}

.lb-rank-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.lb-rank-progress-fill.gold {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.lb-rank-progress-fill.silver {
  background: linear-gradient(90deg, #e5e7eb, #9ca3af);
}

.lb-rank-progress-fill.bronze {
  background: linear-gradient(90deg, #fcd34d, #d97706);
}

.lb-rank-progress-fill.default {
  background: var(--primary);
}

/* 순위 변동 → v4.0에서 재정의 */

/* 더 보기 버튼 */
.lb-card-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--gray-100);
}

.lb-show-more {
  width: 100%;
  padding: 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 16px;
}

.lb-show-more:hover {
  background: var(--primary-bg);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* ============================================
   사이드바
   ============================================ */
.lb-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ============================================
   My Rank Section
   ============================================ */
.lb-my-rank-section {
  padding: 0 0 40px;
}

.lb-my-rank-card {
  background: linear-gradient(135deg, var(--primary-bg), #dbeafe);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.lb-my-rank-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.lb-my-rank-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* 점수 원형 */
.lb-my-score-circle {
  text-align: center;
  padding: 28px;
  background: linear-gradient(135deg, white, var(--gold-light));
  border-radius: var(--radius-xl);
  margin-bottom: 20px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.lb-score-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.lb-score-label {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.lb-my-rank-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

/* 내 순위 정보 */
.lb-my-rank-info {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 24px;
}

.lb-rank-stat {
  text-align: center;
}

.lb-rank-stat .lb-rank-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-800);
}

.lb-rank-stat .lb-rank-label {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.lb-my-rank-item {
  text-align: center;
  padding: 16px;
  background: white;
  border-radius: var(--radius-lg);
}

.lb-my-rank-label {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.lb-my-rank-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
}

.lb-my-rank-value small {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--gray-500);
  margin-top: 4px;
}

.lb-my-rank-value.highlight {
  color: var(--primary);
}

/* 세부 점수 breakdown - 개선 */
.lb-my-breakdown {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.lb-breakdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lb-breakdown-label {
  font-size: 0.85rem;
  width: 65px;
  flex-shrink: 0;
  font-weight: 500;
}

.lb-breakdown-bar {
  flex: 1;
  height: 12px;
  background: var(--gray-200);
  border-radius: 6px;
  overflow: hidden;
}

.lb-breakdown-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s ease;
}

.lb-breakdown-fill.activity {
  background: linear-gradient(90deg, var(--score-activity), #60a5fa);
}

.lb-breakdown-fill.contribution {
  background: linear-gradient(90deg, var(--score-contribution), #34d399);
}

.lb-breakdown-fill.trust {
  background: linear-gradient(90deg, var(--score-trust), #a78bfa);
}

.lb-breakdown-fill.recognition {
  background: linear-gradient(90deg, var(--score-recognition), #fbbf24);
}

.lb-breakdown-value {
  font-size: 0.8rem;
  color: var(--gray-600);
  width: 65px;
  text-align: right;
  flex-shrink: 0;
  font-weight: 500;
}

/* 내 배지 */
.lb-my-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.lb-no-badge {
  font-size: 0.85rem;
  color: var(--gray-400);
  font-style: italic;
}

/* 팁 섹션 */
.lb-tips {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--gray-100);
}

.lb-tips h5 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
}

.lb-tips ul {
  margin: 0;
  padding-left: 20px;
  font-size: 0.85rem;
  color: var(--gray-600);
}

.lb-tips li {
  margin-bottom: 6px;
  line-height: 1.4;
}

.lb-my-rank-actions {
  display: flex;
  gap: 12px;
}

/* 내 액션 버튼 */
.lb-my-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lb-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.lb-action-btn.primary {
  background: var(--primary);
  color: white;
}

.lb-action-btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.lb-action-btn.secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.lb-action-btn.secondary:hover {
  background: var(--gray-50);
  border-color: var(--primary-light);
}

/* 로그인 프롬프트 */
.lb-login-prompt {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  padding: 32px 24px;
  text-align: center;
}

.lb-login-prompt h4 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.lb-login-prompt p {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin: 0 0 20px;
}

.lb-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
}

.lb-login-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* 점수 안내 */
.lb-score-guide {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  padding: 24px;
}

.lb-score-guide h4 {
  margin: 0 0 20px;
  font-size: 1rem;
  font-weight: 700;
}

.lb-guide-item {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  align-items: flex-start;
}

.lb-guide-item:last-child {
  margin-bottom: 0;
}

.lb-guide-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.lb-guide-item strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--gray-700);
}

.lb-guide-item p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ============================================
   Hall of Fame Section
   ============================================ */
.lb-hall-of-fame-section {
  padding: 40px 0;
  background: white;
  border-top: 1px solid var(--gray-100);
}

.lb-hall-of-fame {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* 사이드바용 명예의 전당 */
.lb-sidebar .lb-hall-of-fame {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  padding: 24px;
}

.lb-sidebar .lb-hall-of-fame h4 {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 700;
}

.lb-hof-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lb-hof-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, var(--gray-50), white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  transition: all 0.2s;
}

.lb-sidebar .lb-hof-item {
  padding: 14px;
  border-radius: var(--radius-lg);
}

.lb-hof-item:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.lb-hof-medal {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef3c7, #fbbf24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.lb-sidebar .lb-hof-medal {
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
}

.lb-hof-info {
  flex: 1;
}

.lb-hof-period {
  font-size: 0.8rem;
  color: var(--bronze);
  font-weight: 600;
  margin-bottom: 4px;
}

.lb-sidebar .lb-hof-period {
  font-size: 0.75rem;
}

.lb-hof-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 2px;
}

.lb-sidebar .lb-hof-name {
  font-size: 0.9rem;
}

.lb-hof-details {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.lb-sidebar .lb-hof-details {
  font-size: 0.8rem;
}

.lb-hof-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-500);
}

.lb-hof-empty p {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.lb-hof-empty span {
  font-size: 0.9rem;
  color: var(--gray-400);
}

/* ============================================
   CTA Section
   ============================================ */
.lb-cta-section {
  padding: 40px 0 60px;
}

.lb-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: var(--radius-xl);
  color: white;
}

.lb-cta-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.lb-cta-content p {
  font-size: 0.95rem;
  opacity: 0.9;
}

.lb-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: white;
  color: var(--primary);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.lb-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   Toast
   ============================================ */
.lb-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 28px;
  background: var(--gray-800);
  color: white;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s;
  z-index: 10000;
}

.lb-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================
   Skeletons
   ============================================ */
.lb-skeleton,
.lb-hof-skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-lg);
  margin: 8px 0;
}

.lb-skeleton {
  height: 72px;
}

.lb-hof-skeleton {
  height: 88px;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================
   Empty State
   ============================================ */
.lb-empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--gray-500);
}

.lb-empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  color: var(--gray-300);
}

.lb-empty-state p {
  font-size: 1rem;
  margin: 0;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .lb-main-grid {
    grid-template-columns: 1fr;
  }
  
  .lb-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .lb-hero-text h1 {
    font-size: 1.6rem;
  }
  
  .lb-hero-filters {
    flex-direction: column;
    gap: 16px;
  }
  
  .lb-sort-tabs {
    justify-content: flex-start;
  }
  
  .lb-sort-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .lb-podium {
    gap: 12px;
    padding: 0;
  }
  
  .lb-podium-avatar {
    width: 56px !important;
    height: 56px !important;
    font-size: 1.2rem !important;
  }
  
  .lb-podium-stand {
    width: 80px !important;
  }
  
  .lb-podium-item.first .lb-podium-stand { width: 100px !important; height: 80px; }
  .lb-podium-item.second .lb-podium-stand { height: 55px; }
  .lb-podium-item.third .lb-podium-stand { height: 40px; }
  
  .lb-podium-name {
    font-size: 0.95rem;
  }
  
  .lb-podium-item.first .lb-podium-name {
    font-size: 1.05rem;
  }
  
  .lb-podium-crown {
    font-size: 1.5rem;
    top: -30px;
  }
  
  .lb-podium-breakdown {
    font-size: 0.7rem;
  }
  
  .lb-my-rank-content {
    grid-template-columns: 1fr;
  }
  
  .lb-my-rank-info {
    gap: 24px;
  }
  
  .lb-my-rank-actions {
    flex-direction: column;
  }
  
  .lb-my-actions {
    flex-direction: column;
  }
  
  .lb-cta-card {
    flex-direction: column;
    text-align: center;
  }
  
  .lb-hall-of-fame {
    grid-template-columns: 1fr;
  }
  
  .lb-rank-item {
    flex-wrap: wrap;
  }
  
  .lb-rank-scores {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
  }
  
  .lb-score-bar {
    width: 100px;
  }
}

@media (max-width: 480px) {
  .lb-period-btn {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  .lb-sort-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
  
  .lb-rank-item {
    padding: 12px 16px;
  }
  
  .lb-rank-stats {
    min-width: 70px;
  }
  
  .lb-my-score-circle {
    padding: 20px;
  }
  
  .lb-score-number {
    font-size: 2.75rem;
  }
  
  .lb-breakdown-label {
    width: 50px;
    font-size: 0.75rem;
  }
  
  .lb-breakdown-value {
    width: 50px;
    font-size: 0.7rem;
  }
}
/* ============================================
   v3.0 등급 시스템 추가 스타일
   ============================================ */

/* 등급 뱃지 (전역) */
.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.grade-badge.rookie { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.grade-badge.reviewer { background: #eff6ff; color: #2563eb; border: 1px solid #93c5fd; }
.grade-badge.expert { background: #f5f3ff; color: #7c3aed; border: 1px solid #c4b5fd; }
.grade-badge.top { background: #fffbeb; color: #d97706; border: 1px solid #fcd34d; }
.grade-badge-sm { font-size: 0.65rem; padding: 1px 6px; }
.grade-badge-lg { font-size: 0.85rem; padding: 4px 12px; }

/* 히어로 등급 분포 */
.lb-grade-overview {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.lb-grade-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(4px);
}
.lb-grade-icon { font-size: 1.2rem; }
.lb-grade-label { font-size: 0.82rem; color: rgba(255,255,255,0.9); }
.lb-grade-count { font-size: 1rem; font-weight: 700; color: white; margin-left: 4px; }

/* 랭킹 리스트 - 나 하이라이트 */
.lb-rank-item.is-me {
  background: var(--primary-bg);
  border-left: 3px solid var(--primary);
  position: relative;
}
.lb-me-tag {
  display: inline-block;
  padding: 1px 6px;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
}

/* 랭킹 메트릭 (활동/기여/신뢰/인정 → 리뷰/제품/문의/도움됨) */
.lb-rank-metrics {
  display: flex;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--gray-500);
}
.lb-rank-metrics span {
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: help;
}

/* ============================================
   내 등급 카드 (전면 개편)
   ============================================ */
.lb-my-grade-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.lb-my-grade-display {
  display: flex;
  align-items: center;
  gap: 12px;
}
.my-grade-icon {
  font-size: 2.5rem;
  line-height: 1;
}
.my-grade-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.my-grade-label.rookie { color: #64748b; }
.my-grade-label.reviewer { color: #2563eb; }
.my-grade-label.expert { color: #7c3aed; }
.my-grade-label.top { color: #d97706; }

.lb-my-rank-info {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--gray-600);
  margin: 0;
}
.lb-divider { color: var(--gray-300); }

.lb-my-score-big {
  text-align: right;
}
.lb-my-score-big .lb-score-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.lb-my-score-big .lb-score-label {
  font-size: 0.85rem;
  color: var(--gray-500);
}

/* 등급 프로그레스 바 */
.lb-grade-progress-wrap {
  margin-bottom: 16px;
}
.lb-grade-progress-bar {
  height: 8px;
  background: rgba(99,102,241,0.15);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.lb-grade-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  border-radius: 4px;
  transition: width 0.8s ease;
}
.lb-grade-progress-text {
  font-size: 0.8rem;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 6px;
}
.lb-grade-progress-text strong {
  color: var(--primary);
}

/* 넛지 */
.lb-nudge {
  margin-bottom: 16px;
}
.nudge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  color: var(--gray-700);
}
.nudge-item.crown {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #f59e0b;
}
.nudge-icon { font-size: 1.2rem; flex-shrink: 0; }
.nudge-item strong { color: var(--primary-dark); }

/* 비즈니스 메트릭 */
.lb-my-metrics {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  background: white;
  border-radius: var(--radius-lg);
}
.lb-metric-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lb-metric-label {
  width: 90px;
  font-size: 0.8rem;
  color: var(--gray-600);
  flex-shrink: 0;
}
.lb-metric-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
}
.lb-metric-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}
.lb-metric-bar.reviews { background: var(--score-activity); }
.lb-metric-bar.products { background: var(--score-contribution); }
.lb-metric-bar.inquiries { background: var(--score-trust); }
.lb-metric-bar.helpful { background: var(--score-recognition); }
.lb-metric-value {
  width: 28px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

/* 혜택 */
.lb-my-benefits {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-lg);
}
.lb-my-benefits h5 {
  font-size: 0.82rem;
  margin-bottom: 8px;
  color: var(--gray-700);
}
.lb-my-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lb-my-benefits li {
  font-size: 0.78rem;
  color: #047857;
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lb-my-benefits li i { font-size: 0.65rem; color: #10b981; }

/* 팁 */
.lb-tips {
  margin-bottom: 16px;
}
.lb-tips h5 {
  font-size: 0.82rem;
  margin-bottom: 8px;
  color: var(--gray-700);
}
.lb-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lb-tips li {
  font-size: 0.8rem;
  color: var(--gray-600);
  padding: 6px 10px;
  background: var(--gray-50);
  border-radius: var(--radius);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tip-icon { font-size: 1rem; flex-shrink: 0; }

/* 액션 */
.lb-my-actions {
  display: flex;
  gap: 8px;
}
.lb-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.lb-action-btn.primary {
  background: var(--primary);
  color: white;
}
.lb-action-btn.primary:hover { background: var(--primary-dark); }
.lb-action-btn.secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}
.lb-action-btn.secondary:hover { background: var(--gray-50); }

/* ============================================
   등급 안내 가이드
   ============================================ */
.lb-grade-guide {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 20px;
}
.lb-grade-guide h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.lb-guide-grades {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lb-guide-grade-item {
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
}
.lb-guide-grade-item p {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin: 6px 0 4px;
}
.lb-guide-benefit {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 500;
}

/* 명예의 전당 카드 */
.lb-hall-of-fame-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 20px;
}
.lb-hall-of-fame-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* 로그인 프롬프트 */
.lb-login-prompt {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: center;
}
.lb-login-prompt h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.lb-login-prompt p {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-bottom: 16px;
}
.lb-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}
.lb-login-btn:hover { background: var(--primary-dark); }

/* ============================================
   모바일 추가 반응형
   ============================================ */
@media (max-width: 768px) {
  .lb-grade-overview {
    gap: 8px;
  }
  .lb-grade-item {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  .lb-grade-icon { font-size: 1rem; }
  .lb-grade-label { font-size: 0.72rem; }
  
  .lb-my-grade-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .lb-my-score-big .lb-score-number { font-size: 2rem; }
  .my-grade-icon { font-size: 2rem; }
  
  .lb-my-actions {
    flex-direction: column;
  }
  
  .lb-rank-metrics {
    font-size: 0.68rem;
    gap: 6px;
  }
}

/* ============================================
   레벨업 로드맵
   ============================================ */
.lb-roadmap {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 20px;
}
.lb-roadmap h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.roadmap-list {
  position: relative;
}

.roadmap-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding-bottom: 16px;
  opacity: 0.55;
  transition: all 0.3s ease;
}
.roadmap-item:last-child { padding-bottom: 0; }

/* 연결 선 */
.roadmap-connector {
  position: absolute;
  left: 18px;
  top: 38px;
  width: 2px;
  height: calc(100% - 30px);
  background: var(--gray-200);
}
.roadmap-connector.last { display: none; }

/* 등급 아이콘 */
.roadmap-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: var(--gray-100);
  border: 2px solid var(--gray-200);
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.roadmap-body {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}
.roadmap-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.roadmap-count {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 1px 6px;
  border-radius: 8px;
}
.roadmap-req {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin: 3px 0;
}
.roadmap-benefits {
  font-size: 0.72rem;
  color: var(--gray-400);
}

/* "← 여기!" 태그 */
.roadmap-here {
  display: inline-block;
  padding: 1px 8px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  animation: roadmap-pulse 2s ease-in-out infinite;
}
@keyframes roadmap-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* === 상태별 스타일 === */

/* 현재 등급 - 강한 하이라이트 */
.roadmap-item.is-current {
  opacity: 1;
  background: linear-gradient(135deg, var(--primary-bg), #dbeafe);
  margin: 0 -12px;
  padding: 12px 12px 12px 12px;
  border-radius: var(--radius-lg);
}
.roadmap-item.is-current .roadmap-badge {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  transform: scale(1.1);
}
.roadmap-item.is-current .roadmap-title {
  color: var(--primary-dark);
}
.roadmap-item.is-current .roadmap-benefits {
  color: var(--primary);
  font-weight: 500;
}
.roadmap-item.is-current .roadmap-count {
  background: var(--primary);
  color: white;
}
.roadmap-item.is-current .roadmap-connector {
  background: var(--primary-light);
}

/* 달성 등급 */
.roadmap-item.is-achieved {
  opacity: 0.75;
}
.roadmap-item.is-achieved .roadmap-badge {
  border-color: var(--success);
  background: #ecfdf5;
}
.roadmap-item.is-achieved .roadmap-connector {
  background: var(--success);
}
.roadmap-item.is-achieved .roadmap-title::after {
  content: '✓';
  font-size: 0.7rem;
  color: var(--success);
  margin-left: 4px;
}

/* 다음 등급 - 점선 + 살짝 밝게 */
.roadmap-item.is-next {
  opacity: 0.85;
}
.roadmap-item.is-next .roadmap-badge {
  border-style: dashed;
  border-color: var(--primary-light);
}
.roadmap-item.is-next .roadmap-connector {
  background: repeating-linear-gradient(
    to bottom,
    var(--primary-light) 0px,
    var(--primary-light) 4px,
    transparent 4px,
    transparent 8px
  );
}
.roadmap-item.is-next .roadmap-title {
  color: var(--gray-600);
}

/* 잠긴 등급 */
.roadmap-item.is-locked {
  opacity: 0.4;
}
.roadmap-item.is-locked .roadmap-badge {
  filter: grayscale(0.5);
}

/* 등급별 현재 하이라이트 색상 */
.roadmap-item.reviewer.is-current {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}
.roadmap-item.reviewer.is-current .roadmap-badge {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.roadmap-item.expert.is-current {
  background: linear-gradient(135deg, #f5f3ff, #ede9fe);
}
.roadmap-item.expert.is-current .roadmap-badge {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.roadmap-item.top.is-current {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.roadmap-item.top.is-current .roadmap-badge {
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

/* 모바일 */
@media (max-width: 768px) {
  .roadmap-item.is-current {
    margin: 0 -8px;
    padding: 10px 8px;
  }
  .roadmap-badge {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  .roadmap-connector {
    left: 15px;
  }
}

/* ============================================
   v4.0 — 6단계 개선사항
   ============================================ */

/* ── Step 1: 순위 변동 표시 ── */
.lb-rank-change {
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.lb-rank-change.up {
  background: #dcfce7;
  color: #16a34a;
}
.lb-rank-change.down {
  background: #fee2e2;
  color: #dc2626;
}
.lb-rank-change.same {
  background: var(--gray-100);
  color: var(--gray-400);
  font-size: 0.65rem;
}
/* Step 6: 급상승 태그 */
.lb-rank-change.surge {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #b45309;
  font-weight: 700;
  animation: surge-pulse 1.5s ease-in-out infinite;
}
@keyframes surge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(251, 191, 36, 0); }
}

/* ── Step 2: 카테고리 필터 ── */
.lb-category-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.lb-cat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  margin-right: 4px;
}
.lb-cat-btn {
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.lb-cat-btn:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
}
.lb-cat-btn.active {
  background: white;
  color: var(--primary-dark);
  border-color: white;
  font-weight: 600;
}

/* 카테고리 뱃지 (섹션 헤더) */
.lb-section-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lb-category-badge {
  padding: 3px 10px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Step 3: 1위 챔피언 하이라이트 ── */
.lb-rank-item.is-champion {
  background: linear-gradient(135deg, #fffbeb, #fef3c7, #fde68a08);
  border-left: 3px solid var(--gold);
  position: relative;
}
.lb-rank-item.is-champion::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(251,191,36,0.08), transparent 60%);
  pointer-events: none;
}
.lb-rank-item.is-champion .lb-rank-total {
  color: #b45309;
  font-size: 1.35rem;
}
.lb-rank-item.is-champion .lb-rank-avatar {
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.4);
}
.lb-champion-crown {
  font-size: 0.85rem;
  margin-right: -4px;
}

/* 2-3위 포디움 아이템 */
.lb-rank-item.is-podium {
  background: linear-gradient(135deg, var(--gray-50), white);
  border-left: 2px solid var(--gray-300);
}
.lb-rank-item.is-podium .lb-rank-total {
  font-size: 1.2rem;
}

/* ── Step 4: 최근 활동 피드 ── */
.lb-activity-feed {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-100);
}
.lb-activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.lb-activity-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-700);
}
.lb-activity-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lb-activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.lb-activity-item:hover {
  background: var(--gray-50);
}
.lb-activity-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg);
  border-radius: 50%;
}
.lb-activity-content {
  flex: 1;
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.4;
  min-width: 0;
}
.lb-activity-content strong {
  color: var(--gray-800);
  font-weight: 600;
}
.lb-activity-content em {
  font-style: normal;
  color: var(--primary);
  font-weight: 500;
}
.lb-activity-time {
  font-size: 0.72rem;
  color: var(--gray-400);
  white-space: nowrap;
  flex-shrink: 0;
}
.lb-activity-empty {
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
  color: var(--gray-400);
}

/* ── Step 5: 명예의 전당 배너 ── */
.lb-hof-banner {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-bottom: 1px solid #fde68a;
  padding: 12px 24px;
}
.lb-hof-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.lb-hof-banner-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #92400e;
  white-space: nowrap;
}
.lb-hof-trophy {
  font-size: 1.1rem;
}
.lb-hof-banner-list {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  flex: 1;
}
.lb-hof-banner-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: white;
  border-radius: 100px;
  border: 1px solid #fde68a;
  white-space: nowrap;
  transition: all 0.2s;
}
.lb-hof-banner-item:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
  transform: translateY(-1px);
}
.lb-hof-banner-medal {
  font-size: 0.9rem;
}
.lb-hof-banner-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-800);
}
.lb-hof-banner-period {
  font-size: 0.7rem;
  color: var(--gray-400);
}
.lb-hof-banner-score {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--bronze);
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 8px;
}

/* ── Step 6: 기간 전환 애니메이션 ── */
.lb-ranking-list.lb-period-switching {
  opacity: 0.4;
  transform: scale(0.99);
  transition: all 0.15s ease;
}
.lb-ranking-list {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── 반응형 (v4.0 추가) ── */
@media (max-width: 768px) {
  .lb-category-filters {
    gap: 4px;
  }
  .lb-cat-btn {
    padding: 4px 10px;
    font-size: 0.72rem;
  }
  .lb-hof-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .lb-hof-banner-list {
    gap: 8px;
    width: 100%;
  }
  .lb-activity-item {
    padding: 8px 8px;
  }
  .lb-activity-content {
    font-size: 0.78rem;
  }
  .lb-champion-crown {
    display: none;
  }
  .lb-rank-change {
    font-size: 0.65rem;
    padding: 1px 5px;
  }
}

@media (max-width: 480px) {
  .lb-cat-btn {
    padding: 3px 8px;
    font-size: 0.68rem;
  }
  .lb-hof-banner-item {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
}