/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f5f5;
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 1200px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: #333;
}

a:hover {
    color: #b10000;
}

/* 头部 */
.header {
    background: #b10000;
    border-bottom: 3px solid #8b0000;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo a {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
}

.logo span {
    font-size: 14px;
    color: #ffd966;
    margin-left: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.current-date {
    color: #fff;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
}

.search-form {
    display: flex;
}

.search-form input {
    border: none;
    padding: 8px 15px;
    width: 200px;
    border-radius: 30px 0 0 30px;
    outline: none;
}

.search-form button {
    background: #8b0000;
    border: none;
    color: #fff;
    padding: 8px 15px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background: #6a0000;
}

/* 导航栏 */
.nav-bar {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.nav-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-menu {
    list-style: none;
    display: flex;
}

.nav-menu li {
    margin-right: 30px;
}

.nav-menu li a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-menu li a:hover,
.nav-menu li.active a {
    color: #b10000;
    border-bottom-color: #b10000;
}

.hot-tags {
    font-size: 14px;
}

.hot-tags a {
    color: #000;
    margin-left: 10px;
}

.hot-tags a:hover {
    color: #b10000;
}

/* 主内容区域两栏布局 */
.main {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.content {
    flex: 3;
}

.sidebar {
    flex: 1;
}

/* 文章列表项 */
.news-item {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
    display: flex;
    gap: 20px;
}

.news-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.news-pic {
    width: 200px;
    height: 130px;
    overflow: hidden;
    border-radius: 5px;
    background: #f0f0f0;
}

.news-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-pic img:hover {
    transform: scale(1.05);
}

.news-info {
    flex: 1;
}

.news-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.news-info h3 a {
    color: #222;
    font-weight: 600;
}

.news-info h3 a:hover {
    color: #b10000;
}

.news-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.news-meta i {
    margin-right: 3px;
    color: #b10000;
}

.news-desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    color: #666;
    line-height: 1.7;
    margin-bottom: 10px;
    font-size: 14px;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.news-category {
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 20px;
    color: #b10000;
}

.read-more {
    color: #b10000;
}

/* 侧边栏 */
.sidebar-box {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #b10000;
    color: #222;
}

.sidebar-title i {
    color: #b10000;
    margin-right: 5px;
}

.hot-list {
    list-style: none;
}

.hot-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
}

.hot-list li:before {
    content: "•";
    color: #b10000;
    font-size: 18px;
    margin-right: 8px;
}

.hot-list li a {
    color: #555;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-list li a:hover {
    color: #b10000;
}

.category-list {
    list-style: none;
}

.category-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-list li a {
    color: #555;
}

.category-list li a:hover {
    color: #b10000;
}

.category-list li span {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 20px;
    color: #666;
    font-size: 12px;
}

/* 文章详情页 */
.article-detail {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(2px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.article-detail h1 {
    font-size: 32px;
    color: #222;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
    color: #666;
}

.meta-left {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.meta-right {
    margin-left: auto;
}

.share-btn {
    background: #b10000;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 8px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(177, 0, 0, 0.3);
}

.share-btn:hover {
    background: #8b0000;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(177, 0, 0, 0.4);
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #000;
}

.article-content img {
    max-width: 100%;
    border-radius: 5px;
    margin: 20px 0;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2,
.article-content h3 {
    color: #b10000;
    margin: 2rem 0 1rem;
}

.article-content blockquote {
    border-left: 4px solid #b10000;
    background: #f9f9f9;
    padding: 15px 20px;
    color: #666;
    font-style: italic;
    margin: 20px 0;
}

.like-box {
    margin-top: 30px;
    text-align: center;
}

.like-btn {
    background: #b10000;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.like-btn:hover {
    background: #8b0000;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-navigation a {
    max-width: 45%;
    color: #b10000;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
}

.post-navigation a:hover {
    color: #8b0000;
    text-decoration: underline;
}

.post-navigation .next {
    text-align: right;
}

.post-navigation i {
    margin: 0 5px;
}

.comments {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(2px);
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.comments h3 {
    font-size: 20px;
    color: #222;
    padding-bottom: 10px;
    border-bottom: 2px solid #b10000;
    margin-bottom: 20px;
}

.comment-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 15px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #b10000, #8b0000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 18px;
}

.comment-content {
    flex: 1;
}

.comment-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
}

.comment-meta strong {
    color: #333;
}

.comment-meta span {
    color: #999;
    font-size: 13px;
}

.comment-text {
    color: #555;
    line-height: 1.6;
    background: #f8f8f8;
    padding: 12px;
    border-radius: 8px;
}

#comment-form input,
#comment-form textarea {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 15px;
    width: 100%;
    margin-bottom: 15px;
}

#comment-form input:focus,
#comment-form textarea:focus {
    border-color: #b10000;
    outline: none;
}

#comment-form button {
    background: #b10000;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 30px;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#comment-form button:hover {
    background: #8b0000;
}

.footer {
    background: #222;
    color: #aaa;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
    border-top: 3px solid #b10000;
}

.footer a {
    color: #ddd;
}

.footer a:hover {
    color: #fff;
}

.beian {
    margin-top: 10px;
}

.beian a {
    color: #aaa;
    text-decoration: underline;
}

@media (max-width: 1200px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }

    .main {
        flex-direction: column;
    }

    .news-item {
        flex-direction: column;
    }

    .news-pic {
        width: 100%;
        height: auto;
    }
}

/* 蜜蜂背景装饰（用于article.php）*/
.flower-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.flower {
    position: absolute;
    width: 30px;
    height: 30px;
    animation: sway 4s ease-in-out infinite;
    transform-origin: bottom center;
}

.flower .petal {
    position: absolute;
    width: 12px;
    height: 20px;
    background: #ffb7c5;
    border-radius: 50%;
    top: 5px;
}

.flower .petal:nth-child(1) {
    transform: rotate(0deg) translateX(10px);
}

.flower .petal:nth-child(2) {
    transform: rotate(72deg) translateX(10px);
    background: #ff99aa;
}

.flower .petal:nth-child(3) {
    transform: rotate(144deg) translateX(10px);
}

.flower .petal:nth-child(4) {
    transform: rotate(216deg) translateX(10px);
    background: #ff99aa;
}

.flower .petal:nth-child(5) {
    transform: rotate(288deg) translateX(10px);
}

.flower .center {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #ffdd44;
    border-radius: 50%;
    top: 9px;
    left: 9px;
    box-shadow: 0 0 5px #ffaa00;
}

.flower .stem {
    position: absolute;
    width: 3px;
    height: 40px;
    background: #6b8e23;
    top: 25px;
    left: 13px;
    border-radius: 2px;
}

.bee {
    position: absolute;
    width: 30px;
    height: 20px;
    animation: fly 12s linear infinite;
    opacity: 0.8;
}

.bee .body {
    position: absolute;
    width: 20px;
    height: 15px;
    background: #ffcc00;
    border-radius: 50%;
    left: 5px;
    top: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.bee .stripe {
    position: absolute;
    width: 22px;
    height: 4px;
    background: #333;
    top: 7px;
    left: 4px;
    border-radius: 2px;
}

.bee .wing {
    position: absolute;
    width: 12px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    top: 0;
    left: 8px;
    transform: rotate(-10deg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bee .wing.right {
    left: 16px;
    transform: rotate(10deg);
}

@keyframes sway {
    0%,
    100% {
        transform: rotate(-2deg);
    }

    50% {
        transform: rotate(2deg);
    }
}

@keyframes fly {
    0% {
        transform: translateX(-50px) translateY(0);
    }

    25% {
        transform: translateX(25vw) translateY(-15px);
    }

    50% {
        transform: translateX(50vw) translateY(5px);
    }

    75% {
        transform: translateX(75vw) translateY(-10px);
    }

    100% {
        transform: translateX(110vw) translateY(0);
    }
}