.article-hero {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    padding: 4rem 2rem 6rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cpattern id='dots' width='10' height='10' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='5' cy='5' r='1' fill='white'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23dots)'/%3E%3C/svg%3E");
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

.article-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.article-category-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-hero-title {
    font-family: var(--font-secondary);
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.article-hero-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    transition: width 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.article-main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (max-width: 1024px) {
    .article-main-layout {
        grid-template-columns: 1fr;
    }
}

.article-content-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .article-content-wrapper {
        padding: 1.5rem;
    }
}

.article-content-wrapper h2 {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    position: relative;
    padding-bottom: 0.5rem;
}

.article-content-wrapper h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue) 0%, var(--accent-green) 100%);
    border-radius: 2px;
}

.article-content-wrapper h3 {
    font-family: var(--font-secondary);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-content-wrapper p {
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.article-content-wrapper ul,
.article-content-wrapper ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content-wrapper li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.article-content-wrapper ul li::marker {
    color: var(--accent-blue);
}

.article-content-wrapper blockquote {
    background: linear-gradient(135deg, var(--accent-blue-light) 0%, rgba(255,255,255,0.95) 100%);
    border-left: 5px solid var(--accent-blue);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text-primary);
    position: relative;
}

.article-content-wrapper blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--accent-blue);
    position: absolute;
    top: -10px;
    left: 10px;
    opacity: 0.3;
    font-family: Georgia, serif;
}

.article-content-wrapper .highlight-box {
    background: linear-gradient(135deg, #fff3cd 0%, rgba(255,255,255,0.95) 100%);
    border-left: 5px solid #ffc107;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    position: relative;
}

.article-content-wrapper .highlight-box::before {
    content: '\f0eb';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -15px;
    left: 20px;
    font-size: 1.5rem;
    color: #ffc107;
}

.article-content-wrapper .tip-box {
    background: linear-gradient(135deg, var(--accent-green-light) 0%, rgba(255,255,255,0.95) 100%);
    border-left: 5px solid var(--accent-green);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    position: relative;
}

.article-content-wrapper .tip-box::before {
    content: '\f0eb';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -15px;
    left: 20px;
    font-size: 1.5rem;
    color: var(--accent-green);
}

.article-content-wrapper code {
    background: var(--light-gray);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--accent-blue);
}

.article-content-wrapper pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content-wrapper pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.article-sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.sidebar-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-card-title {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.sidebar-card-title i {
    color: var(--accent-blue);
}

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

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-link {
    display: block;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    line-height: 1.4;
}

.toc-link:hover,
.toc-link.active {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    transform: translateX(5px);
}

.toc-link i {
    margin-right: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.toc-link:hover i {
    opacity: 1;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.author-details h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.author-details p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: white;
}

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

.share-facebook { background: linear-gradient(135deg, #1877f2, #145dbf); }
.share-twitter { background: linear-gradient(135deg, #1da1f2, #0d8ecf); }
.share-whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
.share-linkedin { background: linear-gradient(135deg, #0077b5, #005885); }
.share-copy { background: linear-gradient(135deg, #6c757d, #495057); }

.share-copy.copied {
    background: linear-gradient(135deg, #27ae60, #1e8449);
}

.article-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.stat-box {
    text-align: center;
    padding: 1rem 0.5rem;
    background: var(--light-gray);
    border-radius: var(--radius-md);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-article-item {
    padding: 1rem;
    background: var(--light-gray);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.related-article-item:hover {
    transform: translateX(5px);
    border-color: var(--accent-blue);
    background: white;
}

.related-article-item:last-child {
    margin-bottom: 0;
}

.related-article-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-size: 1rem;
}

.related-article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 1000;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

@media (max-width: 768px) {
    .article-hero {
        padding: 3rem 1rem 4rem;
    }

    .article-hero-title {
        font-size: 2rem;
    }

    .article-hero-meta {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .article-sidebar {
        position: static;
        order: 2;
    }

    .sidebar-card {
        padding: 1.25rem;
    }

    .share-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .article-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

[data-theme="dark"] .article-content-wrapper blockquote,
[data-theme="dark"] .article-content-wrapper .highlight-box,
[data-theme="dark"] .article-content-wrapper .tip-box {
    color: var(--text-primary);
}

[data-theme="dark"] .sidebar-card,
[data-theme="dark"] .related-article-item {
    background: rgba(45, 45, 45, 0.9);
}

[data-theme="dark"] .stat-box {
    background: rgba(60, 60, 60, 0.8);
}
