/* Analytics Page Styles */
.analytics-page {
  max-width: 1400px;
}

.analytics-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.analytics-page .page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #ffd700;
  margin: 0 0 8px 0;
}

.analytics-page .page-description {
  color: #64748b;
  font-size: 1rem;
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.header-actions .btn-secondary {
  background: white;
  color: #667eea;
  border: 1px solid #667eea;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.header-actions .btn-secondary:hover {
  background: rgba(102, 126, 234, 0.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
  text-decoration: none;
}

/* Analytics Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.metric-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.metric-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

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

.metric-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
  line-height: 1;
}

.metric-change {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.metric-change::before {
  content: '↗';
  font-size: 1rem;
}

.metric-change.negative {
  color: #ef4444;
}

.metric-change.negative::before {
  content: '↘';
}

/* Analytics Section */
.analytics-section {
  margin-top: 48px;
}

.analytics-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 24px 0;
}

/* Platform Insights (for social page) */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.platform-insights-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.platform-insights-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

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

.platform-icon-large {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.platform-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}

.platform-metrics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}

.metric-row:last-child {
  border-bottom: none;
}

.metric-row .metric-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}

.metric-row .metric-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .analytics-page .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .analytics-page .page-header h1 {
    font-size: 1.75rem;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
  }

  .header-actions .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .analytics-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .metric-card {
    padding: 20px;
  }

  .metric-value {
    font-size: 1.75rem;
  }

  .analytics-section h2 {
    font-size: 1.25rem;
  }

  .platforms-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .platforms-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

