/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%) !important;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: #8b4513 !important;
}

.navbar-nav .nav-link {
    color: #8b4513 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #d2691e !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    color: #d2691e !important;
    font-weight: bold;
    border-bottom: 2px solid #d2691e;
}

.navbar-toggler {
    border-color: #8b4513;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(139, 69, 19, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* 轮播图样式 */
.carousel {
    margin-top: 76px;
}

.carousel-item {
    height: 500px;
    background-color: #f8f9fa;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
}

.carousel-caption {
    background: rgba(0,0,0,0.5);
    padding: 20px;
    border-radius: 10px;
}

.carousel-caption h1,
.carousel-caption h2 {
    font-weight: bold;
    margin-bottom: 15px;
}

/* 章节标题样式 */
.section-title {
    color: #2c3e50;
    font-weight: bold;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff9a9e, #fecfef);
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(45deg, #ff9a9e, #fecfef);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #8b4513;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #fecfef, #ff9a9e);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255,154,158,0.3);
    color: #d2691e;
}

/* 文章卡片样式 */
.article-card {
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.article-card:hover {
    border-left-color: #28a745;
    background-color: #f8f9fa;
}

/* 页脚样式 */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .carousel-item {
        height: 300px;
    }
    
    .carousel-caption {
        padding: 10px;
    }
    
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
    
    .carousel-caption h2 {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* 加载动画 */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 图片占位符样式 */
.img-placeholder {
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
}

/* 文章列表样式 */
.article-list {
    list-style: none;
    padding: 0;
}

.article-list li {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.article-list li:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* 面包屑导航样式 */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 30px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* 标签样式 */
.badge {
    font-size: 0.8rem;
    padding: 5px 10px;
    border-radius: 15px;
}

.badge-primary {
    background-color: #007bff;
}

.badge-success {
    background-color: #28a745;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

/* 引用样式 */
.blockquote {
    border-left: 4px solid #007bff;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #6c757d;
}

/* 代码块样式 */
.code-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
}

/* 时间轴样式 */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #ff9a9e, #fecfef, #ffb6c1);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    opacity: 0;
    transform: translateY(30px);
    animation: timelineFadeIn 0.8s ease forwards;
}

@keyframes timelineFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 0;
    margin-right: 50%;
    padding-right: 30px;
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 50%;
    margin-right: 0;
    padding-left: 30px;
    text-align: left;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px #fff, 0 0 0 8px rgba(0,123,255,0.2);
}

.timeline-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 图片画廊样式 */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 8px;
    font-size: 0.8rem;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* 响应式时间轴 */
@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 50px;
        margin-right: 0;
        padding-left: 20px;
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-marker {
        left: 20px;
        transform: translateX(-50%);
    }
} 