/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    sans-serif;
  line-height: 1.6;
  color: #24292f;
  background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header styles */
header {
  text-align: center;
  margin-bottom: 3rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #0969da, #6f42c1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1.1rem;
  color: #656d76;
  margin-bottom: 2rem;
}

/* Stats cards */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e1e4e8;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #0969da;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #656d76;
  font-weight: 500;
}

/* Section styles */
section {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #e1e4e8;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #24292f;
}

/* Chart styles */
.chart-container {
  position: relative;
  height: 400px;
  margin-top: 1rem;
}

.chart-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.chart-controls label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #656d76;
  cursor: pointer;
}

.chart-controls input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #0969da;
}

/* Filter controls */
.filter-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  background: #f6f8fa;
  padding: 0.5rem;
  border-radius: 8px;
}

.filter-controls label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #656d76;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.filter-controls label:hover {
  background: white;
}

.filter-controls input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: #0969da;
}

/* Search bar */
.search-bar {
  margin: 1rem 0 1.5rem 0;
}

#search {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e1e4e8;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#search:focus {
  outline: none;
  border-color: #0969da;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.1);
}

/* Issues grid */
.issues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  max-height: 600px;
  overflow-y: auto;
  padding: 0.5rem;
}

.issue-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  background: #f6f8fa;
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.issue-item:hover {
  background: white;
  border-color: #0969da;
  box-shadow: 0 2px 8px rgba(9, 105, 218, 0.1);
  transform: translateY(-1px);
}

.issue-checkbox {
  margin-top: 0.25rem;
  width: 16px;
  height: 16px;
  accent-color: #0969da;
  cursor: pointer;
}

.issue-content {
  flex: 1;
}

.issue-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.issue-number {
  font-weight: 600;
  color: #656d76;
  font-size: 0.875rem;
}

.issue-state {
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.issue-state.open {
  background: #dcfdf0;
  color: #0d7830;
}

.issue-state.closed {
  background: #dbeafe;
  color: #1e40af;
}

.issue-title {
  font-weight: 500;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.issue-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.issue-label {
  padding: 0.125rem 0.5rem;
  background: #e1e4e8;
  color: #24292f;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  color: #656d76;
  border-top: 1px solid #e1e4e8;
  margin-top: 2rem;
}

.last-updated {
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

/* Loading states */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  color: #656d76;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 2rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chart-controls,
  .filter-controls {
    flex-wrap: wrap;
  }

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

  .chart-container {
    height: 300px;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar for issues grid */
.issues-grid::-webkit-scrollbar {
  width: 8px;
}

.issues-grid::-webkit-scrollbar-track {
  background: #f6f8fa;
  border-radius: 4px;
}

.issues-grid::-webkit-scrollbar-thumb {
  background: #d1d9e0;
  border-radius: 4px;
}

.issues-grid::-webkit-scrollbar-thumb:hover {
  background: #b4bcc4;
}
