:root {
    --sidebar-width: 320px;
    --content-max-width: 900px;
    --article-spacing: 60px;
    --section-spacing: 40px;
    --card-radius: 16px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94)
}

.article-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 50px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2
}

.article-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    background: linear-gradient(135deg, rgb(10 10 10 / .95) 0%, rgb(20 20 20 / .9) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgb(255 255 255 / .12);
    border-radius: 20px;
    padding: 28px;
    transition: all 0.4s cubic-bezier(.25, .46, .45, .94);
    width: 100%;
    box-sizing: border-box;
}

.article-sidebar::-webkit-scrollbar {
    width: 6px
}

.article-sidebar::-webkit-scrollbar-track {
    background: rgb(255 255 255 / .02);
    border-radius: 3px
}

.article-sidebar::-webkit-scrollbar-thumb {
    background: rgb(255 255 255 / .1);
    border-radius: 3px
}

.article-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgb(255 255 255 / .15)
}

.article-sidebar:hover {
    border-color: rgb(255 255 255 / .18);
}

.sidebar-header {
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgb(255 255 255 / .06);
    position: relative
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    border-radius: 1px
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: rgb(255 255 255 / .95);
    margin-bottom: 6px;
    letter-spacing: -.2px
}

.sidebar-subtitle {
    font-size: .82rem;
    color: rgb(255 255 255 / .45);
    line-height: 1.4;
    font-weight: 400
}

.toc-container {
    margin-bottom: 20px;
}

.toc-container,
.related-topics {
    background: rgb(255 255 255 / .02);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid rgb(255 255 255 / .06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    transition: all 0.3s ease;
    min-height: 80px;
    width: 100%;
    box-sizing: border-box
}

.toc-container::before,
.related-topics::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgb(0 93 255 / .03) 0%, transparent 100%);
    border-radius: 14px;
    pointer-events: none
}

.related-topics::before {
    background: linear-gradient(135deg, rgb(0 210 216 / .03) 0%, transparent 100%)
}

.toc-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgb(0 93 255 / .03) 0%, transparent 100%);
    border-radius: 14px;
    pointer-events: none
}

.toc-title,
.related-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: rgb(255 255 255 / .9);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgb(255 255 255 / .06);
    text-transform: uppercase;
    letter-spacing: .5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%
}

.toc-container.collapsed,
.related-topics.collapsed {
    padding: 20px;
    min-height: 60px;
    box-sizing: border-box
}

.toc-container.expanded,
.related-topics.expanded {
    padding: 20px;
    min-height: 80px;
    box-sizing: border-box
}

.toc-container.collapsed .toc-title,
.related-topics.collapsed .related-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none
}

.toc-container.expanded .toc-title,
.related-topics.expanded .related-title {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgb(255 255 255 / .06)
}

.toc-title:hover,
.related-title:hover {
    color: var(--text)
}

.toc-title .title-content,
.related-title .title-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 auto
}

.collapse-icon {
    font-size: 1.2rem;
    color: rgb(255 255 255 / .6);
    transition: all 0.3s ease;
    transform: rotate(0deg);
    flex-shrink: 0;
    margin-left: auto
}

.collapse-icon.collapsed {
    transform: rotate(-90deg)
}

.toc-title .material-icons,
.related-title .material-icons {
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: #fff0;
    background-clip: text;
    opacity: .9
}

.toc-content,
.related-content {
    transition: all 0.3s ease;
    overflow: hidden
}

.toc-content.collapsed,
.related-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0
}

.toc-content.expanded,
.related-content.expanded {
    max-height: 1000px;
    opacity: 1;
    padding-top: 18px
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px
}

.toc-item {
    margin-bottom: 0
}

.toc-link {
    display: block;
    padding: 12px 16px;
    color: rgb(255 255 255 / .65);
    text-decoration: none;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 400;
    transition: all 0.2s ease;
    position: relative;
    line-height: 1.5;
    border: 1px solid #fff0
}

.toc-item>.toc-link {
    font-weight: 500;
    color: rgb(255 255 255 / .75)
}

.toc-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transition: height 0.2s ease;
    border-radius: 2px
}

.toc-link:hover {
    color: var(--text);
    background: rgb(255 255 255 / .04);
    padding-left: 18px
}

.toc-link:hover::before {
    height: 70%
}

.toc-link.active {
    color: var(--text);
    background: rgb(0 93 255 / .08);
    border-color: rgb(0 93 255 / .2);
    font-weight: 500;
    padding-left: 18px
}

.toc-link.active::before {
    height: 100%
}

.toc-subitem {
    margin-left: 0;
    margin-top: 2px;
    padding-left: 20px;
    position: relative
}

.toc-subitem::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, rgb(255 255 255 / .08) 20%, rgb(255 255 255 / .08) 80%, transparent 100%)
}

.toc-subitem .toc-link {
    font-size: .87rem;
    padding: 10px 14px;
    color: rgb(255 255 255 / .55);
    font-weight: 400
}

.toc-subitem .toc-link::before {
    display: none
}

.toc-subitem .toc-link::after {
    content: '–';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgb(255 255 255 / .25);
    font-size: 14px
}

.toc-subitem .toc-link:hover {
    color: rgb(255 255 255 / .9);
    background: rgb(255 255 255 / .03);
    padding-left: 16px
}

.toc-subitem .toc-link.active {
    color: var(--text);
    background: rgb(0 93 255 / .06);
    border-color: #fff0;
    font-weight: 400
}

.toc-subitem .toc-link.active::after {
    color: var(--primary)
}

.related-grid {
    display: grid;
    gap: 8px;
    position: relative;
    z-index: 1
}

.related-topic {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: rgb(255 255 255 / .03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgb(255 255 255 / .06);
    border-radius: 10px;
    text-decoration: none;
    color: rgb(255 255 255 / .75);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden
}

.related-topic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / .08), transparent);
    transition: left 0.4s ease
}

.related-topic:hover {
    color: var(--text);
    background: rgb(255 255 255 / .06);
    border-color: rgb(255 255 255 / .15);
    transform: translateX(3px)
}

.related-topic:hover::before {
    left: 100%
}

.topic-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgb(0 93 255 / .15), rgb(0 210 216 / .15));
    border-radius: 6px;
    flex-shrink: 0;
    border: 1px solid rgb(255 255 255 / .08)
}

.topic-icon .material-icons {
    font-size: 15px;
    color: var(--primary);
    opacity: .9
}

.topic-text {
    font-size: .87rem;
    font-weight: 500;
    letter-spacing: .2px
}

.article-main {
    max-width: var(--content-max-width)
}

.article-sidebar {
    margin-top: 100px
}

.article-header {
    margin-top: 60px;
    margin-bottom: 40px;
    padding-bottom: 0
}

.article-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--text);
    margin-bottom: 16px;
    font-weight: 700;
    line-height: 1.3
}

.article-header .article-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.7
}

.article-header .article-meta {
    font-size: .9rem;
    color: var(--text-muted)
}

.article-content {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 50px;
    margin-bottom: var(--article-spacing);
    position: relative;
    overflow: hidden
}

.article-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent)
}

.article-section {
    margin-bottom: var(--section-spacing);
    position: relative
}

.article-section:last-child {
    margin-bottom: 0
}

.section-header {
    margin-bottom: 30px;
    position: relative
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 15px;
    position: relative;
    display: inline-block
}

.section-title::after {
    visibility: hidden;
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 600px
}

.content-card {
    background: rgb(255 255 255 / .02);
    border: 1px solid rgb(255 255 255 / .05);
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgb(0 93 255 / .05), rgb(0 210 216 / .05));
    opacity: 0;
    transition: opacity 0.3s ease
}

.content-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgb(0 0 0 / .2)
}

.content-card:hover::before {
    opacity: 1
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    flex-shrink: 0
}

.card-icon .material-icons {
    font-size: 1.5rem;
    color: #fff
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text)
}

.card-content {
    position: relative;
    z-index: 1
}

.card-content p {
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 15px
}

.card-content ul {
    margin: 20px 0;
    padding-left: 20px
}

.card-content li {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.6;
    position: relative
}

.enhanced-cta-section {
    background: var(--dark-surface);
    padding: 80px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: var(--article-spacing)
}

.enhanced-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgb(0 93 255 / .08) 0%, transparent 70%);
    animation: rotate 20s linear infinite
}

.enhanced-cta-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 1px
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto
}

.cta-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: #fff0;
    background-clip: text
}

.cta-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap
}

.enhanced-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden
}

.enhanced-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 20px rgb(0 93 255 / .3)
}

.enhanced-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / .2), transparent);
    transition: left 0.6s ease
}

.enhanced-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgb(0 93 255 / .4)
}

.enhanced-btn-primary:hover::before {
    left: 100%
}

.enhanced-btn-secondary {
    background: #fff0;
    color: var(--text);
    border: 2px solid var(--glass-border)
}

.enhanced-btn-secondary:hover {
    border-color: var(--text);
    background: rgb(255 255 255 / .05);
    transform: translateY(-2px)
}

.enhanced-btn .material-icons {
    font-size: 1.2rem;
    transition: transform 0.3s ease
}

.enhanced-btn:hover .material-icons {
    transform: translateX(3px)
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgb(255 255 255 / .1);
    z-index: 1001
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.1s ease
}

@media (max-width:1200px) {
    .article-layout {
        grid-template-columns: 380px 1fr;
        gap: 40px
    }

    .article-content {
        padding: 40px
    }
}

@media (max-width:768px) {
    .article-layout {
        display: flex;
        flex-direction: column;
        gap: 30px
    }

    .article-header {
        order: 1;
        margin-top: 40px;
        margin-bottom: 30px;
        padding: 0 20px
    }

    .article-header .article-subtitle {
        text-align: left
    }

    .article-main {
        order: 2
    }

    .article-sidebar {
        order: 3;
        margin-top: 0;
        position: relative;
        top: 0;
        max-height: none;
        overflow-y: visible;
        margin-bottom: 30px;
        background: rgb(10 10 10 / .98);
        padding: 16px;
        font-size: .9rem
    }

    .article-title {
        font-size: 1.8rem
    }

    .article-header .article-subtitle {
        font-size: 1rem
    }

    .toc-container,
    .related-topics {
        padding: 12px;
        margin-bottom: 16px
    }

    .toc-title,
    .related-title {
        font-size: .85rem;
        padding: 8px 0
    }

    .toc-link {
        padding: 8px 12px;
        font-size: .85rem
    }

    .related-topic {
        padding: 10px
    }

    .topic-text {
        font-size: .8rem
    }

    .article-content {
        padding: 30px
    }

    .section-title {
        font-size: 1.8rem
    }

    .cta-title {
        font-size: 2.2rem
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center
    }

    .enhanced-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center
    }
}

@media (max-width:480px) {
    .article-sidebar {
        padding: 12px;
        font-size: .85rem
    }

    .article-title {
        font-size: 1.5rem
    }

    .article-header .article-subtitle {
        font-size: .95rem
    }

    .toc-container,
    .related-topics {
        padding: 10px
    }

    .toc-title,
    .related-title {
        font-size: .8rem
    }

    .article-content {
        padding: 20px
    }

    .section-title {
        font-size: 1.5rem
    }

    .cta-title {
        font-size: 1.8rem
    }

    .content-card {
        padding: 20px
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg)
    }

    to {
        transform: rotate(360deg)
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.article-section {
    animation: fadeInUp 0.6s ease forwards
}

.article-section:nth-child(1) {
    animation-delay: 0.1s
}

.article-section:nth-child(2) {
    animation-delay: 0.2s
}

.article-section:nth-child(3) {
    animation-delay: 0.3s
}

.article-section:nth-child(4) {
    animation-delay: 0.4s
}

.article-section:nth-child(5) {
    animation-delay: 0.5s
}

.article-section:nth-child(6) {
    animation-delay: 0.6s
}