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

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2129;
  --bg-hover: #242b35;
  --border: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #58a6ff;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* Header */
header {
  margin-bottom: 2.5rem;
}

.header-content {
  margin-bottom: 1.5rem;
}

.logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-sub {
  color: var(--accent);
  font-weight: 600;
}

.subtitle {
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-size: 0.95rem;
}

/* Search */
.search-bar input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar input:focus {
  border-color: var(--accent);
}

/* Cards */
.changelog-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.changelog-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.version-badge {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.version-badge.large {
  font-size: 1rem;
  padding: 0.3rem 0.8rem;
}

.card-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card-summary {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stat {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  color: var(--accent);
  background: rgba(88, 166, 255, 0.1);
  text-transform: capitalize;
}

.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Detail page */
.changelog-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  margin-right: auto;
}

.back-link:hover {
  text-decoration: underline;
}

.detail-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.detail-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.changes-section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  text-transform: capitalize;
  color: var(--accent);
}

.changes-list {
  list-style: none;
  padding: 0;
}

.changes-list li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.25rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(48, 54, 61, 0.4);
}

.changes-list li:last-child {
  border-bottom: none;
}

.changes-list li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--text-muted);
  font-weight: bold;
}

.detail-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: var(--bg-secondary);
  color: var(--accent);
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

/* 404 */
.not-found {
  text-align: center;
  padding: 4rem 1rem;
}

.not-found h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.not-found p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Footer */
footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

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

  .logo {
    font-size: 1.5rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .back-link {
    margin-right: 0;
  }

  .changelog-detail {
    padding: 1.25rem;
  }
}
