/* 全局样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --text-color: #2c3e50;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --content-width: 480px;  /* 设置内容宽度为手机端宽度 */
}

body {
    font-family: 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f9f9f9;
}

/* 页面容器样式 */
.container {
    width: 100%;
    max-width: var(--content-width) !important;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航栏样式 */
.navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.8rem 0;
    width: 100%;
}

.navbar > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color) !important;
    letter-spacing: -0.5px;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: #2980b9 !important;
}

.search-form {
    position: relative;
    width: 300px;
    margin-left: 2rem;
}

.search-form input {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    padding-right: 40px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.search-form input:focus {
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    border-color: var(--primary-color);
    outline: none;
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--primary-color);
    padding: 5px 10px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-form button:hover {
    color: #2980b9;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .navbar-brand {
        font-size: 1.3rem;
    }

    .search-form {
        width: auto;
        margin-left: 1rem;
    }

    .search-form input {
        width: 200px;
        font-size: 0.9rem;
    }
}

/* 轮播图容器样式 */
.banner-container {
    margin: 1rem auto 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: var(--content-width);
}

.carousel-item {
    height: 200px;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.carousel-caption {
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2), transparent);
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1rem 0.8rem;
    text-align: left;
}

.carousel-caption h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.carousel-caption p {
    font-size: 0.9rem;
    margin-bottom: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    opacity: 0.9;
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
    opacity: 0.7;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
    padding: 1rem;
}

/* 文章列表样式 */
.article-list {
    margin: 2rem auto;
    width: 100%;
    max-width: var(--content-width);
}

.article-item {
    width: 100%;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.article-item .row {
    margin: 0;
}

.article-item .col-md-4 {
    padding: 0;
}

.article-item .col-md-8 {
    padding: 1rem;
}

.article-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.article-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.article-item h4 a {
    color: var(--text-color);
    text-decoration: none;
}

.article-item h4 a:hover {
    color: var(--primary-color);
}

.article-item p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.article-meta .date {
    color: #888;
    font-size: 0.85rem;
}

.read-more {
    background-color: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.read-more:hover {
    background-color: #2980b9;
    color: white;
    transform: translateX(3px);
}

/* 加载更多按钮样式 */
#loadMore {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin: 1rem 0;
}

#loadMore:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .banner-container {
        margin: 0.5rem auto 1rem;
        border-radius: 8px;
    }
    
    .carousel-item {
        height: 160px;
    }

    .carousel-caption {
        padding: 1.5rem 0.8rem 0.6rem;
    }

    .carousel-caption h3 {
        font-size: 1rem;
        margin-bottom: 0.2rem;
        -webkit-line-clamp: 1;
    }

    .carousel-caption p {
        font-size: 0.8rem;
        -webkit-line-clamp: 1;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        padding: 0.8rem;
    }

    .article-list {
        margin: 1.5rem auto;
    }

    .article-item {
        margin-bottom: 1rem;
    }

    .article-item .col-md-8 {
        padding: 0.8rem;
    }

    .article-item h4 {
        font-size: 1rem;
    }

    .article-item p {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }

    .article-meta {
        margin-top: 0.3rem;
        padding-top: 0.3rem;
    }

    .read-more {
        padding: 0.2rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .banner-container {
        max-height: 150px;
    }
    
    .carousel-item {
        height: 150px;
    }
    
    .carousel-caption {
        padding: 0.8rem;
    }
    
    .carousel-caption h3 {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }
    
    .carousel-caption p {
        font-size: 0.8rem;
    }
    
    .article-item img {
        height: 200px;
        border-radius: 12px 12px 0 0;
    }
    
    .article-item .col-md-8 {
        padding: 1rem;
    }
    
    .article-item h4 {
        font-size: 1.2rem;
    }
}

/* 底部样式 */
.footer {
    width: 100%;
    margin-top: 50px;
    padding: 20px 0;
    background-color: var(--light-gray);
}

.footer > .container {
    text-align: center;
}
.article-content{
    line-height: 1.6;
    background:#fff;
    color:#222;
    overflow:hidden;
    font-size: 14px;
    border-radius: 20px;
}
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.article-list img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

/* 确保大图片不会超出屏幕 */
@media screen and (min-width: 768px) {
    .article-content img {
        max-width: 80%;
    }
}

@media screen and (max-width: 767px) {
    .article-content img {
        max-width: 95%;
    }
}

/* 浮动按钮样式 */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.floating-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background-color: #2980b9;
    color: white;
    text-decoration: none;
}

.floating-button i {
    font-size: 1.2rem;
}

#backToTop {
    display: none;
}

@media (max-width: 768px) {
    .floating-buttons {
        right: 15px;
        bottom: 15px;
    }
    
    .floating-button {
        width: 40px;
        height: 40px;
    }
} 