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

html {
    scroll-behavior: smooth;
}

body {
    background: url('/images/bg.jpg') right bottom / cover no-repeat fixed;
    background-color: #000;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
            radial-gradient(circle at 30% 20%, rgba(255,215,0,0.15), transparent 40%),
            radial-gradient(circle at 70% 80%, rgba(255,215,0,0.1), transparent 40%);
}

a {
    text-decoration: none;
}

.site-header {
    background: #212529;
    position: relative;
    z-index: 1100;
}

.site-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.site-navbar .nav-link {
    color: rgba(255,255,255,.85);
    font-size: 15px;
    padding-left: 14px !important;
    padding-right: 14px !important;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
    color: #ffc107 !important;
}

.header-action .btn {
    min-width: 84px;
}

.page-wrap {
    position: relative;
    z-index: 5;
    padding: 28px 0 56px;
}

.page-panel {
    background: rgba(0, 0, 0, 0.56);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.05);
    box-shadow: inset 0 0 60px rgba(0,0,0,.3);
    border-radius: 22px;
    padding: 24px;
}

.top-search-box {
    background: rgba(20,20,20,.9);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
    padding: 18px 20px;
    margin-bottom: 18px;
}

.top-search-title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 48px;
}

.article-search-form .form-control {
    height: 48px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: #fff;
    border-radius: 12px;
}

.article-search-form .form-control::placeholder {
    color: rgba(255,255,255,.45);
}

.article-search-form .form-control:focus {
    box-shadow: none;
    border-color: rgba(255,193,7,.5);
    background: rgba(255,255,255,.08);
    color: #fff;
}

.article-search-form .btn {
    height: 48px;
    border-radius: 12px;
    font-weight: 600;
}

.article-breadcrumb {
    margin-bottom: 18px;
}

.article-breadcrumb .breadcrumb {
    margin: 0;
}

.article-breadcrumb .breadcrumb-item,
.article-breadcrumb .breadcrumb-item a {
    color: rgba(255,255,255,.68);
    font-size: 14px;
}

.article-breadcrumb .breadcrumb-item.active {
    color: #ffc107;
}

.article-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,.45);
}

.article-main {
    background: rgba(20,20,20,.9);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
    overflow: hidden;
}

.article-cover img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.article-content {
    padding: 24px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: rgba(255,255,255,.55);
    font-size: 13px;
    margin-bottom: 12px;
}

.article-meta i {
    color: #ffc107;
    margin-right: 4px;
}

.article-title {
    color: #fff;
    font-size: 36px;
    line-height: 1.4;
    font-weight: 700;
    margin: 0 0 14px;
}

.article-intro {
    color: rgba(255,255,255,.78);
    font-size: 16px;
    line-height: 1.9;
    margin: 0 0 24px;
}

.article-content h2 {
    color: #e6c27a;
    font-size: 28px;
    font-weight: 700;
    margin: 38px 0 14px;
    line-height: 1.45;
}

.article-content h3 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 24px 0 12px;
    line-height: 1.5;
}

.article-content p {
    color: rgba(255,255,255,.82);
    font-size: 16px;
    line-height: 2;
    margin: 0 0 18px;
}

.article-content ul {
    color: rgba(255,255,255,.82);
    padding-left: 1.2rem;
    margin-bottom: 18px;
}

.article-content li {
    margin-bottom: 8px;
    line-height: 1.9;
}

.article-tip-box {
    background: rgba(255,193,7,.08);
    border: 1px solid rgba(255,193,7,.18);
    border-radius: 14px;
    padding: 18px;
    margin: 20px 0;
    color: rgba(255,255,255,.82);
}

.article-tip-box strong {
    color: #ffc107;
}

.article-share-box {
    margin-top: 36px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
}

.article-share-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}

.article-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.article-share-btn {
    min-width: 132px;
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.05);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all .25s ease;
}

.article-share-btn:hover {
    background: rgba(255,193,7,.12);
    border-color: rgba(255,193,7,.28);
    color: #ffc107;
    transform: translateY(-2px);
}

.sidebar-box {
    background: rgba(20,20,20,.9);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px;
}

.toc-list,
.article-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li + li,
.article-category-list li + li {
    margin-top: 10px;
}

.toc-list a,
.article-category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255,255,255,.82);
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.05);
    transition: all .25s ease;
}

.toc-list a:hover,
.article-category-list a:hover,
.article-category-list a.active {
    background: rgba(255,193,7,.08);
    border-color: rgba(255,193,7,.16);
    color: #ffc107;
}

/* 文章目錄層級 */
.toc-list li.toc-level-2 a,
.mobile-toc-list a.toc-level-2 {
    padding-left: 14px;
    font-weight: 700;
}

.toc-list li.toc-level-3 a,
.mobile-toc-list a.toc-level-3 {
    padding-left: 30px;
    font-size: 14px;
    color: rgba(255,255,255,.72);
    justify-content: flex-start;
    gap: 8px;
}

.toc-list li.toc-level-3 a::before,
.mobile-toc-list a.toc-level-3::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,193,7,.75);
    flex: 0 0 6px;
}

.toc-list li.toc-level-3 a i {
    margin-left: auto;
}

.toc-list li.toc-level-3 a:hover,
.mobile-toc-list a.toc-level-3:hover {
    color: #ffc107;
}

.article-category-list .count {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255,193,7,.15);
    color: #ffc107;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-toc {
    display: none;
    margin: 0 0 20px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
}

.mobile-toc-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
}

.mobile-toc-arrow {
    transition: transform .25s ease;
}

.mobile-toc-toggle.active .mobile-toc-arrow {
    transform: rotate(180deg);
}

.mobile-toc-list {
    display: none;
    padding: 0 12px 12px;
}

.mobile-toc-list a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,.85);
    background: rgba(255,255,255,.03);
    margin-bottom: 8px;
    transition: all .25s ease;
}

.mobile-toc-list a:hover {
    color: #ffc107;
    background: rgba(255,193,7,.06);
}

.site-footer {
    position: relative;
    padding: 34px 0 28px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255,255,255,.05);
    box-shadow: inset 0 0 60px rgba(0,0,0,.35);
    z-index: 5;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 24px;
    margin-bottom: 26px;
}

.footer-nav a {
    color: #d3ad64;
    font-size: 16px;
    font-weight: 600;
    transition: color .25s ease;
}

.footer-nav a:hover {
    color: #ffd95e;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 22px;
}

.footer-social a {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #c98a1d;
    color: #1b1b1b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform .25s ease, background .25s ease;
}

.footer-social a:hover {
    transform: translateY(-3px);
    background: #e0aa3a;
}

.footer-note {
    color: rgba(255,255,255,.55);
    text-align: center;
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 10px;
}

.footer-copy {
    color: rgba(255,255,255,.7);
    text-align: center;
    font-size: 15px;
    margin-bottom: 14px;
}

.footer-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.mobile-bottom-nav {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 64px;
    background: #1b1b1b;
    border-top: 1px solid rgba(255,255,255,.08);
    z-index: 1200;
    display: none;
}

.mobile-bottom-nav .nav-inner {
    display: flex;
    width: 100%;
    height: 100%;
}

.mobile-bottom-nav a {
    flex: 1;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1.2;
}

.mobile-bottom-nav a i {
    font-size: 20px;
    margin-bottom: 4px;
}

.mobile-bottom-nav a.active,
.mobile-bottom-nav a:hover {
    color: #ffc107;
}

@media (min-width: 992px) {
    .mobile-toc {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .site-navbar .navbar-collapse {
        background: #212529;
        margin-top: 10px;
        padding: 10px 0 4px;
        border-top: 1px solid rgba(255,255,255,.08);
    }

    .site-navbar .nav-link {
        padding: 10px 0 !important;
    }

    .header-action {
        padding-top: 8px;
    }

    .page-panel {
        padding-left: 18px;
        padding-right: 18px;
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .top-search-box {
        padding: 16px;
    }

    .top-search-title {
        font-size: 20px;
        line-height: 1.4;
        margin-bottom: 2px;
    }

    .article-cover img {
        height: 260px;
    }

    .article-title {
        font-size: 28px;
    }

    .mobile-bottom-nav {
        display: block;
    }

    body {
        padding-bottom: 64px;
    }

    .mobile-toc {
        display: block;
    }
}

@media (max-width: 767.98px) {
    body {
        background-attachment: scroll;
    }

    .page-wrap {
        padding: 18px 0 36px;
    }

    .article-content {
        padding: 18px;
    }

    .article-title {
        font-size: 24px;
    }

    .article-intro,
    .article-content p,
    .article-content li {
        font-size: 15px;
    }

    .article-content h2 {
        font-size: 24px;
    }

    .article-content h3 {
        font-size: 20px;
    }

    .site-footer {
        padding: 28px 0 92px;
    }

    .article-share-actions {
        gap: 10px;
    }

    .article-share-btn {
        flex: 1 1 calc(50% - 10px);
        min-width: 0;
    }
}