/* ============================================
   AegisX - 开发日志页面样式
   ============================================ */

.devlogs-page {
  min-height: 100vh;
  background: #0a0e17;
  color: var(--text-primary);
}

/* 背景网格 */
.dl-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* 主容器 */
.dl-main {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-height, 64px) + 60px);
  padding-bottom: 80px;
}

/* Hero区 */
.dl-hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.dl-hero__label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary, #1f6feb);
  margin-bottom: 16px;
}

.dl-hero__title {
  font-size: 40px;
  font-weight: 800;
  margin: 0 0 16px;
  line-height: 1.2;
  color: var(--text-primary);
}

.dl-hero__title .highlight {
  background: linear-gradient(135deg, var(--primary, #1f6feb), var(--secondary, #8b5cf6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dl-hero__desc {
  font-size: 17px;
  color: var(--text-secondary, #94a3b8);
  margin: 0;
  line-height: 1.6;
}

/* 筛选栏 */
.dl-filter-bar {
  max-width: var(--container-narrow, 900px);
  margin: 0 auto 40px;
  padding: 0 24px;
}

.dl-filter-bar__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.dl-filter-bar__label {
  font-size: 14px;
  color: var(--text-muted, #64748b);
  margin-right: 4px;
}

.dl-chip {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.dl-chip:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.dl-chip--active {
  background: rgba(31,111,235,0.15);
  border-color: var(--primary, #1f6feb);
  color: var(--primary, #1f6feb);
}

/* 时间线 */
.dl-timeline {
  position: relative;
  max-width: var(--container-narrow, 900px);
  margin: 0 auto;
  padding: 0 24px;
}

.dl-timeline::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom,
    transparent,
    rgba(31,111,235,0.2) 5%,
    rgba(31,111,235,0.2) 95%,
    transparent
  );
}

/* 单条日志 */
.dl-item {
  position: relative;
  padding: 0 0 32px 88px;
}

.dl-item:last-child {
  padding-bottom: 0;
}

/* 时间线圆点 */
.dl-item__dot {
  position: absolute;
  left: 34px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary, #1f6feb);
  border: 3px solid #0a0e17;
  box-shadow: 0 0 0 3px rgba(31,111,235,0.25);
  z-index: 1;
}

.dl-item--pinned .dl-item__dot {
  background: var(--secondary, #8b5cf6);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.25);
}

/* 卡片 */
.dl-item__card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 24px 28px;
  transition: all .25s;
}

.dl-item__card:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(31,111,235,0.15);
  transform: translateX(4px);
}

.dl-item--pinned .dl-item__card {
  background: rgba(139,92,246,0.04);
  border-color: rgba(139,92,246,0.12);
}

/* 卡片头部：分类 + 版本 + 置顶 */
.dl-item__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.dl-item__cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  line-height: 1.4;
}

.dl-item__cat--feature {
  background: rgba(34,197,94,0.12);
  color: #22c55e;
}

.dl-item__cat--fix {
  background: rgba(245,158,11,0.12);
  color: #f59e0b;
}

.dl-item__cat--improve {
  background: rgba(59,130,246,0.12);
  color: #3b82f6;
}

.dl-item__cat--security {
  background: rgba(239,68,68,0.12);
  color: #ef4444;
}

.dl-item__cat--release {
  background: rgba(139,92,246,0.12);
  color: #8b5cf6;
}

.dl-item__cat--other {
  background: rgba(100,116,139,0.12);
  color: #94a3b8;
}

.dl-item__ver {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  padding: 3px 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
}

.dl-pin-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #8b5cf6;
  background: rgba(139,92,246,0.1);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
}

/* 标题 */
.dl-item__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text-primary);
  line-height: 1.4;
}

/* 元信息：日期 + 作者 */
.dl-item__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted, #64748b);
}

.dl-item__date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dl-item__date::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted, #64748b);
  opacity: 0.5;
}

.dl-item__author {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* 加载状态 */
.dl-loading {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted, #64748b);
}

.dl-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--primary, #1f6feb);
  border-radius: 50%;
  animation: dl-spin .8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes dl-spin {
  to { transform: rotate(360deg); }
}

/* 空状态 / 错误状态 */
.dl-empty,
.dl-error {
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted, #64748b);
  font-size: 15px;
}

.dl-error {
  color: #f87171;
}

/* 响应式 */
@media screen and (max-width: 768px) {
  .dl-hero__title {
    font-size: 30px;
  }

  .dl-timeline::before {
    left: 20px;
  }

  .dl-item {
    padding-left: 52px;
    padding-bottom: 24px;
  }

  .dl-item__dot {
    left: 14px;
  }

  .dl-item__card {
    padding: 18px 16px;
  }

  .dl-item__title {
    font-size: 16px;
  }

  .dl-filter-bar__inner {
    gap: 6px;
  }

  .dl-chip {
    padding: 5px 12px;
    font-size: 12px;
  }
}

@media screen and (max-width: 480px) {
  .dl-hero__title {
    font-size: 26px;
  }

  .dl-main {
    padding-top: calc(var(--header-height, 64px) + 40px);
  }

  .dl-hero {
    margin-bottom: 32px;
  }
}
