/* 随想录页面样式 */
.thoughts-container {
    max-width: calc(var(--main-width) + var(--gap) * 2);
    margin: 0 auto;
    padding: var(--gap);
}

.thoughts-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.thoughts-header h1 {
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 40px;
}

.thoughts-description {
    color: var(--secondary);
    font-style: italic;
    margin: 0;
    font-size: 16px;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 35px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 90px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

.timeline-date {
    position: absolute;
    left: 0;
    top: 0;
    width: 70px;
}

.timeline-date-badge {
    background: var(--primary);
    color: var(--theme);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    border: 2px solid var(--primary);
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-date-badge::after {
    content: '';
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid var(--theme);
}

.timeline-content {
    background: var(--entry);
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-2px);
}

.thought-entry {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.thought-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.thought-time {
    color: var(--secondary);
    font-size: 14px;
    margin-bottom: 10px;
    font-family: monospace;
}

.thought-text {
    color: var(--primary);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 18px;
    max-width: none;
}

.thought-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--code-bg);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 13px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary);
    color: var(--theme);
}

.tag.active {
    background: var(--primary);
    color: var(--theme);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .timeline-item {
        padding-left: 60px;
    }
    
    .timeline-date {
        width: 45px;
    }
    
    .timeline-date-badge {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .timeline::before {
        left: 22px;
    }
    
    .timeline-date-badge::after {
        right: -8px;
        width: 6px;
        height: 6px;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .thought-text {
        font-size: 16px;
    }
    
    .thoughts-header h1 {
        font-size: 32px;
    }
    
    .thoughts-description {
        font-size: 14px;
    }
}

/* 暗色主题适配 */
[data-theme="dark"] .timeline-content {
    box-shadow: 0 2px 8px rgba(255,255,255,0.05);
}

[data-theme="dark"] .timeline-date-badge {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 亮色主题适配 */
[data-theme="light"] .timeline-date-badge {
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* 自动主题适配 */
@media (prefers-color-scheme: dark) {
    .timeline-date-badge {
        box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }
}

@media (prefers-color-scheme: light) {
    .timeline-date-badge {
        box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    }
}

/* 分页信息样式 */
.pagination-info {
    text-align: center;
    margin-top: 15px;
    color: var(--secondary);
    font-size: 14px;
}

.pagination-info span {
    margin: 0 10px;
}

/* 分页控件样式 */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 20px 0;
    gap: 10px;
}

.pagination-btn {
    background: var(--entry);
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary);
    color: var(--theme);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
    margin: 0 15px;
}

.page-number {
    background: var(--entry);
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 36px;
    text-align: center;
}

.page-number:hover {
    background: var(--code-bg);
    transform: translateY(-1px);
}

.page-number.active {
    background: var(--primary);
    color: var(--theme);
    font-weight: bold;
}

.page-ellipsis {
    padding: 8px 4px;
    color: var(--secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
}

/* 每页显示数量控制样式 */
.pagination-settings {
    text-align: center;
    margin: 20px 0;
    color: var(--secondary);
    font-size: 14px;
}

.pagination-settings label {
    margin-right: 10px;
}

.pagination-settings select {
    background: var(--entry);
    color: var(--primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-settings select:hover {
    border-color: var(--primary);
}

.pagination-settings select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary), 0.2);
}

/* 隐藏的时间线项目 */
.timeline-item.hidden {
    display: none;
}

/* 响应式设计 - 分页控件 */
@media (max-width: 768px) {
    .pagination-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .pagination-numbers {
        margin: 0 10px;
        gap: 3px;
    }
    
    .page-number {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 32px;
    }
    
    .pagination-settings {
        font-size: 13px;
    }
    
    .pagination-settings select {
        padding: 5px 8px;
        font-size: 13px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 分页切换动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.timeline-item.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* 图片相关样式 */
.thought-images {
    margin: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.image-thumbnail {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid var(--border);
    max-width: 200px;
    max-height: 200px;
}

.image-thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 图片模态框样式 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.image-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.image-modal-close:hover {
    color: var(--primary);
}

#modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.image-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.image-nav-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 24px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    pointer-events: all;
    margin: 0 20px;
}

.image-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.image-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.image-counter {
    margin-top: 15px;
    color: white;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
}

/* 模态框动画 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 响应式设计 - 图片 */
@media (max-width: 768px) {
    .image-thumbnail {
        max-width: 120px;
        max-height: 120px;
    }
    
    .image-modal-close {
        top: -35px;
        font-size: 28px;
    }
    
    .image-nav-btn {
        font-size: 20px;
        padding: 10px 12px;
        margin: 0 10px;
    }
    
    #modal-image {
        max-height: 70vh;
    }
    
    .image-counter {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* 暗色主题适配 - 图片 */
[data-theme="dark"] .image-thumbnail {
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .image-thumbnail:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* 亮色主题适配 - 图片 */
[data-theme="light"] .image-thumbnail {
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .image-thumbnail:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
