.dropdown:hover .dropdown-menu {
    display: block;
}
.dropdown-menu {
    display: none;
}
.toc {
    max-height: 400px;
    overflow-y: auto;
}
.article-content h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #334c65;
}
.article-content h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #334c65;
}
.article-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}
.article-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
.article-content li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
}
.article-content strong {
    font-weight: bold;
    color: #334c65;
}
.highlight-box {
    background: linear-gradient(135deg, #f1ac4d, #dca692);
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}
.feature-list {
    background-color: #f9fafa;
    border-left: 4px solid #1bbf78;
    padding: 1rem;
    margin: 1rem 0;
}
.step-box {
    background-color: #cbdad2;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
}

/* Table Styles */
.article-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(51, 76, 101, 0.08);
}

.article-content table th {
    background: linear-gradient(135deg, #334c65, #1bbf78);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 1rem;
    font-size: 1rem;
}

.article-content table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    font-size: 0.95rem;
}

.article-content table tr:last-child td {
    border-bottom: none;
}

.article-content table tr:nth-child(even) {
    background-color: #f9fafa;
}

.article-content table tr:hover {
    background-color: #f3f4f6;
}

/* Related Article Cards Hover Effects */
.related-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(51, 76, 101, 0.1);
}

.related-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
    z-index: 1;
}

.related-card:hover::before {
    left: 100%;
}

.related-card img {
    transition: all 0.4s ease;
}

.related-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1) saturate(1.1);
}

.related-card h4 {
    transition: all 0.3s ease;
    position: relative;
}

.related-card:hover h4 {
    color: #334c65;
}

.related-card:hover h4::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, #334c65, #f1ac4d);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { width: 0; }
    to { width: 100%; }
}

/* Add reading time indicator */
.reading-time {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(51, 76, 101, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-card:hover .reading-time {
    opacity: 1;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #334c65, #1bbf78);
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(51, 76, 101, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(51, 76, 101, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px);
}

.back-to-top svg {
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #334c65, #1bbf78);
    transition: width 0.1s ease;
    z-index: 1001;
}

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

/* Table of Contents Toggle */
.toc-container {
    transition: all 0.3s ease;
}

.toc-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.toc-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.toc-toggle {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.toc-toggle:hover {
    color: #1bbf78;
}

.toc-toggle .toggle-icon {
    transition: transform 0.3s ease;
    display: inline-block;
    margin-left: 0.5rem;
}

.toc-toggle.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

/* Active TOC item highlighting */
.toc a {
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem 0;
    border-radius: 4px;
    display: block;
}

.toc a:hover {
    background-color: rgba(51, 76, 101, 0.1);
    color: #334c65;
}

.toc a.active {
    background-color: #334c65;
    color: white;
    font-weight: 500;
}

.toc a.active:hover {
    background-color: #1bbf78;
}

/* TOC progress indicator */
.toc-progress {
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    background: linear-gradient(to bottom, #334c65, #1bbf78);
    border-radius: 2px;
    transition: height 0.3s ease;
    height: 0%;
}

.toc {
    position: relative;
}

/* Floating TOC for mobile */
@media (max-width: 1024px) {
    .floating-toc {
        position: fixed;
        top: 1rem;
        right: 1rem;
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        z-index: 999;
        max-width: 280px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .floating-toc.visible {
        transform: translateX(0);
    }

    .floating-toc-toggle {
        position: fixed;
        top: 1rem;
        right: 1rem;
        background: #334c65;
        color: white;
        border: none;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
    }

    .floating-toc-toggle:hover {
        background: #1bbf78;
        transform: scale(1.1);
    }
}

/* Smooth scroll offset for fixed header */
.scroll-offset {
    scroll-margin-top: 100px;
}

/* Social Sharing Buttons */
.social-share {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.social-share.visible {
    opacity: 1;
    visibility: visible;
}

.social-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.social-btn:hover::before {
    left: 100%;
}

.social-btn.weibo {
    background: linear-gradient(135deg, #e6162d, #ff4757);
}

.social-btn.wechat {
    background: linear-gradient(135deg, #09bb07, #2ed573);
}

.social-btn.qq {
    background: linear-gradient(135deg, #12a3eb, #3742fa);
}

.social-btn.douban {
    background: linear-gradient(135deg, #007722, #2ed573);
}

.social-btn.link {
    background: linear-gradient(135deg, #334c65, #1bbf78);
}

.social-btn.email {
    background: linear-gradient(135deg, #ea4335, #ff6b6b);
}

/* Tooltip */
.social-btn .tooltip {
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

.social-btn .tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: rgba(0, 0, 0, 0.8);
}

.social-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Inline sharing buttons in article */
.inline-social-share {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid #e9ecef;
}

.inline-social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.inline-social-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.inline-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.inline-social-btn.weibo {
    background: linear-gradient(135deg, #e6162d, #ff4757);
}

.inline-social-btn.wechat {
    background: linear-gradient(135deg, #09bb07, #2ed573);
}

.inline-social-btn.qq {
    background: linear-gradient(135deg, #12a3eb, #3742fa);
}

.inline-social-btn.douban {
    background: linear-gradient(135deg, #007722, #2ed573);
}

.inline-social-btn.link {
    background: linear-gradient(135deg, #334c65, #1bbf78);
}

.inline-social-btn.email {
    background: linear-gradient(135deg, #ea4335, #ff6b6b);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .social-share {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        margin: 1rem 0;
        left: auto;
        top: auto;
    }

    .social-share-buttons {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .inline-social-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .inline-social-btn {
        min-width: auto;
        flex: 1;
        font-size: 12px;
        padding: 0.5rem;
    }
}

/* Image Lazy Loading Styles */
.lazy-image {
    transition: opacity 0.3s ease, filter 0.3s ease;
    opacity: 0;
    filter: blur(5px);
}

.lazy-image.loaded {
    opacity: 1;
    filter: blur(0);
}

.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ccc"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.5;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Page loading overlay */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.page-loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Loading spinner */
.loading-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #334c65;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade in animations */
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Menu Styles */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: between;
    align-items: center;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

.mobile-menu-nav {
    padding: 1rem 0;
}

.mobile-menu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.mobile-menu-item:hover {
    background-color: #f9fafb;
    color: #2e517e;
}

.mobile-menu-submenu {
    background-color: #f9fafb;
    padding-left: 2rem;
}

.mobile-menu-submenu .mobile-menu-item {
    border-bottom: none;
    padding: 0.5rem 1rem;
    font-size: 14px;
}

.mobile-menu-toggle-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle-btn:hover {
    color: #d1d5db;
}

/* Menu icon animation */
.menu-icon {
    width: 24px;
    height: 24px;
    position: relative;
    transform: rotate(0deg);
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.menu-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: currentColor;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
}

.menu-icon span:nth-child(1) {
    top: 0px;
}

.menu-icon span:nth-child(2) {
    top: 8px;
}

.menu-icon span:nth-child(3) {
    top: 16px;
}

.menu-icon.active span:nth-child(1) {
    top: 8px;
    transform: rotate(135deg);
}

.menu-icon.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.menu-icon.active span:nth-child(3) {
    top: 8px;
    transform: rotate(-135deg);
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}