* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo h1 {
    color: #7c3aed;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-logo h1 a {
    color: inherit;
    text-decoration: none;
}

.nav-logo span {
    color: #666;
    font-size: 0.9rem;
    font-weight: 300;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #7c3aed;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6366f1 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Search & Filter Section */
.search-filter {
    background: white;
    padding: 40px 0;
    border-bottom: 1px solid #eee;
}

.search-bar {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-bar input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #7c3aed;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #7c3aed;
    color: white;
    border-color: #7c3aed;
}

/* Articles Section */
.articles {
    padding: 60px 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
}

.article-category {
    display: inline-block;
    background: #7c3aed;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.article-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.article-excerpt {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #999;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #8b5cf6;
}

.footer-section p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #8b5cf6;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: #8b5cf6;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    opacity: 0.7;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .filter-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .filter-btn {
        white-space: nowrap;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .search-filter {
        padding: 30px 0;
    }

    .articles {
        padding: 40px 0;
    }

    .article-content {
        padding: 1rem;
    }
}

/* Article Detail Page Styles */
.article-main {
    background: #fff;
}

.article-hero {
    background: #f8f9fa;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #7c3aed;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    text-decoration: underline;
    color: #6d28d9;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #7c3aed;
    color: white !important;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.back-to-home:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    text-decoration: none;
}

.separator {
    color: #ccc;
}

.article-detail {
    padding: 40px 0 60px;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

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

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #333;
}

.author-role {
    font-size: 0.9rem;
    color: #666;
}

.article-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.article-image-container {
    margin-bottom: 3rem;
    text-align: center;
}

.article-detail-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.article-content-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    margin-top: 2rem;
}

.article-content {
    max-width: none;
}

.article-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-text h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: #7c3aed;
}

.article-text h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    color: #333;
}

.article-text p {
    margin-bottom: 1.5rem;
}

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

.article-text li {
    margin-bottom: 0.5rem;
}

.article-text blockquote {
    border-left: 4px solid #7c3aed;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.article-text blockquote p {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.article-text blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
    font-style: normal;
}

.article-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.article-tags h3 {
    margin-bottom: 1rem;
    color: #333;
}

.tags-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #ede9fe;
    color: #7c3aed;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.article-share {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.article-share h3 {
    margin-bottom: 1rem;
    color: #333;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.share-btn.copy {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e1e5e9;
}

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

.article-sidebar {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.2rem;
}

.related-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-article {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.related-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.related-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.related-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: #333;
}

.related-category {
    font-size: 0.8rem;
    color: #7c3aed;
    text-transform: uppercase;
    font-weight: 500;
}

.related-date {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.category-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-link {
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.category-link:hover {
    background: #7c3aed;
    color: white;
}

.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.nav-article {
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-article:hover {
    background: #7c3aed;
    color: white;
    transform: translateY(-2px);
}

.nav-article.prev {
    text-align: left;
}

.nav-article.next {
    text-align: right;
}

.nav-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

.nav-article:hover .nav-label {
    color: rgba(255,255,255,0.8);
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Responsive Design for Article Page */
@media screen and (max-width: 1024px) {
    .article-content-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .article-sidebar {
        position: static;
        order: -1;
    }
}

@media screen and (max-width: 768px) {
    .article-detail-title {
        font-size: 2rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .author-info {
        flex-direction: column;
        text-align: center;
    }
    
    .article-info {
        justify-content: center;
    }
    
    .article-navigation {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .nav-article.next {
        text-align: left;
    }
    
    .share-buttons {
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .article-detail {
        padding: 20px 0 40px;
    }
    
    .article-detail-title {
        font-size: 1.5rem;
    }
    
    .article-text {
        font-size: 1rem;
    }
    
    .article-sidebar {
        padding: 1.5rem;
    }
    
    .related-article {
        flex-direction: column;
    }
    
    .related-image {
        width: 100%;
        height: 120px;
    }
}

/* Animation for card loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-card {
    animation: fadeInUp 0.5s ease forwards;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #7c3aed;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    transform: scale(1);
}

.back-to-top:hover {
    background: #6d28d9;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

.reading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #8b5cf6, #a855f7);
    width: 0%;
    transition: width 0.3s ease;
}

/* Article Content Enhancements */
.article-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-text code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.article-text pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border-left: 4px solid #7c3aed;
}

.article-text pre code {
    background: none;
    padding: 0;
    color: #333;
}

/* Enhanced Table Styling */
.article-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.article-text table th,
.article-text table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.article-text table th {
    background: #7c3aed;
    color: white;
    font-weight: 600;
}

.article-text table tr:hover {
    background: #f8f9fa;
}

/* Loading Animation for Article Content */
.article-content {
    opacity: 0;
    animation: fadeInContent 0.8s ease forwards 0.3s;
}

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

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

/* Article Image Zoom Effect */
.article-detail-image {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.article-detail-image:hover {
    transform: scale(1.02);
}

/* Enhanced Sidebar Animations */
.sidebar-widget {
    opacity: 0;
    animation: slideInRight 0.6s ease forwards;
}

.sidebar-widget:nth-child(1) { animation-delay: 0.2s; }
.sidebar-widget:nth-child(2) { animation-delay: 0.4s; }

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

/* Article Header Animation */
.article-header {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.1s;
}

/* Enhanced Share Button Animations */
.share-btn {
    position: relative;
    overflow: hidden;
}

.share-btn::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.5s;
}

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

/* Tooltip Enhancement */
.back-to-top::after {
    content: attr(title);
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.back-to-top:hover::after {
    opacity: 1;
}

/* Print Styles */
@media print {
    .back-to-top,
    .reading-progress,
    .article-share,
    .article-navigation,
    .article-sidebar {
        display: none !important;
    }
    
    .article-content-container {
        grid-template-columns: 1fr;
    }
    
    .article-text {
        font-size: 12pt;
        line-height: 1.5;
    }
}