/* 2. 定义通用颜色变量 */
:root {
    --border-radius: 6px;
    --light-text-color: #aaa;
    --text-color: #333;
    --title-color: #000;
    --primary-color: #333;
    --danger-color: #dc3545;
    --bg-color: #f8f8f8;
    --alt-bg-color: #fff;
    --border-color: #f0f0f0;
    --box-shadow: 0 26px 40px -24px rgba(0, 36, 100, .3);
}

/* 1. 重置样式 */
* {
    box-sizing: border-box;
}

html, body, ul, ol {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: var(--bg-color);
    font-size: 16px;
    overflow-y: scroll;
    color: var(--text-color);
}

.navbar {
    background-color: var(--primary-color);
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 999;
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    height: auto;
}

.pointer {
    cursor: pointer;
}

.logo {
    padding-right: 100px
}

.logo img {
    height: 38px
}

.logo span {
    font-size: 20px;
    margin-left: 10px
}

.logo a {
    align-items: center
}

.nav-menu {
    list-style: none;
    padding: 0
}

.nav-menu li {
    padding: 10px;
    position: relative
}

.ov-hide {
    overflow: hidden;
}

.flex {
    display: flex;
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-center {
    text-align: center;
}

.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown .icon-down {
    font-size: 12px;
    display: inline-block;
    transition: transform .3s;
}

.dropdown:hover .icon-down {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    border-radius: var(--border-radius);
    background-color: var(--alt-bg-color);
    white-space: nowrap;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, .2);
    z-index: 1;
    padding-top: 5px;
    padding-bottom: 5px;
}

.dropdown-content a {
    color: var(--title-color);
    padding: 8px 16px;
    display: block
}

.dropdown-content a:hover {
    background-color: var(--bg-color);
}

.dropdown:hover .dropdown-content {
    display: block
}

.avatar img {
    width: 1.5em;
    height: 1.5em;
    margin-right: 5px;
    border-radius: 50%;
}

.search-box input {
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    width: 100%;
    background: var(--bg-color);
    color: var(--text-color);
}

.search-box button {
    padding: 5px 10px;
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.search-box button:hover {
    opacity: 0.8;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
}

.hamburger div {
    width: 25px;
    height: 2px;
    background-color: #fff;
    margin: 3px 0;
    transition: all .3s
}

.hamburger.active div:first-of-type {
    display: none;
}

.hamburger.active div:nth-of-type(2) {
    transform: rotate(45deg) translateY(1px);
    margin: 0;
}

.hamburger.active div:nth-of-type(3) {
    transform: rotate(-45deg) translateY(-1px);
    margin: 0;
}

.content {
    margin: 20px auto;
    width: 1200px;
    max-width: 100%;
    padding: 0 10px;
    min-height: calc(100vh - 232.5px);
}

/*btn*/
.pagination a,
.pagination em,
.pagination span,
.btn {
    padding: 8px 15px;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--alt-bg-color);
    outline: 0;
    transition: all .2s;
    cursor: pointer;
    font-size: 14px;
}

.pagination a:hover {
    background-color: #eee;
}

.btn:hover {
    opacity: 0.7;
}

.pagination .current, .pagination span,
.btn-primary {
    background-color: var(--primary-color);
    color: #fff !important;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff !important;
}

.pagination a, .pagination em, .pagination span {
    margin: 3px;
}

.card {
    border-radius: var(--border-radius);
    background-color: var(--alt-bg-color);
}

.card-body {
    padding: 30px;
}

.card-head {
    padding: 15px 30px 12px;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 1px dashed var(--border-color);
    align-items: center;
}

.hover-shadow {
    transition: box-shadow .2s ease-in-out
}

.hover-shadow:hover {
    box-shadow: 0 26px 40px -24px rgba(0, 36, 100, .3);
}

.log-list {
    margin-bottom: 20px;
}

.log-list h2 {
    margin: 0 0 10px;
    font-size: 24px;
    color: var(--title-color);
}

.log-list h2 a {
    color: inherit;
    transition: color .3s ease-in-out;
    display: flex;
    align-items: center
}

.log-list h2 a:hover {
    color: #007bff
}

.log-list .date {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px
}

.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
    will-change: transform, opacity;
}

.fadeInUp {
    opacity: 0;
    animation-name: fadeInUp
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.page-footer {
    padding: 20px 0;
    font-size: 14px;
    text-align: center;
    color: var(--light-text-color)
}

.page-footer a {
    margin: 0 5px;
    transition: color .3s
}

.page-footer a:hover {
    color: #4d94ff
}

.page-footer p {
    margin: 5px 0
}

.label {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 3px 5px;
    border-radius: var(--border-radius);
    font-size: 12px;
    white-space: nowrap;
    margin-right: 3px;
}

.page {
    background: var(--alt-bg-color);
    padding: 50px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
}

.breadthumb {
    padding-bottom: 15px;
}

.bread-item + .bread-item::before {
    content: ">";
    padding: 0 5px;
    color: #999
}

.bread-item:not(a) {
    color: var(--light-text-color);
}

.log-info {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
    text-align: center;
}

.log-info h2 {
    margin-bottom: 15px;
    font-size: 1.5em;
    color: var(--title-color);
}

.log-info .items a {
    color: inherit;
    margin: 0 5px;
}

.log-info .items span, .log-list .date a {
    margin-right: 7px;
    display: inline-block;
}

.log_description {
    line-height: 1.8;
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 20px
}

.log_description p {
    margin-bottom: 1em
}

.log_description h1, .log_description h2, .log_description h3, .log_description h4, .log_description h5, .log_description h6 {
    word-break: break-all;
    color: var(--title-color);
    background: linear-gradient(to bottom, transparent 75%, rgba(119, 239, 225, 0.4) 75%);
    display: inline;
    line-height: 3;
}

.log_description h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.log_description h1:after,
.log_description h2:after,
.log_description h3:after,
.log_description h4:after,
.log_description h5:after,
.log_description h6:after {
    content: '';
    display: block;
}

.log_description h2 {
    width: 100%;
    padding: 5px 0;
    margin-bottom: 1em;
    font-size: 22px;
}

.log_description h3, .log_description h4, .log_description h5, .log_description h6 {
    font-weight: bold;
    font-size: 18px;
    margin: 0.5em 0
}

.log_description a {
    color: #007bff;
    transition: color .3s
}

.log_description a:hover {
    color: #0056b3;
}

.log_description ol, .log_description ul {
    margin-bottom: 1.25em;
    padding-left: 1em
}

.log_description ul {
    list-style-type: disc
}

.log_description ol {
    list-style-type: decimal
}

.log_description li {
    margin-bottom: .5em
}

.log_description img {
    display: block;
    margin: 0 auto
}

.log_description table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25em
}

.log_description td, .log_description th {
    border: 1px solid var(--border-color);
    padding: 8px;
    text-align: center;
}

.log_description th {
    background-color: var(--bg-color);
}

.log_description hr {
    border: 0.5px solid rgba(0, 0, 0, .2);
}

.log_description blockquote {
    border-left: 3px solid;
    margin: 0;
    padding: 0 1em;
    background: var(--bg-color);
}

.log_description pre[class*=language-] {
    background: #000;
}

.tags-list {
    padding: 30px 0;
}

.tag-item {
    white-space: nowrap;
    padding: 5px 12px;
    margin: 2px;
    background-color: var(--bg-color);
    border: 1px solid transparent;
    border-radius: 3em;
    color: var(--title-color);
    transition: background-color .3s, color .3s, transform .3s
}

.tag-item:hover {
    box-shadow: var(--box-shadow);
    transform: scale(1.2);
}

.links {
    padding: 20px 0
}

.links-item {
    width: 20%;
    text-align: center;
}

.links-item a {
    display: block;
    padding: 10px;
    transition: transform .3s, box-shadow .3s;
}

.links-item a:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .1)
}

.links-icon img.ico {
    height: 46px;
    width: 46px;
    border-radius: 50%;
    object-fit: contain;
    background: var(--bg-color);
}

.links-info h3 {
    color: var(--title-color);
}

.links-info .desc {
    font-size: 12px;
    color: var(--light-text-color);
}

code {
    color: #64a6a8;
    padding: 0 5px
}

pre code {
    display: block;
}

/*评论列表*/
.comment {
    display: block;
    margin-bottom: 10px;
    background: var(--bg-color);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
}

.comment-time {
    color: var(--light-text-color);
    font-size: 12px;
}

.comment .comment-content {
    margin: 10px 0
}

.comment-children {
    margin-bottom: 15px;
    padding-left: 1px;
    border-left: 2px dashed var(--bg-color);
}

.form-group .verify-code input,
.input {
    width: 100%;
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    line-height: 1.5;
    outline: none;
    color: inherit;
    appearance: none;
    border-radius: var(--border-radius);
    transition: all .3s;
    background: var(--bg-color);
}

.form-group .verify-code input:hover,
.input:hover,
.input:focus {
    border-color: #000;
}

.form-group {
    margin-bottom: 15px
}

.form-group label {
    display: block;
    margin-bottom: 5px
}

.form-group textarea {
    width: 100%
}

.form-group .verify-code input {
    width: 120px;
    margin-left: 10px
}

.comment-user .form-group {
    width: 32.5%;
}

#comment-place {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#comment-post {
    width: 640px;
    max-width: 100%;
}

.poem {
    font-family: 'Times New Roman', serif;
    margin: 2em auto;
    padding: 20px 20px 40px;
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: block;
    width: 300px;
    max-width: 100%;
    text-align: center;
}

.poem h2 {
    font-size: 2em;
}

.poem p {
    margin: 0;
}

/*九宫格图片列表*/
.images {
    display: flex;
    flex-wrap: wrap;
    margin-top: 15px;
    width: 100%;
    max-width: 390px;
}

.images .img-item {
    width: 33.333%;
    aspect-ratio: 1;
    cursor: pointer;
    padding: 5px;
    box-sizing: border-box;
    position: relative;
}

.images .img-item:hover img {
    filter: brightness(0.7);
}

.images img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.images.row-1 .img-item {
    width: 180px;
    max-height: 270px;
}


.site-tools {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 998;
    border-radius: 8px;
}

.site-tools .item {
    display: block;
    background-color: var(--alt-bg-color);
    width: 46px;
    height: 46px;
    line-height: 46px;
    text-align: center;
    position: relative;
    cursor: pointer;
    border-radius: 50%;
    margin-top: 5px;
    box-shadow: var(--box-shadow);
}

.site-tools .item:hover,
.site-tools .item.active {
    opacity: .8;
}

.site-tools .item:hover .iconfont,
.site-tools .item.active .iconfont {
    color: var(--light-text-color);
}

.site-tools .item .iconfont {
    font-size: 20px;
}

.site-tools .gotoup {
    display: none;
}


@media screen and (max-width: 599px) {
    .images {
        width: 100%;
    }

    .images .img-item {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .mobile-flex-column {
        flex-direction: column !important;
    }

    .mobile-full-width {
        width: 100% !important;
    }

    .logo {
        margin-bottom: 10px;
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 0
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        background: #222;
        position: fixed;
        top: 107px;
        left: 0;
        height: calc(100% - 107px);
        overflow-y: auto;
        flex-wrap: nowrap;
    }

    .nav-menu li {
        text-align: center;
        padding: 10px 0;
        width: 100%;
    }

    .dropdown:hover .dropdown-content {
        position: relative;
        top: 0;
    }

    .search-box {
        width: 100%;
        margin-top: 10px
    }

    .hamburger {
        display: flex
    }

    .log-list, .poem {
        padding: 15px
    }

    .log-info h2 {
        font-size: 1.2em;
    }

    .page-footer {
        padding: 15px
    }

    .page-footer p {
        margin: 5px 0
    }

    .page {
        padding: 20px
    }

    .log_description h1 {
        font-size: 1.75em
    }

    .log_description h2 {
        font-size: 1.5em
    }

    .log_description li, .log_description p {
        font-size: .875em
    }

    .tag-item {
        padding: 4px 10px;
        margin: 3px
    }

    .links-item {
        width: 50%
    }

    .card-body {
        padding: 10px;
    }
}

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background-color: #fff
    }
}

.dark:root {
    --border-radius: 6px;
    --light-text-color: #aaa;
    --text-color: #bfbfbf;
    --title-color: #fff;
    --primary-color: #000;
    --danger-color: #dc3545;
    --bg-color: #000;
    --alt-bg-color: #333;
    --border-color: #f0f0f0;
    --box-shadow: 0 26px 40px -24px rgba(0, 36, 100, .3);
}

.dark img {
    filter: brightness(0.8);
}