/* Blog Article Styles */

/* Table of Contents */
.table-of-contents {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin: 32px 0;
    backdrop-filter: blur(10px);
}

.table-of-contents h2 {
    color: #8b5cf6;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-of-contents h2::before {
    content: "📑";
    font-size: 1.5rem;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin: 12px 0;
    padding-left: 24px;
    position: relative;
}

.table-of-contents li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #8b5cf6;
    font-weight: bold;
}

.table-of-contents a {
    color: #e5e7eb;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
}

.table-of-contents a:hover {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    transform: translateX(4px);
}

/* Internal Links */
.internal-link {
    color: #3b82f6;
    text-decoration: none;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.internal-link:hover {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    border-bottom-color: #8b5cf6;
}

/* Article Content Headings */
.blog-content h2 {
    color: #8b5cf6;
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
    scroll-margin-top: 100px;
}

.blog-content h3 {
    color: #3b82f6;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 16px;
}

.blog-content p {
    color: #d1d5db;
    line-height: 1.8;
    margin-bottom: 16px;
}

.blog-content ul,
.blog-content ol {
    color: #d1d5db;
    margin: 16px 0;
    padding-left: 24px;
}

.blog-content li {
    margin: 8px 0;
    line-height: 1.6;
}

.blog-content strong {
    color: #f3f4f6;
    font-weight: 600;
}

/* Code blocks */
.blog-content code {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Blockquotes */
.blog-content blockquote {
    border-left: 4px solid #8b5cf6;
    padding-left: 20px;
    margin: 24px 0;
    color: #9ca3af;
    font-style: italic;
}

/* Images */
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
}

/* Related Articles */
.related-articles {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 2px solid rgba(139, 92, 246, 0.3);
}

.related-articles h2 {
    color: #8b5cf6;
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 24px;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Reading progress bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .table-of-contents {
        padding: 16px;
    }
    
    .blog-content h2 {
        font-size: 1.5rem;
        margin-top: 32px;
    }
    
    .blog-content h3 {
        font-size: 1.25rem;
    }
}
