/* changelog.css — doomer devlog page styling */

.changelog-page {
  background: linear-gradient(135deg, #0d1117, #16152a);
  min-height: 100vh;
  color: #c9d1d9;
}

/* Sticky filters */
.changelog-filters {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 32px;
  position: sticky;
  top: 24px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.changelog-filters .filters__row {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* Stats section */
.changelog-stats {
  margin-bottom: 32px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.changelog-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.changelog-stat-card {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.changelog-stat-card:hover {
  background: #1c2333;
  border-color: #bd93f9;
}

.changelog-stat-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #f48fb1;
  margin-bottom: 4px;
}

.changelog-stat-label {
  font-size: 14px;
  color: #c9d1d9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .changelog-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .changelog-actions {
    width: 100%;
    justify-content: center;
  }

  .changelog-btn {
    flex: 1;
    justify-content: center;
  }

  .filters__row {
    flex-direction: column;
  }

  .changelog-filters {
    position: static;
    box-shadow: none;
  }

  .changelog-stats-grid {
    grid-template-columns: 1fr;
  }

  .log-entry__content {
    grid-template-columns: 1fr;
  }

  .log-entry__summary::after {
    position: static;
    display: inline-block;
    transform: none;
    margin-left: 8px;
  }

  .changelog-jump .jump-link {
    flex: 1;
    justify-content: center;
  }
}

.changelog-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.changelog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid #30363d;
}

.changelog-header h2 {
  font-size: 32px;
  font-weight: 700;
  color: #f48fb1;
  margin: 0;
}

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

.changelog-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.changelog-btn.rss {
  background: #f26522;
  color: white;
}

.changelog-btn.rss:hover {
  background: #d95a1c;
  transform: translateY(-2px);
}

.changelog-btn.dice {
  background: linear-gradient(135deg, #9c27b0, #e91e63);
  color: white;
}

.changelog-btn.dice:hover {
  transform: translateY(-2px) rotate(3deg);
}

/* Sticky filters */
.changelog-filters {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 32px;
  position: sticky;
  top: 24px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.changelog-jump {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #30363d;
}

.changelog-jump .jump-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  color: #c9d1d9;
  background: #0d1117;
  border: 1px solid #30363d;
  transition: all 0.2s;
}

.changelog-jump .jump-link:hover {
  background: #bd93f9;
  color: #16152a;
  border-color: #bd93f9;
}

.filters__row {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}

.filters__select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #c9d1d9;
  font-size: 14px;
}

.filters__search {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #c9d1d9;
  font-size: 14px;
  box-sizing: border-box;
}

.news-count {
  margin-top: 12px;
  font-size: 14px;
  color: #8b949e;
  font-style: italic;
}

.log-entry {
  margin-bottom: 16px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
}

.log-entry:hover {
  background: #1c2333;
}

.log-entry[open] {
  border-color: #bd93f9;
  box-shadow: 0 0 20px rgba(189, 147, 249, 0.2);
}

.log-entry--viewed {
  opacity: 0.7;
  border-left: 3px solid #bd93f9;
}

.log-entry__summary {
  padding: 16px;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.log-entry__summary::-webkit-details-marker {
  display: none;
}

.log-entry__summary::after {
  content: '▼';
  position: absolute;
  right: 16px;
  title: 'click to expand/collapse';
}

.log-entry[open] .log-entry__summary::after {
  transform: rotate(180deg);
}

.log-entry__content {
  padding: 0 16px 16px;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
}

.log-entry__details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.log-entry__title {
  font-weight: 600;
  color: #f48fb1;
  margin: 0 0 8px 0;
}

.log-entry__title--added { color: #39d353; }
.log-entry__title--fixed { color: #d29922; }
.log-entry__title--removed { color: #f85149; }
.log-entry__title--cleaned { color: #58a6ff; }
.log-entry__title--default { color: #f48fb1; }

.log-entry__summary-text {
  color: #c9d1d9;
  line-height: 1.6;
  margin: 8px 0;
}

.log-entry__body {
  color: #c9d1d9;
  line-height: 1.6;
  white-space: pre-line;
}

.log-entry__notes {
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid #bd93f9;
  padding: 12px;
  font-family: monospace;
  font-size: 13px;
  color: #bd93f9;
  white-space: pre-line;
  margin-top: 12px;
}

.changelog-daily {
  margin-top: 32px;
  padding: 20px;
  background: linear-gradient(135deg, #1c2333, #16152a);
  border: 1px solid #bd93f9;
  border-radius: 12px;
}

.changelog-daily-card {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: 8px;
  border-left: 4px solid #f48fb1;
}

.changelog-daily-card h4 {
  color: #f48fb1;
  margin: 0 0 12px 0;
}

/* Anchor link styling */
.log-entry__anchor {
  position: absolute;
  left: -30px;
  opacity: 0;
  transition: opacity 0.2s;
}

.log-entry:hover .log-entry__anchor,
.log-entry__anchor:focus {
  opacity: 1;
}

.log-entry__anchor::before {
  content: '#';
  font-weight: bold;
  color: #bd93f9;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .changelog-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .changelog-actions {
    width: 100%;
    justify-content: center;
  }

  .changelog-btn {
    flex: 1;
    justify-content: center;
  }

  .filters__row {
    flex-direction: column;
  }

  .changelog-filters {
    position: static;
    box-shadow: none;
  }

  .log-entry__content {
    grid-template-columns: 1fr;
  }

  .log-entry__summary::after {
    position: static;
    display: inline-block;
    transform: none;
    margin-left: 8px;
  }

  .changelog-jump .jump-link {
    flex: 1;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .changelog-btn,
  .log-entry,
  .changelog-jump .jump-link {
    transition: none;
  }

  .changelog-btn:hover,
  .log-entry:hover,
  .changelog-jump .jump-link:hover {
    transform: none;
  }
}