/* 站长日志页 - 整体布局 */
.changelog-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 0;
}

.changelog-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

/* 左侧侧边栏 */
.changelog-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

/* 月历 - 复用 news 页面日历风格 */
.cl-calendar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

body.light-mode .cl-calendar {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

.cl-calendar .calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cl-calendar .calendar-month-label {
    font-size: 0.95rem;
    font-weight: 600;
}

.cl-calendar .calendar-nav-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.cl-calendar .calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.light-mode .cl-calendar .calendar-nav-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.cl-calendar .calendar-nav-btn i {
    width: 16px;
    height: 16px;
}

.cl-calendar .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.cl-calendar .calendar-weekday {
    font-size: 0.7rem;
    color: var(--text-secondary, #888);
    padding: 4px 0;
}

.cl-calendar .calendar-day {
    font-size: 0.8rem;
    padding: 6px 0;
    border-radius: 4px;
    color: var(--text-secondary, #666);
}

.cl-calendar .calendar-day.has-event {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.15);
    transition: background 0.2s;
}

.cl-calendar .calendar-day.has-event:hover {
    background: rgba(59, 130, 246, 0.3);
}

.cl-calendar .calendar-day.today {
    border: 1px solid var(--code-green, #6a9955);
}

.cl-calendar .calendar-hint {
    text-align: center;
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-secondary, #888);
}

/* 类型筛选 */
.cl-filter {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
}

body.light-mode .cl-filter {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

.cl-filter h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #888);
    margin-bottom: 12px;
    padding: 0 4px;
}

.cl-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.cl-filter-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.light-mode .cl-filter-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.cl-filter-item input[type="checkbox"] {
    accent-color: var(--code-green, #6a9955);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.cl-filter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cl-filter-label {
    color: inherit;
}

/* 右侧时间轴区域 */
.cl-timeline-area {
    flex: 1;
    min-width: 0;
    padding: 0 20px;
}

/* 时间轴 */
.cl-timeline {
    position: relative;
    padding-left: 0;
}

/* 左侧竖线 */
.cl-timeline::before {
    content: '';
    position: absolute;
    left: 155px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        180deg,
        rgba(106, 153, 85, 0.4),
        rgba(86, 156, 214, 0.4),
        rgba(197, 134, 192, 0.4),
        rgba(206, 145, 120, 0.4),
        rgba(220, 220, 170, 0.4)
    );
}

body.light-mode .cl-timeline::before {
    background: linear-gradient(
        180deg,
        rgba(106, 153, 85, 0.3),
        rgba(86, 156, 214, 0.3),
        rgba(197, 134, 192, 0.3),
        rgba(206, 145, 120, 0.3),
        rgba(220, 220, 170, 0.3)
    );
}

/* 每条时间轴条目 */
.cl-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    position: relative;
    opacity: 0;
    transform: translateY(12px);
    animation: clItemIn 0.4s ease forwards;
}

@keyframes clItemIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 日期时间 */
.cl-item-time {
    width: 128px;
    flex-shrink: 0;
    text-align: right;
    padding-top: 12px;
}

.cl-item-date {
    font-size: 0.85rem;
    color: var(--text-secondary, #888);
    font-weight: 500;
}

.cl-item-clock {
    font-size: 0.75rem;
    color: var(--text-secondary, #666);
    margin-top: 2px;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* 节点圆点 */
.cl-item-dot {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    z-index: 2;
    padding-top: 14px;
}

.cl-dot-inner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--event-color, #6a9955);
    border: 3px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 10px color-mix(in srgb, var(--event-color, #6a9955) 40%, transparent);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cl-item:hover .cl-dot-inner {
    transform: scale(1.4);
    box-shadow: 0 0 16px color-mix(in srgb, var(--event-color, #6a9955) 60%, transparent);
}

body.light-mode .cl-dot-inner {
    border-color: rgba(255, 255, 255, 0.5);
}

/* 内容卡片 */
.cl-item-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px 18px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border-left: 3px solid var(--event-color, #6a9955);
}

/* 有缩略图时的水平布局 */
.cl-item-card.has-thumb {
    flex-direction: row;
    gap: 14px;
    padding: 12px;
}

.cl-item-thumb {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.cl-item-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.cl-item-card:hover {
    border-color: color-mix(in srgb, var(--event-color, #6a9955) 50%, transparent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
                0 0 0 1px color-mix(in srgb, var(--event-color, #6a9955) 30%, transparent);
}

body.light-mode .cl-item-card {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.08);
    border-left-color: var(--event-color, #6a9955);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.light-mode .cl-item-card:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: color-mix(in srgb, var(--event-color, #6a9955) 40%, transparent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08),
                0 0 0 1px color-mix(in srgb, var(--event-color, #6a9955) 20%, transparent);
}

/* 事件标签 */
.cl-item-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 3px 10px;
    border-radius: 4px;
    width: fit-content;
    background: color-mix(in srgb, var(--event-color, #6a9955) 15%, transparent);
    color: var(--event-color, #6a9955);
}

body.light-mode .cl-item-badge {
    background: color-mix(in srgb, var(--event-color, #6a9955) 12%, transparent);
}

.cl-item-badge i {
    vertical-align: middle;
}

/* 标题（可点击链接） */
.cl-item-title,
.cl-item-title:link,
.cl-item-title:visited {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
    width: fit-content;
}

.cl-item-title:hover {
    color: var(--event-color, #6a9955);
    text-decoration: underline;
}

.cl-item-title:active {
    color: var(--event-color, #6a9955);
}

/* 明亮模式下标题继承明亮正文色（由卡片 color:inherit 自动继承 body.light-mode 的 #2c3e50） */

/* 关联软件链接 */
.cl-item-software,
.cl-item-software:link,
.cl-item-software:visited {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: #888;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s;
    width: fit-content;
}

.cl-item-software:hover {
    color: var(--event-color, #6a9955);
    border-color: color-mix(in srgb, var(--event-color, #6a9955) 40%, transparent);
    background: color-mix(in srgb, var(--event-color, #6a9955) 10%, transparent);
    text-decoration: none;
}

.cl-item-software i {
    flex-shrink: 0;
}

body.light-mode .cl-item-software,
body.light-mode .cl-item-software:visited {
    color: #666;
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

/* 空状态 */
.cl-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #888);
}

.cl-empty i {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.cl-empty p {
    font-size: 1rem;
}

/* 响应式 */
@media (max-width: 768px) {
    .changelog-page {
        padding: 24px 16px;
    }

    .changelog-layout {
        flex-direction: column;
    }

    .changelog-sidebar {
        width: 100%;
        position: static;
    }

    .cl-timeline-area {
        padding: 0;
    }

    .cl-item {
        gap: 10px;
    }

    .cl-item-time {
        width: 70px;
    }

    .cl-item-date {
        font-size: 0.75rem;
    }

    .cl-item-clock {
        font-size: 0.65rem;
    }

    .cl-timeline::before {
        left: 88px;
    }

    .cl-item-card {
        padding: 10px 14px;
    }

    .cl-item-title {
        font-size: 0.9rem;
    }

    .cl-item-thumb {
        width: 80px;
        height: 54px;
    }
}

/* 软件筛选后的「查看全部动态」链接 */
.cl-filter-clear {
    display: inline-block;
    margin-top: 12px;
    font-size: 12.5px;
    color: #8b949e;
    text-decoration: none;
    transition: color 0.25s;
}

.cl-filter-clear:hover {
    color: #569cd6;
}

body.light-mode .cl-filter-clear {
    color: #64748b;
}

body.light-mode .cl-filter-clear:hover {
    color: #667eea;
}
