/* Premium Table of Contents (TOC) Styling */
.cc-toc-container {
    margin: 30px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 600px;
}

.cc-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.cc-toc-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e1b4b;
    letter-spacing: -0.02em;
}

.cc-toc-toggle {
    background: #f1f5f9;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cc-toc-toggle:hover {
    background: #e2e8f0;
    color: #1e1b4b;
}

.cc-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cc-toc-list.hidden {
    display: none;
}

.cc-toc-item {
    margin: 10px 0;
    line-height: 1.5;
}

.cc-toc-item a {
    text-decoration: none;
    color: #475569;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: block;
    position: relative;
    padding-left: 5px;
}

.cc-toc-item a:hover {
    color: #6366f1;
    transform: translateX(5px);
}

.cc-toc-h2 {
    font-weight: 700;
}

.cc-toc-h3 {
    padding-left: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.cc-toc-h4 {
    padding-left: 40px;
    font-size: 13px;
    opacity: 0.8;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Offset for floating headers */
:target::before {
    content: "";
    display: block;
    height: 100px; /* Adjust according to your sticky header height */
    margin: -100px 0 0;
}
