/* ================================
   daily.html 专属样式 - 时间轴布局
================================ */

/* 独特 Header 设计 */
.daily-header {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 120px 0 80px;
    overflow: hidden;
}

.daily-header .header-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.daily-header .deco-line {
    position: absolute;
    top: 20%;
    left: 10%;
    width: 1px;
    height: 60%;
    background: linear-gradient(to bottom, #c44d4d, transparent);
    opacity: 0.3;
}

.daily-header .deco-circle {
    position: absolute;
    top: 30%;
    right: 15%;
    width: 200px;
    height: 200px;
    border: 1px solid rgba(196, 77, 77, 0.2);
    border-radius: 50%;
}

.daily-header .header-subtitle {
    display: block;
    font-size: 14px;
    letter-spacing: 4px;
    color: #c44d4d;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.daily-header .header-desc {
    font-size: 18px;
    color: #b8a898;
    max-width: 600px;
    margin: 20px auto;
}

.daily-header .scroll-indicator {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.daily-header .scroll-indicator span {
    font-size: 12px;
    color: #888;
    letter-spacing: 2px;
}

.daily-header .arrow-down {
    width: 20px;
    height: 20px;
    border-right: 2px solid #c44d4d;
    border-bottom: 2px solid #c44d4d;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
    40% { transform: translateY(10px) rotate(45deg); }
    60% { transform: translateY(5px) rotate(45deg); }
}

.daily-header .header-pattern {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 10"><path d="M0 0 L50 10 L100 0" fill="none" stroke="%23c44d4d" stroke-width="0.5" opacity="0.3"/></svg>');
    background-size: 50px 10px;
}

/* 筛选标签 */
.filter-section {
    background: #f5f0e8;
    padding: 30px 0;
    border-bottom: 1px solid #e0d5c5;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-tab {
    padding: 10px 25px;
    border: 1px solid #c44d4d;
    background: transparent;
    color: #1a1a1a;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.filter-tab:hover,
.filter-tab.active {
    background: #c44d4d;
    color: #f5f0e8;
}

/* 时间轴布局 */
.timeline-section {
    padding: 80px 0;
    background: #faf8f5;
}

.timeline-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #c44d4d, #d4b499, #c44d4d);
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    display: flex;
    align-items: flex-start;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #1a1a1a;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #c44d4d;
    z-index: 2;
}

.timeline-marker .date-day {
    font-size: 24px;
    font-weight: bold;
    color: #f5f0e8;
}

.timeline-marker .date-month {
    font-size: 12px;
    color: #c44d4d;
}

.timeline-content {
    width: 45%;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    padding-right: 40px;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    padding-left: 40px;
    text-align: left;
}

.timeline-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(196, 77, 77, 0.2);
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-image:hover img {
    transform: scale(1.05);
}

.category-tag {
    position: absolute;
    top: 15px;
    padding: 5px 15px;
    font-size: 12px;
    border-radius: 20px;
    color: #fff;
    font-weight: 500;
}

.category-tag.frontend { background: #3498db; }
.category-tag.backend { background: #2ecc71; }
.category-tag.database { background: #e74c3c; }
.category-tag.algorithm { background: #9b59b6; }

.timeline-item:nth-child(odd) .category-tag {
    left: 15px;
}

.timeline-item:nth-child(even) .category-tag {
    right: 15px;
}

.card-body {
    padding: 25px;
}

.timeline-item:nth-child(odd) .card-body {
    text-align: right;
}

.card-title {
    font-size: 18px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #c44d4d;
}

.card-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.timeline-item:nth-child(odd) .card-meta {
    justify-content: flex-end;
}

.read-more {
    display: inline-block;
    color: #c44d4d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.read-more:hover {
    transform: translateX(5px);
}

/* 加载更多按钮 */
.load-more-section {
    text-align: center;
    padding: 40px 0;
}

.load-more-btn {
    padding: 15px 50px;
    background: transparent;
    border: 2px solid #c44d4d;
    color: #c44d4d;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.load-more-btn:hover {
    background: #c44d4d;
    color: #f5f0e8;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .timeline-line {
        left: 20px;
    }
    
    .timeline-item,
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        flex-direction: row;
    }
    
    .timeline-marker {
        left: 20px;
    }
    
    .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        margin-right: 0;
        padding: 0 !important;
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) .card-body {
        text-align: left;
    }
    
    .timeline-item:nth-child(odd) .card-meta {
        justify-content: flex-start;
    }
    
    .timeline-item:nth-child(odd) .category-tag,
    .timeline-item:nth-child(even) .category-tag {
        left: 15px;
        right: auto;
    }
}
