:root {
    --brand-primary: #7c4dff;
    --brand-secondary: #ffb347;
    --neutral-900: #1f2333;
    --neutral-600: #5c6178;
    --neutral-200: #e7e9f0;
    --neutral-100: #f7f8fa;
    --shadow-soft: 0 12px 24px rgba(31, 35, 51, 0.12);
}

.sidebar-announcement {
    font-family: "Segoe UI", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--neutral-100), #ffffff);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
}

.sidebar-announcement__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--neutral-900);
    margin: 0 0 8px;
}

.sidebar-announcement__desc {
    margin: 0 0 12px;
    color: var(--neutral-600);
    line-height: 1.6;
}

.sidebar-announcement__meta {
    margin: 0;
    padding-left: 20px;
    color: var(--neutral-600);
}

.home-hero {
    margin: 0 auto 32px;
    padding: 48px 32px;
    border-radius: 16px;
    background: radial-gradient(circle at top right, rgba(124, 77, 255, 0.25), rgba(255, 255, 255, 0));
    border: 1px solid rgba(124, 77, 255, 0.18);
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.home-hero__title {
    font-size: clamp(28px, 4vw, 40px);
    color: var(--neutral-900);
    margin: 0 0 12px;
}

.home-hero__desc {
    color: var(--neutral-600);
    margin: 0 0 20px;
    line-height: 1.7;
}

.home-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 999px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(120deg, var(--brand-primary), var(--brand-secondary));
    box-shadow: 0 10px 20px rgba(124, 77, 255, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-hero__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(124, 77, 255, 0.28);
}

#uprightsideBar {
    position: fixed;
    top: 120px;
    right: 40px;
    width: 260px;
    z-index: 999;
    font-family: "Segoe UI", "PingFang SC", sans-serif;
    font-size: 14px;
    color: var(--neutral-900);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.toc-panel {
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    backdrop-filter: blur(8px);
}

#sideBarTab,
.toc-panel__toggle {
    width: 52px;
    border: none;
    border-right: 1px solid var(--neutral-200);
    background: linear-gradient(160deg, var(--brand-primary), #9f7dff);
    color: #fff;
    font-weight: 600;
    writing-mode: vertical-rl;
    text-align: center;
    padding: 10px 6px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#sideBarTab:hover,
.toc-panel__toggle:hover {
    opacity: 0.9;
}

#sideBarContents,
.toc-panel__body {
    flex: 1;
    padding: 16px 18px;
    max-height: 360px;
    overflow-y: auto;
    background: transparent;
}

.toc-panel__body::-webkit-scrollbar {
    width: 4px;
}

.toc-panel__body::-webkit-scrollbar-thumb {
    background: var(--neutral-200);
    border-radius: 999px;
}

.toc-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toc-panel__item {
    line-height: 1.4;
}

.toc-panel__item--secondary {
    padding-left: 12px;
    border-left: 2px solid rgba(124, 77, 255, 0.2);
}

.toc-panel__link {
    width: 100%;
    border: none;
    background: none;
    padding: 6px 4px;
    text-align: left;
    cursor: pointer;
    color: var(--neutral-600);
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.toc-panel__link:hover,
.toc-panel__link:focus-visible {
    color: var(--brand-primary);
    background: rgba(124, 77, 255, 0.08);
    outline: none;
}

.toc-panel__body.is-collapsed {
    display: none;
}

#back-to-top {
    position: fixed;
    right: 40px;
    bottom: 40px;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(120deg, var(--brand-primary), var(--brand-secondary));
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#div_digg,
.float-digg {
    position: fixed;
    right: 40px;
    bottom: 140px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(31, 35, 51, 0.92);
    color: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease;
}

.float-digg:hover {
    transform: translateY(-2px);
}

.icon_favorite {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#blog_post_info_block a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
}

#blog_post_info_block a:hover {
    text-decoration: underline;
}

@media screen and (max-width: 1280px) {
    #uprightsideBar {
        position: static;
        width: 100%;
        margin: 24px 0;
    }

    .toc-panel {
        position: relative;
    }
}

@media screen and (max-width: 768px) {
    .home-hero {
        padding: 32px 20px;
    }

    #back-to-top {
        right: 20px;
        bottom: 20px;
    }
}