/* ============================================
   Suno Explorer - Public Insights Styles
   ============================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-elevated: #1a1a25;
  --bg-active: #252535;
  --text-primary: #f0f0f5;
  --text-secondary: #8888aa;
  --text-muted: #555566;
  --accent: #7c5cff;
  --accent-dim: rgba(124, 92, 255, 0.15);
  --accent-bright: #9d85ff;
  --border: #2a2a3a;
  --error: #ff5c5c;
  --success: #5cff7c;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --header-height: 60px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 9999;
  transition: opacity 0.3s, visibility 0.3s;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: 24px;
}

.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--accent);
}

/* Main Content */
.insights-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 40px) 20px 60px;
}

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 60px;
}

.hero-section h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 32px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 40px;
  min-width: 140px;
}

.hero-value {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
}

.hero-label {
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-desc {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.stat-card h3 {
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.top-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-rank {
  width: 24px;
  height: 24px;
  background: var(--bg-elevated);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.top-item:first-child .top-rank {
  background: var(--accent);
  color: white;
}

.top-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

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

.top-title {
  font-size: 14px;
  font-weight: 500;
}

.top-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Model Grid */
.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.model-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.model-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.model-count {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.model-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.model-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

/* Word Cloud */
.dna-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.word-item {
  padding: 8px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.word-item:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.word-item.size-1 { font-size: 12px; opacity: 0.7; }
.word-item.size-2 { font-size: 14px; }
.word-item.size-3 { font-size: 16px; font-weight: 500; }
.word-item.size-4 { font-size: 20px; font-weight: 600; color: var(--text-primary); }
.word-item.size-5 { font-size: 24px; font-weight: 700; color: var(--accent); }

/* Timeline */
.timeline-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.timeline-stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 24px;
}

.timeline-stat-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
}

.timeline-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.heatmap-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  overflow-x: auto;
}

.heatmap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.heatmap-months {
  display: flex;
  margin-bottom: 8px;
  padding-left: 30px;
}

.heatmap-month {
  font-size: 10px;
  color: var(--text-secondary);
  text-align: center;
}

.heatmap-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.heatmap-day-label {
  width: 26px;
  font-size: 9px;
  color: var(--text-muted);
  text-align: right;
  padding-right: 4px;
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--bg-elevated);
}

.heatmap-cell.level-1 { background: rgba(124, 92, 255, 0.2); }
.heatmap-cell.level-2 { background: rgba(124, 92, 255, 0.4); }
.heatmap-cell.level-3 { background: rgba(124, 92, 255, 0.6); }
.heatmap-cell.level-4 { background: rgba(124, 92, 255, 0.8); }
.heatmap-cell.level-5 { background: var(--accent); }

/* Facts Grid */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.fact-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.fact-emoji {
  font-size: 32px;
  margin-bottom: 8px;
}

.fact-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.fact-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer p {
  margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 28px;
  }
  
  .hero-stats {
    gap: 16px;
  }
  
  .hero-stat {
    padding: 16px 24px;
    min-width: 100px;
  }
  
  .hero-value {
    font-size: 28px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}


