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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  color: #2c3e50;
  line-height: 1.6;
  min-height: 100vh;
}

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

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  background: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav {
  display: flex;
  gap: 15px;
}

nav a {
  padding: 8px 16px;
  background: #f0f2f5;
  border-radius: 6px;
  text-decoration: none;
  color: #667eea;
  font-weight: 500;
  transition: all 0.3s;
  border: 2px solid transparent;
}

nav a:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Cards */
.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.card h2 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #2c3e50;
}

.card h3 {
  font-size: 18px;
  margin-top: 15px;
  margin-bottom: 10px;
  color: #667eea;
}

.card h4 {
  font-size: 16px;
  margin-top: 10px;
  margin-bottom: 8px;
  color: #2c3e50;
}

/* Stat grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.stat-box strong {
  display: block;
  font-size: 24px;
  margin-bottom: 5px;
}

.stat-box span {
  font-size: 14px;
  opacity: 0.9;
}

/* Trend cards grid */
.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.trend-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid #667eea;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}

.trend-card:hover {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
  border-left-color: #764ba2;
}

.trend-card h3 {
  color: #2c3e50;
  margin-bottom: 10px;
  font-size: 16px;
}

.trend-card p {
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
}

.trend-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-score {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-priority-high {
  background: #ffebee;
  color: #c62828;
}

.badge-priority-medium {
  background: #fff3e0;
  color: #e65100;
}

.badge-priority-low {
  background: #e3f2fd;
  color: #0277bd;
}

.badge-tag {
  background: #f3e5f5;
  color: #6a1b9a;
}

.badge-recurrence {
  background: #e0f2f1;
  color: #00695c;
}

.trend-link {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 12px;
  background: #667eea;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.3s;
}

.trend-link:hover {
  background: #764ba2;
  text-decoration: none;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

th {
  background: #f5f7fa;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #e0e0e0;
}

td {
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
}

tr:hover {
  background: #f9f9f9;
}

/* Charts */
canvas {
  margin: 20px 0;
}

/* Footer */
footer {
  margin-top: 40px;
  padding: 20px;
  text-align: center;
  font-size: 14px;
  color: #888;
  border-top: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  nav {
    justify-content: center;
  }

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

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

  table {
    font-size: 13px;
  }

  th, td {
    padding: 8px;
  }
}

/* Pagination */
.pagination {
  margin-top: 20px;
  text-align: center;
}

.pagination a {
  padding: 10px 15px;
  background: #667eea;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s;
}

.pagination a:hover {
  background: #764ba2;
}

