/* ==================== CHARTS & TRENDING PAGE ==================== */
/* Golden theme - celebrating the best of DIGR */

/* ==================== Zone Override ==================== */
.zone-charts {
  --zone-primary: #f59e0b;
  --zone-secondary: #d97706;
  --zone-glow: rgba(245, 158, 11, 0.2);
  --zone-bg: #0a0806;
  --zone-surface: #14100c;
  --zone-accent: #fcd34d;
}

/* ==================== Page Layout ==================== */
.charts-page {
  min-height: 100vh;
  background: var(--zone-bg, var(--void));
  padding: 80px 20px 120px;
  overflow-y: auto;
  overflow-x: hidden;
}

.charts-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ==================== Page Header ==================== */
.charts-header {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

.charts-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  background: linear-gradient(135deg, var(--zone-primary), var(--zone-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px var(--zone-glow);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.charts-subtitle {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-dim);
  opacity: 0.8;
}

.charts-updated {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ==================== Time Period Filter ==================== */
.period-filter {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.period-btn {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  padding: 8px 16px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.5px;
}

.period-btn:hover {
  border-color: var(--zone-primary);
  color: var(--zone-primary);
  background: rgba(245, 158, 11, 0.1);
}

.period-btn.active {
  background: linear-gradient(135deg, var(--zone-primary), var(--zone-secondary));
  color: var(--zone-bg);
  border-color: var(--zone-primary);
  box-shadow: 0 0 20px var(--zone-glow), 0 0 40px rgba(245, 158, 11, 0.15);
}

@media (max-width: 480px) {
  .period-filter {
    gap: 6px;
  }
  
  .period-btn {
    padding: 6px 12px;
    font-size: 0.6rem;
  }
}

/* ==================== Section Layout ==================== */
.charts-section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.section-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px var(--zone-glow));
}

.section-title {
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  color: var(--zone-primary);
  letter-spacing: 1px;
}

.section-badge {
  font-size: 0.6rem;
  font-family: var(--font-pixel);
  background: rgba(255,255,255,0.1);
  color: var(--text-dim);
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: auto;
}

/* ==================== Hot This Week - Chart List ==================== */
.chart-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-item {
  display: grid;
  grid-template-columns: 40px 60px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--zone-surface, var(--surface));
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer;
}

.chart-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--zone-primary);
  transform: translateX(4px);
  box-shadow: 0 0 20px var(--zone-glow);
}

.chart-rank {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--zone-primary);
  text-align: center;
}

.chart-rank.top-3 {
  font-size: 1rem;
  text-shadow: 0 0 10px var(--zone-primary);
}

.chart-rank-1 { color: #ffd700; }
.chart-rank-2 { color: #c0c0c0; }
.chart-rank-3 { color: #cd7f32; }

.chart-artwork {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--border);
}

.chart-info {
  min-width: 0;
}

.chart-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.chart-artist {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chart-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chart-trend {
  font-size: 1rem;
  width: 24px;
  text-align: center;
}

.trend-up { color: #05ffa1; }
.trend-down { color: #ff4757; }
.trend-stable { color: var(--text-muted); }
.trend-new { color: var(--zone-accent); }

.chart-price {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
}

.chart-price.free {
  background: rgba(5, 255, 161, 0.15);
  color: #05ffa1;
}

/* ==================== Rising Creators - Card Grid ==================== */
.creator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.creator-card {
  background: var(--zone-surface, var(--surface));
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.creator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--zone-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.creator-card:hover {
  transform: translateY(-4px);
  border-color: var(--zone-primary);
  box-shadow: 0 8px 32px var(--zone-glow);
}

.creator-card:hover::before {
  opacity: 1;
}

.creator-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.creator-rank {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--zone-primary);
  min-width: 24px;
}

.creator-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--zone-primary), var(--zone-secondary));
  border: 2px solid var(--zone-primary);
}

.creator-avatar-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--zone-primary), var(--zone-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 2px solid var(--zone-primary);
}

.creator-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-badge {
  font-size: 0.6rem;
  font-family: var(--font-pixel);
  background: var(--zone-primary);
  color: var(--zone-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.creator-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.creator-stat {
  padding: 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
}

.creator-stat-value {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--zone-primary);
  margin-bottom: 4px;
}

.creator-stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.creator-growth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.75rem;
  color: #05ffa1;
}

/* ==================== New Drops - Pack Cards ==================== */
.drops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.drop-card {
  background: var(--zone-surface, var(--surface));
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.drop-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--zone-primary);
  box-shadow: 0 12px 40px var(--zone-glow);
}

.drop-artwork-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.drop-artwork {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.drop-card:hover .drop-artwork {
  transform: scale(1.05);
}

.drop-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.6rem;
  font-family: var(--font-pixel);
  background: rgba(0,0,0,0.8);
  color: var(--zone-accent);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--zone-primary);
}

.drop-badge.new {
  background: var(--zone-primary);
  color: var(--zone-bg);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--zone-glow); }
  50% { box-shadow: 0 0 20px 4px var(--zone-glow); }
}

.drop-price {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.7rem;
  font-family: var(--font-pixel);
  background: rgba(0,0,0,0.8);
  padding: 4px 8px;
  border-radius: 4px;
}

.drop-price.free {
  background: rgba(5, 255, 161, 0.9);
  color: #000;
}

.drop-info {
  padding: 12px;
}

.drop-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drop-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.drop-artist {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}

.drop-time {
  color: var(--zone-primary);
  flex-shrink: 0;
}

/* ==================== Top Creators - Leaderboard Style ==================== */
.top-creators-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-creator-card {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--zone-surface, var(--surface));
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.top-creator-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--zone-primary), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.top-creator-card:hover {
  transform: translateX(4px);
  border-color: var(--zone-primary);
  box-shadow: 0 4px 24px var(--zone-glow);
}

.top-creator-card:hover::before {
  opacity: 1;
}

.top-creator-rank {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--zone-primary);
  text-align: center;
  min-width: 50px;
}

.top-creator-rank.top-3 {
  font-size: 1.5rem;
}

.top-creator-rank.rank-1 { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.top-creator-rank.rank-2 { color: #c0c0c0; text-shadow: 0 0 10px rgba(192, 192, 192, 0.5); }
.top-creator-rank.rank-3 { color: #cd7f32; text-shadow: 0 0 10px rgba(205, 127, 50, 0.5); }

.top-creator-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.top-creator-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--zone-primary);
  background: linear-gradient(135deg, var(--zone-primary), var(--zone-secondary));
  flex-shrink: 0;
}

.top-creator-avatar-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--zone-primary), var(--zone-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--zone-bg);
  border: 2px solid var(--zone-primary);
  flex-shrink: 0;
}

.top-creator-info {
  min-width: 0;
}

.top-creator-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.top-creator-bio {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.top-creator-stats {
  display: flex;
  gap: 24px;
  text-align: center;
}

.top-creator-stat {
  min-width: 60px;
}

.top-creator-stat .stat-value {
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  color: var(--zone-accent);
  margin-bottom: 4px;
}

.top-creator-stat .stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.top-creator-skeleton {
  height: 88px;
  margin-bottom: 8px;
}

/* ==================== Loading & Empty States ==================== */
.loading-skeleton {
  background: linear-gradient(90deg, 
    var(--zone-surface) 25%, 
    rgba(255,255,255,0.05) 50%, 
    var(--zone-surface) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.chart-skeleton {
  height: 72px;
  margin-bottom: 8px;
}

.creator-skeleton {
  height: 180px;
}

.drop-skeleton {
  aspect-ratio: 1;
}

.empty-section {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-text {
  font-size: 0.9rem;
}

/* ==================== Mobile Responsive ==================== */
@media (max-width: 768px) {
  .charts-page {
    padding: 70px 12px 140px;
  }
  
  .chart-item {
    grid-template-columns: 32px 48px 1fr auto;
    gap: 10px;
    padding: 10px 12px;
  }
  
  .chart-stats {
    display: none;
  }
  
  .chart-artwork {
    width: 40px;
    height: 40px;
  }
  
  .creator-grid {
    grid-template-columns: 1fr;
  }
  
  .drops-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .section-header {
    flex-wrap: wrap;
  }
  
  .section-badge {
    margin-left: 0;
    margin-top: 8px;
    width: 100%;
    text-align: center;
  }
  
  /* Top Creators Mobile */
  .top-creator-card {
    grid-template-columns: 40px 1fr;
    gap: 12px;
    padding: 12px 16px;
  }
  
  .top-creator-stats {
    display: none;
  }
  
  .top-creator-avatar,
  .top-creator-avatar-placeholder {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
  
  .top-creator-rank {
    min-width: 40px;
    font-size: 0.9rem;
  }
  
  .top-creator-rank.top-3 {
    font-size: 1.2rem;
  }
  
  .top-creator-name {
    font-size: 0.95rem;
  }
}

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

/* ==================== Animations ==================== */
.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

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

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }
.stagger-9 { animation-delay: 0.45s; }
.stagger-10 { animation-delay: 0.5s; }
