

:root {
    
    --primary: #673de6;
    --primary-light: #8b5cf6;
    --primary-dark: #5b21b6;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-code: #1e293b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Inter', var(--font-base);
    --font-mono: 'Monaco', 'Consolas', 'Courier New', monospace;

    --spacing-xs: 0.5rem;
    --spacing-sm: clamp(0.75rem, 1.5vw, 1rem);
    --spacing-md: clamp(1.1rem, 2.1vw, 1.4rem);
    --spacing-lg: clamp(1.4rem, 2.6vw, 1.75rem);
    --spacing-xl: clamp(1.85rem, 3vw, 2.4rem);
    --spacing-2xl: clamp(2.3rem, 4vw, 3rem);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
}

.blog-article-page {
    background: var(--bg-secondary);
    font-family: var(--font-base);
    color: var(--text-primary);
    line-height: 1.75;
}

.blog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: clamp(2rem, 6vw, 3.25rem) 0;
    color: white;
}

.blog-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    opacity: 0.95;
    font-size: 0.95rem;
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-meta-item i {
    opacity: 0.8;
}

.blog-excerpt {
    font-size: 1.15rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-top: var(--spacing-md);
}

.blog-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: clamp(1.75rem, 5vw, 2.5rem) clamp(1rem, 4vw, 1.75rem);
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: clamp(1.5rem, 4vw, 2.75rem);
    align-items: start;
}

.blog-content {
    background: var(--bg-primary);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.blog-content h2 {
    font-family: var(--font-heading);
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.blog-content h2:first-child {
    margin-top: 0;
}

.blog-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
}

.blog-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.blog-content p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.75;
}

.blog-content p:last-child {
    margin-bottom: 0;
}

.blog-content ul,
.blog-content ol {
    margin: var(--spacing-md) 0;
    padding-left: 2rem;
    color: var(--text-secondary);
}

.blog-content ul li,
.blog-content ol li {
    margin-bottom: var(--spacing-sm);
    line-height: 1.75;
}

.blog-content ul li::marker {
    color: var(--primary);
}

.blog-content ol li::marker {
    color: var(--primary);
    font-weight: 600;
}

.blog-content pre {
    background: var(--bg-code);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
}

.blog-content pre code {
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
}

.blog-content code {
    background: #f1f5f9;
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    font-family: var(--font-mono);
    font-weight: 500;
}

.blog-content pre code {
    background: transparent;
    color: #e2e8f0;
    padding: 0;
    font-weight: 400;
}

.code-header {
    background: #334155;
    color: #cbd5e1;
    padding: 0.75rem var(--spacing-md);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-md);
    margin-bottom: 0;
}

.code-header + pre {
    margin-top: 0;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.copy-code-btn {
    background: #475569;
    color: white;
    border: none;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.copy-code-btn:hover {
    background: #64748b;
}

.info-box {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin: var(--spacing-md) 0;
    border-left: 4px solid;
}

.info-box-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box-content {
    font-size: 0.9375rem;
    line-height: 1.6;
}

.info-box.info {
    background: #eff6ff;
    border-left-color: var(--info);
    color: #1e40af;
}

.info-box.success {
    background: #f0fdf4;
    border-left-color: var(--success);
    color: #166534;
}

.info-box.warning {
    background: #fffbeb;
    border-left-color: var(--warning);
    color: #92400e;
}

.info-box.danger {
    background: #fef2f2;
    border-left-color: var(--danger);
    color: #991b1b;
}

.info-box.tip {
    background: #faf5ff;
    border-left-color: var(--primary);
    color: #6b21a8;
}

.blog-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.0625rem;
}

.blog-content blockquote p {
    margin: 0;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
    display: block;
}

.blog-content figure {
    margin: var(--spacing-lg) 0;
}

.blog-content figcaption {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: var(--spacing-sm);
    font-style: italic;
}

.tutorial-step {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border-left: 3px solid var(--primary);
}

.tutorial-step-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.blog-toc {
    position: sticky;
    top: 100px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.blog-toc-title {
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border-color);
}

.blog-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-toc-list li {
    margin-bottom: 0.625rem;
}

.blog-toc-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.5;
    display: block;
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.blog-toc-list a:hover {
    color: var(--primary);
    background: var(--bg-secondary);
    border-left-color: var(--primary);
}

.blog-toc-list a.active {
    color: var(--primary);
    background: #f5f3ff;
    font-weight: 600;
    border-left-color: var(--primary);
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    font-size: 0.9375rem;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.blog-content table thead {
    background: #f8fafc;
}

.blog-content table th {
    padding: 0.875rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.blog-content table td {
    padding: 0.875rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.blog-content table tbody tr:hover {
    background: var(--bg-secondary);
}

.blog-content table tbody tr:last-child td {
    border-bottom: none;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    z-index: 9999;
    transition: width 0.1s ease;
}

.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    gap: 0.5rem; 
    margin-top: var(--spacing-md);
    max-width: 100%;
}

.tutorial-card {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tutorial-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tutorial-card-image {
    width: 100%;
    height: 120px; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.tutorial-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tutorial-featured-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(245, 158, 11, 0.95);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tutorial-card-content {
    padding: 0.6rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tutorial-card-category {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.tutorial-card-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.6em; 
}

.tutorial-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.tutorial-card-title a:hover {
    color: var(--primary);
}

.tutorial-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.7rem;
    line-height: 1.4;
    margin-bottom: 0.4rem;
    flex: 1;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tutorial-card-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.65rem;
    color: var(--text-muted);
}

.tutorial-meta-item {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.tutorial-meta-item i {
    font-size: 0.65rem;
    opacity: 0.7;
}

@media (max-width: 1400px) {
    .tutorial-grid {
        grid-template-columns: repeat(4, 1fr); 
        gap: 0.5rem;
    }
}

@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-toc {
        position: static;
        margin-bottom: var(--spacing-lg);
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .tutorial-grid {
        grid-template-columns: repeat(3, 1fr); 
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .blog-content {
        padding: var(--spacing-md);
    }
    
    .blog-title {
        font-size: 1.75rem;
    }
    
    .blog-content h2 {
        font-size: 1.5rem;
    }
    
    .blog-content h3 {
        font-size: 1.25rem;
    }
    
    .tutorial-grid {
        grid-template-columns: repeat(2, 1fr); 
        gap: 0.5rem;
    }
}

.table-of-contents {
    position: sticky;
    top: 90px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    max-height: calc(100vh - 120px);
    overflow: hidden;
    transition: all 0.3s ease;
}

.table-of-contents:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.toc-title {
    font-weight: 700;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
    padding: 1.25rem 1.5rem;
    margin: 0;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: #fafbfc;
}

.toc-title i {
    font-size: 1rem;
    color: #6366f1;
}

.table-of-contents > div:last-child {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding: 0.75rem 0;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents > ul {
    padding: 0.5rem 0;
}

.table-of-contents ul li {
    margin: 0;
    position: relative;
}

.table-of-contents > ul > li > a {
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.6;
    display: flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.table-of-contents > ul > li > a:hover {
    color: #6366f1;
    background: #f9fafb;
    border-left-color: #6366f1;
}

.table-of-contents > ul > li > a.active {
    color: #6366f1;
    background: #eff6ff;
    border-left-color: #6366f1;
    font-weight: 600;
}

.table-of-contents > ul > li > a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #d1d5db;
    border-radius: 50%;
    margin-right: 0.75rem;
    transition: all 0.2s ease;
}

.table-of-contents > ul > li > a:hover::before,
.table-of-contents > ul > li > a.active::before {
    background: #6366f1;
    transform: scale(1.3);
}

.table-of-contents ul ul {
    margin: 0.25rem 0 0.5rem 0;
    padding-left: 0;
    border-left: 1px solid #f3f4f6;
    margin-left: 1.5rem;
}

.table-of-contents ul ul li a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.8125rem;
    line-height: 1.6;
    display: block;
    padding: 0.375rem 1rem 0.375rem 1.25rem;
    transition: all 0.2s ease;
    font-weight: 400;
    position: relative;
}

.table-of-contents ul ul li a::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: #d1d5db;
    font-size: 1rem;
    line-height: 1;
}

.table-of-contents ul ul li a:hover {
    color: #6366f1;
    background: #f9fafb;
}

.table-of-contents ul ul li a:hover::before {
    color: #6366f1;
}

.table-of-contents ul ul li a.active {
    color: #6366f1;
    background: #f9fafb;
    font-weight: 500;
}

.table-of-contents ul ul li a.active::before {
    color: #6366f1;
    content: '→';
}

.table-of-contents ul ul ul {
    margin-left: 0.75rem;
    border-left-color: #f9fafb;
}

.table-of-contents ul ul ul li a {
    font-size: 0.75rem;
    color: #9ca3af;
    padding-left: 1.5rem;
}

.table-of-contents ul ul ul li a::before {
    content: '◦';
    font-size: 0.875rem;
}

.table-of-contents::-webkit-scrollbar {
    width: 4px;
}

.table-of-contents::-webkit-scrollbar-track {
    background: transparent;
}

.table-of-contents::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

.table-of-contents::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

.table-of-contents::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: var(--scroll-indicator, 0%);
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 10px 0 0 10px;
    transition: height 0.15s ease;
}

@media (max-width: 991px) {
    .table-of-contents {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
        max-height: 400px;
        overflow-y: auto;
    }
    
    .table-of-contents > div:last-child {
        max-height: 350px;
    }
}

@media (max-width: 768px) {
    .toc-title {
        padding: 1rem 1.25rem;
        font-size: 0.625rem;
    }
    
    .table-of-contents > ul > li > a {
        font-size: 0.8125rem;
        padding: 0.5rem 1.25rem;
    }
    
    .table-of-contents ul ul li a {
        font-size: 0.75rem;
        padding: 0.375rem 1rem;
    }
}

@keyframes toc-fade-in {
    from {
        opacity: 0;
        transform: translateX(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.table-of-contents ul li {
    animation: toc-fade-in 0.3s ease-out backwards;
}

.table-of-contents ul li:nth-child(1) { animation-delay: 0.05s; }
.table-of-contents ul li:nth-child(2) { animation-delay: 0.1s; }
.table-of-contents ul li:nth-child(3) { animation-delay: 0.15s; }
.table-of-contents ul li:nth-child(4) { animation-delay: 0.2s; }
.table-of-contents ul li:nth-child(5) { animation-delay: 0.25s; }

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .software-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 992px) {
    .software-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .software-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

.grid-item {
    display: flex;
    flex-direction: column;
}

.post-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-image-link {
    text-decoration: none;
    display: block;
}

.post-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2);
    aspect-ratio: 16/10;
    max-height: 220px;
}

.post-thumbnail {
    width: 100%;
    height: 100%;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.post-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: var(--primary);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
}

.post-meta .small {
    font-size: 0.75rem;
}

.post-meta i {
    font-size: 0.7rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-primary-custom {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sort-controls {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.sort-controls h5 {
    font-weight: 600;
    color: var(--text-primary);
}

.sort-controls .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.sort-controls .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(103, 61, 230, 0.1);
    outline: none;
}

.sidebar {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sidebar h5 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
}

.related-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.related-category:hover {
    background: var(--bg-secondary);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: var(--radius-sm);
}

.related-category span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.related-category small {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 12px;
}

.related-category:hover small {
    background: var(--primary);
    color: white;
}

@media (max-width: 991px) {
    .software-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .sort-controls {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .software-grid {
        grid-template-columns: 1fr;
    }
    
    .post-card {
        max-width: 100%;
    }
    
    .sort-controls .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .sort-controls .col-md-6 {
        width: 100%;
    }
}

.category-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 0 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,149.3C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.category-header .container {
    position: relative;
    z-index: 1;
}

.category-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
}

.category-hero-content p {
    font-size: 1.125rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.category-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-label {
    font-size: 0.8125rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
}

.pagination .page-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 768px) {
    .category-header {
        padding: 2rem 0 1.5rem;
    }
    
    .category-hero-content h1 {
        font-size: 1.75rem;
    }
    
    .category-hero-content p {
        font-size: 1rem;
    }
    
    .category-stats {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}
