/* CSS Variables - Light Theme (Default) */
/* Last updated: 2025-10-28 - v1.4.2 */
:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f5f5f5;
    --accent-color: #0066cc;
    --text-color: #333333;
    --secondary-text: #666666;
    --card-bg: #ffffff;
    --card-border: #e0e0e0;
    --cert-highlight: #e3f2fd;
    --hover-bg: #f0f0f0;
    --code-bg: #f4f4f4;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--accent-color);
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 220px;
    max-width: 360px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-left-color: #28a745; }
.toast.error { border-left-color: #dc3545; }
.toast .toast-title { font-weight: 700; margin-right: 8px; }

/* Dark Theme */
[data-theme="dark"] {
    --primary-bg: #1a1a1a;
    --secondary-bg: #2c2c2c;
    --accent-color: #00d4ff;
    --text-color: #e0e0e0;
    --secondary-text: #a0a0a0;
    --card-bg: #252525;
    --card-border: #3c3c3c;
    --cert-highlight: #1e4d5a;
    --hover-bg: #333333;
    --code-bg: #1e1e1e;
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Page Load Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-content,
.hero,
section {
    animation: fadeIn 0.6s ease-out;
}

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--secondary-bg) 0%,
        var(--hover-bg) 50%,
        var(--secondary-bg) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

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

.skeleton-text {
    height: 1rem;
    margin: 0.5rem 0;
}

.skeleton-title {
    height: 2rem;
    width: 60%;
    margin: 1rem 0;
}

.skeleton-card {
    height: 200px;
    margin: 1rem 0;
}

/* Smooth Transitions */
a,
button,
.article-card,
.topic-card,
.command-card,
.solution-card,
.stat-card,
.link-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover Effects Enhancement */
.article-card:hover,
.topic-card:hover,
.command-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Button Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-effect:active::after {
    width: 200px;
    height: 200px;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--secondary-bg);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Pulse Animation for Notifications */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Slide In Animation */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInFromLeft 0.5s ease-out;
}

.slide-in-right {
    animation: slideInFromRight 0.5s ease-out;
}

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--secondary-bg);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    min-height: 60px;
}

/* Join Community Button Styling */
.join-community-btn {
    margin-left: 1.5rem;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    background: var(--accent-color);
    color: var(--primary-bg);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px var(--shadow);
    transition: background 0.2s, transform 0.2s;
    align-self: center;
    vertical-align: middle;
}
.join-community-btn:hover {
    background: #00b0d6;
    transform: scale(1.05);
}

/* User menu (logged-in navbar) */
.user-menu { position: relative; display: inline-flex; align-items: center; }
.user-menu .join-community-btn { gap: 0.5rem; }
.user-menu .join-community-btn { position: relative; }
.user-avatar-chip {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--primary-bg); color: var(--accent-color);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; text-transform: uppercase;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
    background-size: cover; background-position: center; background-repeat: no-repeat;
}
.user-name { white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.user-menu-toggle {
    margin-left: 6px; background: var(--card-bg); border: 1px solid var(--card-border);
    color: var(--text-color); border-radius: 6px; padding: 6px 8px; cursor: pointer;
}
.user-menu-toggle:hover { background: var(--hover-bg); }
.user-menu-toggle i { transition: transform 0.2s ease; }
.user-menu.menu-open .user-menu-toggle i { transform: rotate(180deg); }
.user-menu-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; min-width: 180px;
    background: var(--secondary-bg); border: 1px solid var(--card-bg); border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.25); padding: 6px; display: none; z-index: 150;
}
.user-menu-dropdown.open { display: block; }
.user-menu-dropdown a, .user-menu-dropdown button {
    width: 100%; text-align: left; background: transparent; border: none; color: var(--text-color);
    padding: 0.6rem 0.75rem; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 0.5rem;
}
.user-menu-dropdown a:hover, .user-menu-dropdown button:hover { background: var(--card-bg); }
.user-menu-dropdown .count-pill {
    margin-left: auto; background: #ff4d4f; color: #fff; border-radius: 999px; padding: 0.05rem 0.45rem; font-size: 0.8rem; font-weight: 700;
}

/* Tiny unread dot */
.user-unread-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff4d4f; /* red */
    box-shadow: 0 0 0 2px var(--secondary-bg);
    display: none;
}

.logo h1 {
    color: var(--accent-color);
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.logo i {
    margin-right: 0.5rem;
}

/* Ensure the logo remains styled the same when wrapped in a link */
.logo h1 a {
    color: var(--accent-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.logo h1 a:visited,
.logo h1 a:hover,
.logo h1 a:active,
.logo h1 a:focus,
.logo h1 a:focus-visible {
    color: var(--accent-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
    position: relative;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.nav-links i {
    margin-right: 0.4rem;
    font-size: 0.9rem;
}

/* Theme Toggle Button */
#theme-toggle {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

#theme-toggle:hover {
    background: var(--hover-bg);
    transform: scale(1.05);
}

#theme-toggle .theme-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Search Bar */
.search-container {
    position: relative;
    margin-left: 2rem;
}

.search-bar {
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    width: 200px;
    transition: width 0.3s ease;
}

.search-bar:focus {
    width: 300px;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--secondary-bg);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-result-item {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: var(--card-bg);
    color: var(--accent-color);
}

.result-title {
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.result-type {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--accent-color);
    background: rgba(0, 212, 255, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    border: 1px solid var(--accent-color);
}

.search-result-item.selected {
    background: linear-gradient(90deg, rgba(0,212,255,0.08), rgba(0,212,255,0.03));
    border-left: 4px solid var(--accent-color);
    color: var(--accent-color);
}

.result-excerpt {
    font-size: 0.9rem;
    color: var(--secondary-text);
    margin-top: 4px;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: var(--secondary-text);
}

/* Dropdown styles */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--secondary-bg);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 101;
    border-radius: 4px;
    border: 1px solid var(--card-bg);
    top: 100%;
    left: 0;
    padding: 0.5rem 0;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

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

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

.dropdown > a::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 0.5rem;
}

/* Hero Section */
.hero {
    /* Use a fallback gradient if the image fails to load */
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1518770660439-4636190af475?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle animation for the hero background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.1), rgba(0, 0, 0, 0.7));
    animation: gradientShift 10s ease infinite;
}

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

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 2.5rem; /* Reduced from 3rem to fit better */
    margin-bottom: 1rem;
    color: var(--accent-color);
    white-space: nowrap; /* Ensure the heading stays on one line */
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5); /* Add a glowing effect */
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--primary-bg);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button i {
    margin-right: 0.5rem;
}

.cta-button:hover {
    background-color: #00b0d6;
    transform: scale(1.05); /* Subtle zoom effect on hover */
}

/* Articles Section */
.articles {
    padding: 4rem 2rem;
    background-color: var(--primary-bg);
}

.articles h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

.article-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0;
    width: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.article-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.article-card i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.article-card p {
    color: var(--secondary-text);
    margin-bottom: 1rem;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

/* Technical Diagrams */
.technical-diagram {
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.diagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.diagram-item {
    background: var(--secondary-bg);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--accent-color);
}

.diagram-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.diagram-item h4 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.diagram-item p {
    font-size: 0.9rem;
    color: var(--secondary-text);
}

/* Code blocks for technical content */
.code-block {
    background: var(--secondary-bg);
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: monospace;
    position: relative;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    color: var(--text-color);
}

.code-block .code-label {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-color);
    color: var(--primary-bg);
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    border-bottom-left-radius: 4px;
}

/* Reading Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 0.1s ease;
}

/* Article Content Page */
.article-content {
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--primary-bg);
}

.article-meta-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 1rem 0;
    color: var(--secondary-text);
    font-size: 0.9rem;
}

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

.meta-item i {
    color: var(--accent-color);
}

.table-of-contents {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid var(--accent-color);
}

.table-of-contents h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

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

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

.toc-list a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-list a:hover {
    color: var(--accent-color);
}

.toc-list a::before {
    content: "•";
    color: var(--accent-color);
}

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

.article-header h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.article-header i {
    margin-right: 0.5rem;
}

.article-meta {
    color: var(--secondary-text);
    font-style: italic;
}

.reading-time-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.4rem 1rem;
    background: var(--accent-color);
    color: var(--primary-bg);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    font-style: normal;
}

.reading-time-badge i {
    margin-right: 0.3rem;
}

/* Social Share Buttons */
.share-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--secondary-bg);
    border-radius: 10px;
    border: 1px solid var(--card-border);
}

.share-label {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 0.5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.share-twitter:hover {
    background: #1a8cd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.4);
}

.share-facebook {
    background: #4267B2;
    color: white;
}

.share-facebook:hover {
    background: #365899;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 103, 178, 0.4);
}

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

.share-linkedin:hover {
    background: #006097;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.4);
}

.share-copy {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--accent-color);
    cursor: pointer;
}

.share-copy:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.4);
}

.share-copy.copied {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
}

/* Table of Contents */
.toc-container {
    background: var(--secondary-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: sticky;
    top: 80px;
    z-index: 50;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.toc-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-color);
}

.toc-header h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.toc-item {
    margin: 0.5rem 0;
}

.toc-h2 {
    margin-left: 0;
}

.toc-h3 {
    margin-left: 1.5rem;
    font-size: 0.95rem;
}

.toc-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    display: block;
    border-radius: 6px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.toc-link:hover {
    background: var(--hover-bg);
    border-left-color: var(--accent-color);
    padding-left: 1rem;
}

.toc-link.active {
    background: var(--accent-color);
    color: var(--primary-bg);
    font-weight: 600;
    border-left-color: var(--accent-color);
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: var(--secondary-bg);
    padding: 1rem 2rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid var(--card-border);
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 600;
}

.breadcrumb-separator {
    margin: 0 0.75rem;
    color: var(--secondary-text);
}

.article-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 2rem;
    border: 2px solid var(--accent-color);
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
    background: var(--secondary-bg) center/cover no-repeat;
}

.article-body {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.article-body h2 {
    font-size: 1.8rem;
    color: var(--accent-color);
    margin: 1rem 0;
}

.article-body p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Step-by-step list styling (for tutorials / how-tos) */
.steps {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.steps .step {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
    border: 1px solid rgba(255,255,255,0.03);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
}

.steps .step::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: var(--primary-bg);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.steps .step h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--accent-color);
}

.steps .step p {
    margin: 0.25rem 0 0;
    color: var(--text-color);
}

/* Small utility for quick step lists used on informational pages */
.quick-steps {
    margin-top: 1rem;
}

.quick-steps ol {
    padding-left: 1.25rem;
    color: var(--text-color);
}

/* Related Articles Section */
.related-articles {
    margin-bottom: 2rem;
}

.related-articles h2 {
    font-size: 2rem;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.back-link i {
    margin-right: 0.5rem;
}

.back-link:hover {
    background-color: rgba(0, 212, 255, 0.1);
}

/* Community Page UI */
.community-page .note {
    color: var(--secondary-text);
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.topic-form {
    background: var(--card-bg);
    border: 1px solid var(--accent-color);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.topic-form h2 { color: var(--accent-color); margin-bottom: 0.75rem; }

.form-row { display: grid; grid-template-columns: 1fr 2fr; gap: 0.75rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { color: var(--secondary-text); font-size: 0.9rem; }
.form-group input, .form-group textarea, .form-group select, .comment-form input[type="text"] {
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--card-bg);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
}

.form-actions { display: flex; justify-content: flex-end; margin-top: 0.75rem; }
.pill { border: 1px solid var(--accent-color); color: var(--accent-color); background: transparent; padding: 0.4rem 0.8rem; border-radius: 20px; cursor: pointer; }
.pill:hover { background: rgba(0,212,255,0.1); }

.topic-tools { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.topic-tools .spacer { flex: 1; }
.topic-tools { justify-content: space-between; }
.topic-tools .tool-left { display:flex; gap:0.5rem; align-items:center; }
.topic-tools .tool-right { display:flex; gap:0.5rem; align-items:center; }

#topic-search {
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--card-bg);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    min-width: 220px;
}

#topic-sort {
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--card-bg);
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
}

.topic-list { display: grid; gap: 1rem; }
.topic-card { background: var(--card-bg); border: 1px solid var(--accent-color); border-radius: 10px; padding: 1rem; }
.topic-card.unread { border-left: 4px solid #ff4d4f; box-shadow: 0 0 0 1px rgba(255,77,79,0.15) inset; }
.topic-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.topic-title { color: var(--accent-color); font-size: 1.2rem; margin: 0; }
.topic-meta { color: var(--secondary-text); font-size: 0.9rem; display: flex; gap: 1rem; align-items: center; }
.topic-body { margin-top: 0.5rem; white-space: pre-wrap; }

/* Vote Buttons */
.vote-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--secondary-bg);
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    border: 1px solid var(--card-border);
}

.vote-btn {
    background: transparent;
    border: none;
    color: var(--secondary-text);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.vote-btn:hover {
    background: var(--hover-bg);
    transform: scale(1.1);
}

.vote-btn.active {
    color: var(--accent-color);
}

.vote-btn.upvote.active {
    color: #4caf50;
}

.vote-btn.downvote.active {
    color: #f44336;
}

.vote-count {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    color: var(--text-color);
    font-size: 0.95rem;
}

.vote-score.positive {
    color: #4caf50;
}

.vote-score.negative {
    color: #f44336;
}

.comment-section { margin-top: 0.75rem; }
.comment-section details { background: var(--secondary-bg); border-radius: 8px; padding: 0.5rem 0.75rem; border: 1px solid var(--card-bg); }
.comment-section summary { cursor: pointer; color: var(--accent-color); }
.comments { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
.comment { background: var(--card-bg); border: 1px solid var(--card-bg); border-radius: 6px; padding: 0.6rem 0.75rem; }
.comment-meta { color: var(--secondary-text); display: flex; gap: 1rem; font-size: 0.85rem; margin-bottom: 0.25rem; }

.comment-form .form-row { grid-template-columns: 1fr 2fr auto; align-items: center; }

.pill.tiny { font-size: 0.8rem; padding: 0.2rem 0.5rem; border-radius: 12px; }

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

.topic-highlight { box-shadow: 0 0 0 2px var(--accent-color) inset; }

@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .comment-form .form-row { grid-template-columns: 1fr; gap: 0.5rem; }
    .topic-header { flex-direction: column; align-items: flex-start; }
    #topic-search { min-width: 0; width: 100%; }
}

/* Projects Section */
.projects {
    padding: 4rem 2rem;
    background-color: var(--secondary-bg);
}

.projects h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.certifications {
    padding: 4rem 2rem;
    background-color: var(--primary-bg);
}

.certifications h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    color: var(--accent-color);
}

.project-card h3 i {
    margin-right: 0.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tech-tag {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    border: 1px solid var(--accent-color);
}

/* Certification Cards */
.cert-card {
    background-color: var(--cert-highlight);
    border: 2px solid var(--accent-color);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.cert-card::before {
    content: '★';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    color: var(--accent-color);
    opacity: 0.7;
}

.cert-image {
    max-width: 100px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 5px rgba(0, 212, 255, 0.5));
}

.cert-card h3 {
    color: var(--accent-color);
    font-size: 1.6rem;
    text-transform: uppercase;
}

.cert-card p {
    font-style: italic;
    color: var(--secondary-text);
}

/* Community Section */
.community {
    padding: 4rem 2rem;
    text-align: center;
    background-color: var(--primary-bg);
}

.community h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.community h2 i {
    margin-right: 0.5rem;
}

.community p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--secondary-text);
}

.forum-placeholder {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    max-width: 600px;
    margin: 0 auto;
}


/* Home: Top Topics showcase - matching Community page card style */
.top-topics { max-width: 1200px; margin: 0 auto; padding: 0 1rem; text-align: left; }
.top-topics h3 { color: var(--accent-color); margin: 1.5rem 0 1rem; font-size: 1.8rem; display: flex; align-items: center; gap: 0.5rem; justify-content: center; }
.topic-pair-grid { display: grid; gap: 1rem; }

/* Reuse the topic-card styles from community page for home page cards */
.top-topics .topic-card { 
    background: var(--card-bg); 
    border: 1px solid var(--accent-color); 
    border-radius: 10px; 
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.top-topics .topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}
.top-topics .topic-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.top-topics .topic-title { color: var(--accent-color); font-size: 1.2rem; margin: 0; }
.top-topics .topic-title a { color: var(--accent-color); text-decoration: none; transition: color 0.3s ease; }
.top-topics .topic-title a:hover { color: #00b0d6; }
.top-topics .topic-meta { color: var(--secondary-text); font-size: 0.9rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.top-topics .topic-body { margin-top: 0.5rem; white-space: pre-wrap; color: var(--text-color); }
.top-topics .comment-section { margin-top: 0.75rem; }
.top-topics .comment-section details { background: var(--secondary-bg); border-radius: 8px; padding: 0.5rem 0.75rem; border: 1px solid var(--card-bg); }
.top-topics .comment-section summary { cursor: pointer; color: var(--accent-color); }
.top-topics .comments { display: grid; gap: 0.5rem; margin-top: 0.5rem; }
.top-topics .comment { background: var(--card-bg); border: 1px solid var(--card-bg); border-radius: 6px; padding: 0.6rem 0.75rem; }
.top-topics .comment-meta { color: var(--secondary-text); display: flex; gap: 1rem; font-size: 0.85rem; margin-bottom: 0.25rem; }
.top-topics .comment-body { color: var(--text-color); white-space: pre-wrap; }

@media (max-width: 820px) {
    .topic-pair-grid { grid-template-columns: 1fr; }
    .top-topics .topic-header { flex-direction: column; align-items: flex-start; }
}

/* Cheat Sheet Page Styles */
.cheat-sheet-page { max-width: 1400px; }

.cheat-filter-bar {
    display: flex;
    gap: 1rem;
    margin: 2rem 0 3rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#cheat-search {
    flex: 1;
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    transition: box-shadow 0.3s ease;
}

#cheat-search:focus {
    outline: none;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

#cheat-category {
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    padding: 0.85rem 1.25rem;
    min-width: 220px;
    font-size: 1rem;
    cursor: pointer;
}

.cheat-section {
    margin: 4rem 0;
    padding: 2.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 2px solid var(--accent-color);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Different colors for each section category */
.cheat-section[data-category="cmd"] {
    border-color: #ff6b6b;
}

.cheat-section[data-category="cmd"] h2 {
    color: #ff6b6b;
}

.cheat-section[data-category="powershell"] {
    border-color: #4ecdc4;
}

.cheat-section[data-category="powershell"] h2 {
    color: #4ecdc4;
}

.cheat-section[data-category="linux"] {
    border-color: #95e1d3;
}

.cheat-section[data-category="linux"] h2 {
    color: #95e1d3;
}

.cheat-section[data-category="networking"] {
    border-color: #ffa07a;
}

.cheat-section[data-category="networking"] h2 {
    color: #ffa07a;
}

.cheat-section[data-category="git"] {
    border-color: #f38181;
}

.cheat-section[data-category="git"] h2 {
    color: #f38181;
}

.cheat-section[data-category="troubleshooting"] {
    border-color: #aa96da;
}

.cheat-section[data-category="troubleshooting"] h2 {
    color: #aa96da;
}

.cheat-section h2 {
    color: var(--accent-color);
    margin-bottom: 2.5rem;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid currentColor;
}

.cheat-group {
    margin: 3rem 0;
}

.cheat-group h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border-left: 4px solid var(--accent-color);
    border-radius: 6px;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.command-card {
    background: var(--secondary-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.command-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.25);
    border-color: var(--accent-color);
}

.command-title {
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 1rem;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.command-title::before {
    content: "▸";
    color: var(--accent-color);
    font-size: 1.2rem;
}

.command-code {
    background: var(--primary-bg);
    color: #00ff88;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    margin: 1rem 0;
    border: 1px solid rgba(0, 255, 136, 0.3);
    word-break: break-all;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
}

.command-code-wrapper {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--accent-color);
    color: var(--primary-bg);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    opacity: 0;
    z-index: 10;
}

.command-card:hover .copy-btn,
.solution-card:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: #4caf50;
    opacity: 1 !important;
}

.copy-btn.copied::after {
    content: " ✓";
}

.command-desc {
    color: var(--secondary-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 0.75rem;
}

.solution-group {
    display: grid;
    gap: 2rem;
}

.solution-card {
    background: var(--secondary-bg);
    border: 2px solid rgba(170, 150, 218, 0.5);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(170, 150, 218, 0.3);
    border-color: #aa96da;
}

.solution-card h3 {
    color: #aa96da;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    padding: 0;
    background: none;
}

.solution-steps {
    color: var(--text-color);
}

.solution-steps ol {
    padding-left: 2rem;
    line-height: 2;
}

.solution-steps li {
    margin: 1rem 0;
    color: var(--text-color);
}

.solution-steps code {
    background: var(--primary-bg);
    color: #00ff88;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(0, 255, 136, 0.3);
    display: inline-block;
    margin: 0.25rem 0;
}

@media (max-width: 768px) {
    .cheat-filter-bar {
        flex-direction: column;
    }
    
    #cheat-category {
        min-width: 100%;
    }
    
    .command-grid {
        grid-template-columns: 1fr;
    }
    
    .cheat-section {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .cheat-section h2 {
        font-size: 1.8rem;
    }
}/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent-color);
    color: var(--primary-bg);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

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

.back-to-top:hover {
    background: #00b0d6;
}

/* Footer */
footer {
    background-color: var(--secondary-bg);
    text-align: center;
    padding: 2rem 1rem;
    color: var(--secondary-text);
    margin-top: 4rem;
    border-top: 1px solid var(--card-bg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.footer-section {
    padding: 0 1rem;
}

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

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

.footer-section a {
    color: var(--secondary-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-bg);
}

.social-links a {
    color: var(--accent-color);
    margin: 0 0.5rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    color: #00b0d6;
    transform: translateY(-2px);
}

.copyright {
    margin-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* About Page Specific Styles */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.milestone-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--accent-color);
    transition: transform 0.3s ease;
}

.milestone-card:hover {
    transform: translateY(-5px);
}

.milestone-card h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.milestone-card .date {
    color: var(--secondary-text);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.skills-section {
    margin: 2rem 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.skill-item {
    background: var(--secondary-bg);
    padding: 0.8rem;
    border-radius: 4px;
    text-align: center;
    border: 1px solid var(--accent-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .navbar {
        padding: 1rem;
    }

    .search-container {
        order: 3;
        width: 100%;
        margin: 1rem 0 0 0;
    }

    .search-bar {
        width: 100%;
        max-width: none;
    }

    .search-bar:focus {
        width: 100%;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .article-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        gap: 1rem;
    }

    .logo {
        width: 100%;
        text-align: center;
    }

    .logo h1 {
        justify-content: center;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }

    .nav-links li {
        margin: 0 0.5rem;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.5rem;
    }

    .dropdown-content {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 50vh;
        overflow-y: auto;
    }

    .hero h2 {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
        white-space: normal;
        padding: 0 1rem;
    }

    .hero p {
        font-size: clamp(0.9rem, 2vw, 1.2rem);
        padding: 0 1rem;
    }

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

    .article-header h1 {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }

    .article-body h2 {
        font-size: clamp(1.2rem, 3vw, 1.8rem);
    }

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

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

    .footer-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        flex-direction: column;
        align-items: center;
    }

    .nav-links li {
        margin: 0.5rem 0;
        width: 100%;
        text-align: center;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        width: 100%;
        max-height: none;
    }

    .hero {
        height: auto;
        min-height: 60vh;
    }

    .article-card {
        margin: 0.5rem;
    }
}

/* Print Styles */
@media print {
    /* Hide non-essential elements */
    .navbar,
    .search-container,
    .hero,
    .share-buttons,
    .toc-container,
    footer,
    .back-link,
    .related-articles,
    .cta-button,
    .copy-btn,
    .delete-topic,
    .delete-comment,
    .comment-form,
    #theme-toggle {
        display: none !important;
    }

    /* Reset colors for print */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Page setup */
    @page {
        margin: 2cm;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    /* Article content */
    .article-content {
        width: 100%;
        max-width: none;
        padding: 0;
    }

    .article-header h1 {
        font-size: 24pt;
        color: black !important;
        border-bottom: 2px solid black;
        padding-bottom: 0.5rem;
    }

    .article-meta,
    .reading-time-badge {
        font-size: 10pt;
        color: #666 !important;
    }

    .article-body {
        background: white !important;
        border: none !important;
    }

    .article-body h2 {
        font-size: 16pt;
        margin-top: 1.5rem;
        page-break-after: avoid;
    }

    .article-body h3 {
        font-size: 14pt;
        margin-top: 1rem;
        page-break-after: avoid;
    }

    .article-body p,
    .article-body li {
        font-size: 12pt;
        orphans: 3;
        widows: 3;
    }

    .article-body ul,
    .article-body ol {
        page-break-inside: avoid;
    }

    /* Code blocks */
    .command-code,
    code,
    pre {
        border: 1px solid #ccc !important;
        background: #f5f5f5 !important;
        color: black !important;
        padding: 0.5rem !important;
        page-break-inside: avoid;
        font-family: 'Courier New', monospace;
    }

    /* Links */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
    }

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    /* Images */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    .article-image {
        border: 1px solid #ccc !important;
    }

    /* Cheat Sheet specific */
    .cheat-section {
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }

    .command-card,
    .solution-card {
        border: 1px solid #ccc !important;
        background: white !important;
        padding: 1rem !important;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }

    .command-title,
    .solution-title {
        font-weight: bold;
        font-size: 12pt;
    }
}

/* Markdown Editor Styles */
.markdown-editor {
    position: relative;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg);
}

.markdown-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--card-border);
}

.markdown-toolbar button {
    padding: 6px 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.2s;
}

.markdown-toolbar button:hover {
    background: var(--hover-bg);
    border-color: var(--accent-color);
}

.markdown-editor textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: none;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    resize: vertical;
    background: var(--card-bg);
    color: var(--text-color);
}

.markdown-preview-container {
    min-height: 200px;
    max-height: 600px;
    overflow-y: auto;
    padding: 12px;
    background: var(--card-bg);
}

.markdown-preview {
    line-height: 1.6;
}

.markdown-preview h1 { font-size: 2em; margin: 0.67em 0; }
.markdown-preview h2 { font-size: 1.5em; margin: 0.75em 0; }
.markdown-preview h3 { font-size: 1.17em; margin: 0.83em 0; }

.markdown-preview p {
    margin: 1em 0;
}

.markdown-preview code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.markdown-preview pre {
    background: var(--code-bg);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1em 0;
}

.markdown-preview pre code {
    background: none;
    padding: 0;
}

.markdown-preview blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 16px;
    margin: 1em 0;
    color: var(--secondary-text);
}

.markdown-preview ul, .markdown-preview ol {
    margin: 1em 0;
    padding-left: 2em;
}

.markdown-preview a {
    color: var(--accent-color);
    text-decoration: none;
}

.markdown-preview a:hover {
    text-decoration: underline;
}

.markdown-counter {
    padding: 6px 12px;
    font-size: 12px;
    color: var(--secondary-text);
    background: var(--secondary-bg);
    border-top: 1px solid var(--card-border);
    text-align: right;
}

/* Notification UI Styles */
.notification-container {
    position: relative;
    display: inline-block;
    margin-left: auto;
}

.notification-bell {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-color);
    transition: color 0.2s;
}

.notification-bell:hover {
    color: var(--accent-color);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

.notification-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    width: 360px;
    max-width: 90vw;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 1000;
    max-height: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
}

.mark-all-read:hover {
    text-decoration: underline;
}

.notification-list {
    overflow-y: auto;
    max-height: 400px;
}

.notification-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--secondary-text);
    font-size: 14px;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
    transition: background 0.2s;
}

.notification-item:hover {
    background: var(--hover-bg);
}

.notification-item.unread {
    background: var(--cert-highlight);
}

.notification-content {
    flex: 1;
}

.notification-content strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-color);
}

.notification-content p {
    margin: 0;
    font-size: 13px;
    color: var(--secondary-text);
    line-height: 1.4;
}

.notification-time {
    display: block;
    font-size: 12px;
    color: var(--secondary-text);
    margin-top: 4px;
}

.notification-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}

.notification-link {
    font-size: 13px;
    color: var(--accent-color);
    text-decoration: none;
    padding: 4px 8px;
}

.notification-link:hover {
    text-decoration: underline;
}

.mark-read-btn,
.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 16px;
    color: var(--secondary-text);
    transition: color 0.2s;
}

.mark-read-btn:hover {
    color: #28a745;
}

.delete-btn:hover {
    color: #dc3545;
}

/* ==================== Voting Styles ==================== */

.vote-widget {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
}

.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 18px;
    color: var(--secondary-text);
    transition: all 0.2s;
    border-radius: 4px;
}

.vote-btn:hover {
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary-color);
}

.vote-btn.active.vote-up {
    color: #28a745;
}

.vote-btn.active.vote-down {
    color: #dc3545;
}

.vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vote-score {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    min-width: 30px;
    text-align: center;
}

/* Reputation badge */
.reputation-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.reputation-badge i {
    font-size: 10px;
}

/* Badge display */
.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge i {
    font-size: 14px;
}

.badge.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #8b5a2b 100%);
    color: white;
}

.badge.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
    color: white;
}

.badge.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #333;
}

.badge.platinum {
    background: linear-gradient(135deg, #e5e4e2 0%, #a8a8a8 100%);
    color: #333;
}

/* Leaderboard */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.leaderboard-table th {
    background: var(--card-bg);
    font-weight: 600;
    color: var(--primary-color);
}

.leaderboard-table tr:hover {
    background: rgba(0, 217, 255, 0.05);
}

.leaderboard-rank {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
}

.leaderboard-rank.top3 {
    font-size: 24px;
}

.leaderboard-rank.rank-1 {
    color: #ffd700;
}

.leaderboard-rank.rank-2 {
    color: #c0c0c0;
}

.leaderboard-rank.rank-3 {
    color: #cd7f32;
}

.leaderboard-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.leaderboard-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--secondary-text);
}

/* ==================== File Upload Styles ==================== */

.file-uploader {
    margin: 1rem 0;
}

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary-color);
    background: rgba(0, 217, 255, 0.05);
}

.upload-zone i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.upload-zone p {
    color: var(--secondary-text);
    margin: 0;
}

.browse-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.file-item.complete {
    background: rgba(40, 167, 69, 0.1);
}

.file-item.error {
    background: rgba(220, 53, 69, 0.1);
}

.file-preview {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview i {
    font-size: 32px;
    color: var(--secondary-text);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    margin-bottom: 4px;
    word-break: break-word;
}

.file-size {
    font-size: 12px;
    color: var(--secondary-text);
}

.file-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.file-progress .progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.file-progress .progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

.file-progress .progress-text {
    font-size: 12px;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

.file-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--secondary-text);
    font-size: 18px;
    transition: color 0.2s;
}

.file-remove:hover {
    color: #dc3545;
}

.attachment-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin: 1rem 0;
}

.attachment-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg);
    cursor: pointer;
    transition: transform 0.2s;
}

.attachment-item:hover {
    transform: scale(1.05);
}

.attachment-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.attachment-file {
    padding: 20px;
    text-align: center;
}

.attachment-file i {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.attachment-name {
    font-size: 12px;
    word-break: break-word;
}

/* ==================== PWA Styles ==================== */

.pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--card-bg);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    max-width: 90%;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.install-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.install-content i {
    font-size: 24px;
    color: var(--primary-color);
}

.install-actions {
    display: flex;
    gap: 8px;
}

.install-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.install-btn:hover {
    background: #00b8d4;
    transform: translateY(-2px);
}

.dismiss-btn {
    background: none;
    border: none;
    color: var(--secondary-text);
    cursor: pointer;
    padding: 8px;
    font-size: 18px;
    transition: color 0.2s;
}

.dismiss-btn:hover {
    color: var(--text-color);
}

.pwa-update-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--card-bg);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

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

.update-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.update-content i {
    font-size: 20px;
    color: var(--primary-color);
    animation: spin 2s linear infinite;
}

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

.update-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.update-btn:hover {
    background: #00b8d4;
}

/* Responsive PWA banners */
@media (max-width: 768px) {
    .pwa-install-banner {
        flex-direction: column;
        align-items: stretch;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        transform: none;
        border-radius: 12px 12px 0 0;
    }

    .install-content {
        justify-content: center;
    }

    .install-actions {
        justify-content: center;
    }

    .pwa-update-notification {
        right: 10px;
        left: 10px;
        top: 70px;
    }
}



