:root {
    --primary-blue: #3B82F6;
    --secondary-dark-blue: #1E40AF;
    --accent-cyan: #06B6D4;
    --accent-purple: #8B5CF6;
    --accent-pink: #EC4899;
    --accent-green: #10B981;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --bg-card: #FFFFFF;
    --bg-nav: rgba(255, 255, 255, 0.95);
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --border-color: #E5E7EB;
    --border-hover: #D1D5DB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    --nav-height: 70px;
}

[data-theme="dark"],
html[data-theme="dark"] {
    --bg-primary: #111827 !important;
    --bg-secondary: #1F2937 !important;
    --bg-tertiary: #374151 !important;
    --bg-card: #1F2937 !important;
    --bg-nav: rgba(31, 41, 55, 0.95) !important;
    --text-primary: #F9FAFB !important;
    --text-secondary: #D1D5DB !important;
    --text-tertiary: #9CA3AF !important;
    --border-color: #374151 !important;
    --border-hover: #4B5563 !important;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3) !important;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3) !important;
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] body,
[data-theme="dark"] body {
    background: #111827 !important;
    color: #F9FAFB !important;
}

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

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-purple));
    border-radius: 10px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-dark-blue), var(--primary-blue));
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) var(--bg-secondary);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    transition: background 0.3s, color 0.3s;
}

.blog-container {
    background: var(--bg-primary);
    min-height: 100vh;
}

.post-featured-image,
.content-image,
.trending-post-image,
.related-card img,
.post-content img {
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    cursor: default;
}

.post-featured-image img,
.content-image {
    pointer-events: none;
}

.post-featured-image,
.post-content img,
.trending-post-image,
.related-card img {
    -webkit-touch-callout: none;
}

.image-protection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: default;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.blog-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: var(--nav-height);
    z-index: 1000;
    transition: all 0.3s;
}

.blog-navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
}

.nav-logo i {
    color: var(--primary-blue);
    font-size: 28px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
    background: var(--bg-secondary);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-dropdown-toggle:hover {
    background: var(--bg-secondary);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: var(--shadow-xl);
    display: none;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-content a:hover {
    background: var(--bg-secondary);
    color: var(--primary-blue);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle, .mobile-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--primary-blue);
}

.mobile-toggle {
    display: none;
}

.mobile-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    padding: 1.5rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: calc(100vh - var(--nav-height));
    max-height: calc(100vh - var(--nav-height));
    min-height: calc(100vh - var(--nav-height));
    width: 100%;
}

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

.mobile-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.2s;
    font-size: 1rem;
    font-weight: 500;
    min-height: 56px;
    width: 100%;
    border: 1px solid transparent;
    cursor: pointer;
    background: none;
    text-align: left;
}

.mobile-link:hover,
.mobile-link.active {
    background: var(--bg-secondary);
    color: var(--primary-blue);
    border-color: var(--border-color);
    transform: translateX(8px);
}

.mobile-link i {
    width: 24px;
    text-align: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.mobile-toggle i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.mobile-toggle.active i.fa-bars {
    transform: rotate(90deg);
}

.mobile-dropdown {
    width: 100%;
}

.mobile-dropdown-toggle {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.mobile-dropdown-toggle:hover,
.mobile-dropdown-toggle.active {
    background: var(--bg-secondary);
    color: var(--primary-blue);
}

.mobile-chevron {
    margin-left: auto;
    font-size: 0.875rem !important;
    transition: transform 0.3s ease;
    width: auto !important;
}

.mobile-dropdown-toggle.active .mobile-chevron {
    transform: rotate(180deg);
}

.mobile-dropdown-content {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1rem;
    margin-top: 0.5rem;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.mobile-dropdown-content.active {
    display: flex;
    max-height: 500px;
    opacity: 1;
    margin-top: 0.75rem;
}

.mobile-dropdown-content a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9375rem;
    background: var(--bg-secondary);
    border: 1px solid transparent;
}

.mobile-dropdown-content a:hover {
    background: var(--bg-tertiary);
    color: var(--primary-blue);
    border-color: var(--border-color);
    transform: translateX(5px);
}

.mobile-dropdown-content a i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .mobile-menu.active {
        visibility: visible;
        opacity: 1;
    }
}

@media (max-width: 576px) {
    .mobile-menu {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .mobile-link {
        padding: 0.875rem 1rem;
        min-height: 52px;
        font-size: 0.9375rem;
    }
    
    .mobile-link i {
        width: 20px;
        font-size: 1rem;
    }
    
    .mobile-dropdown-content a {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }
}

.back-button {
    position: sticky;
    top: calc(var(--nav-height) + 20px);
    z-index: 100;
    margin-bottom: 20px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.back-btn:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    transform: translateX(-5px);
}

.post-container {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}

.post-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 48px;
}

@media (max-width: 992px) {
    .post-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .post-sidebar {
        order: 2;
    }
}

.post-main {
    min-width: 0;
}

.post-header {
    margin-bottom: 32px;
}

.post-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.post-breadcrumb a {
    color: var(--primary-blue);
    text-decoration: none;
}

.post-breadcrumb a:hover {
    text-decoration: underline;
}

.post-category {
    display: inline-block;
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding: 6px 16px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 20px;
}

.post-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.post-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 16px;
    margin: 40px 0;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 14px;
    overflow: hidden;
    position: relative;
}

.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-featured-image img:hover {
    transform: scale(1.02);
}

.post-featured-image.failed {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.post-featured-image.loading {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

.post-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-primary);
}

.post-content h1 {
    font-size: 40px;
    font-weight: 800;
    margin: 48px 0 24px;
    color: var(--text-primary);
    line-height: 1.2;
}

.post-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--text-primary);
    line-height: 1.3;
}

.post-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-primary);
    line-height: 1.4;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content ul, .post-content ol {
    margin: 24px 0 24px 32px;
}

.post-content li {
    margin-bottom: 12px;
}

.post-content a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s;
}

.post-content a:hover {
    border-bottom-color: var(--primary-blue);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 32px 0;
    display: block;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    background: var(--bg-secondary);
    position: relative;
}

.post-content img:hover {
    transform: scale(1.02);
}

.post-content img.failed {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 14px;
    border: 1px dashed var(--border-color);
}

.post-content p img {
    display: block;
    margin: 32px auto;
    max-height: 500px;
    object-fit: cover;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-blue);
    padding: 24px 32px;
    background: var(--bg-secondary);
    margin: 32px 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.7;
}

.post-content code {
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: var(--text-primary);
}

.post-content pre {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 32px 0;
    border: 1px solid var(--border-color);
}

.post-content pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.youtube-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 40px 0;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    background: #000;
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
}

.download-section {
    margin: 40px 0;
    padding: 32px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 16px;
    border: 2px dashed var(--border-color);
    text-align: center;
}

.download-section h3 {
    margin: 0 0 24px 0;
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.download-btn {
    padding: 14px 28px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.download-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.download-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.download-btn.loading {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.download-btn.ready {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    animation: pulse 2s infinite;
}

.download-btn.completed {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}

.share-section {
    margin: 48px 0;
    padding: 32px;
    background: var(--bg-secondary);
    border-radius: 16px;
    text-align: center;
}

.share-section h3 {
    font-size: 20px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.share-btn {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-twitter { background: #1DA1F2; }
.share-facebook { background: #1877F2; }
.share-linkedin { background: #0A66C2; }
.share-whatsapp { background: #25D366; }
.share-copy { background: var(--text-secondary); }

.post-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 24px);
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s;
}

.sidebar-widget:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: var(--primary-blue);
}

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

.toc-item {
    margin-bottom: 12px;
}

.toc-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

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

.trending-post-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.trending-post-item:last-child {
    border-bottom: none;
}

.trending-post-item:hover {
    transform: translateX(5px);
}

.trending-post-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-secondary);
    position: relative;
}

.trending-post-image.failed {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 10px;
}

.trending-post-content {
    flex: 1;
    min-width: 0;
}

.trending-post-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-post-meta {
    font-size: 12px;
    color: var(--text-tertiary);
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    padding: 6px 14px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.category-tag:hover {
    background: var(--primary-blue);
    color: white;
}

.related-posts {
    margin-top: 64px;
    padding-top: 48px;
    border-top: 2px solid var(--border-color);
}

.related-posts h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.related-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.related-card img.failed {
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 12px;
}

.related-card-content {
    padding: 20px;
}

.related-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.blog-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3.75rem 0 1.875rem;
    margin-top: auto;
    width: 100%;
}

.footer-wrapper {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.footer-top {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3.75rem;
    margin-bottom: 3.75rem;
    width: 100%;
}

@media (max-width: 1200px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.75rem;
    font-weight: 700;
}

.footer-logo i {
    color: var(--primary-blue);
    font-size: 2rem;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.social-link {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 1.125rem;
}

.social-link:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    width: 100%;
}

@media (max-width: 992px) {
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-links {
        grid-template-columns: 1fr;
    }
}

.link-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.link-group a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s, transform 0.2s;
}

.link-group a:hover {
    color: var(--primary-blue);
    transform: translateX(5px);
}

.footer-bottom {
    padding-top: 1.875rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    width: 100%;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

.footer-copyright {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.footer-extra {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.footer-extra i {
    color: var(--accent-pink);
    margin: 0 0.25rem;
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .footer-actions {
        justify-content: center;
    }
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary-blue);
}

.install-footer-btn {
    padding: 0.625rem 1.25rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
    white-space: nowrap;
}

.install-footer-btn:hover {
    transform: translateY(-2px);
}

.back-to-top {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
    visibility: hidden;
}

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

.back-to-top:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.error-state {
    display: none;
    text-align: center;
    padding: 100px 24px;
}

.error-state.show {
    display: block;
}

.error-icon {
    font-size: 64px;
    color: #EF4444;
    margin-bottom: 24px;
}

.error-state h1 {
    font-size: 32px;
    margin-bottom: 16px;
}

.error-state p {
    color: var(--text-secondary);
}

.error-state a {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 24px;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
}

@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .post-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .post-title {
        font-size: 32px;
    }

    .post-featured-image {
        height: 300px;
    }

    .post-content {
        font-size: 16px;
    }

    .post-content h1 {
        font-size: 28px;
    }
    
    .post-content h2 {
        font-size: 24px;
    }

    .share-buttons {
        flex-direction: column;
    }

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

@media (max-width: 576px) {
    .post-layout {
        padding: 32px 16px;
    }

    .post-title {
        font-size: 24px;
    }

    .post-meta {
        flex-direction: column;
        gap: 8px;
    }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 25%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.youtube-channel-widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.youtube-channel-widget .widget-title {
    color: var(--primary-blue);
}

.youtube-channel-widget .widget-title i {
    font-size: 20px;
     color: var(--primary-blue);
}

.youtube-channel-btn {
    background: var(--primary-blue);
    color: white;
}

.youtube-channel-btn:hover {
    background: var(--secondary-dark-blue);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
    color: white;
}

.youtube-channel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

#youtubeWidgetDesc {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-tertiary);
}