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

:root {
    --primary-purple: #8b5cf6;
    --secondary-purple: #a855f7;
    --pink: #ec4899;
    --dark-bg: #0f0f0f;
    --darker-bg: #000000;
    --text-primary: #e5e7eb;
    --text-secondary: #29c431;
    --border-color: #374151;
    --success: #10b981;
}

body {
    font-family: 'Fira Code', monospace;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

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

/* Header */
.header {
    background: var(--darker-bg);
    border-bottom: 2px solid var(--primary-purple);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo-draco {
    color: var(--primary-purple);
    text-shadow: 0 0 10px var(--primary-purple);
}

.logo-zona {
    color: var(--pink);
    text-shadow: 0 0 10px var(--pink);
}

.cursor {
    animation: blink 1s infinite;
    color: var(--pink);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.nav {
    display: flex;
    gap: 2rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-purple);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, var(--darker-bg) 0%, #1a1a1a 100%);
    border-left: 2px solid var(--primary-purple);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 20px;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-purple);
    margin-bottom: 20px;
}

.mobile-nav-title {
    color: var(--primary-purple);
    font-size: 1.2rem;
    font-weight: 700;
}

.mobile-close-btn {
    background: none;
    border: 2px solid var(--pink);
    color: var(--pink);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-close-btn:hover {
    background: var(--pink);
    color: white;
    transform: rotate(90deg);
}

.mobile-nav a {
    display: block;
    color: var(--text-primary);
    text-decoration: none;
    padding: 15px 10px;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-nav a:hover {
    color: var(--pink);
    background: rgba(139, 92, 246, 0.1);
    border-left-color: var(--pink);
    transform: translateX(5px);
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary-purple), var(--pink));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

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

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
}

.nav a:hover {
    color: var(--pink);
    border-color: var(--pink);
    box-shadow: 0 0 10px var(--pink);
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Search */
.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.search-input {
    background: var(--darker-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    border-radius: 4px;
    width: 300px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 10px var(--primary-purple);
}

.search-btn, .clear-btn {
    background: linear-gradient(45deg, var(--primary-purple), var(--pink));
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.search-btn:hover, .clear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filters select {
    background: var(--darker-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    font-family: inherit;
    border-radius: 4px;
    cursor: pointer;
}

.filters select:focus {
    outline: none;
    border-color: var(--primary-purple);
}

/* Blog Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 2rem;
}

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

.sidebar {
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

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

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

.sidebar-section h3 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--primary-purple);
    padding-bottom: 0.5rem;
}

.categories-list, .tags-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.category-item, .tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-item:hover, .tag-item:hover {
    border-color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

.category-name, .tag-name {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.category-count, .tag-count {
    background: var(--pink);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Posts */
.posts-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.post-card {
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-purple), var(--pink));
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-purple);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.post-date {
    color: var(--pink);
    font-weight: 500;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: var(--primary-purple);
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    background: var(--primary-purple);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--pink);
    transform: scale(1.05);
}

.post-category {
    background: var(--pink);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.read-more {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--pink);
}

/* Footer */
.footer {
    background: var(--darker-bg);
    border-top: 2px solid var(--primary-purple);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.heart {
    color: var(--pink);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
        position: static;
    }
    
    .categories-list, .tags-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }

    .search-container {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .search-input {
        width: 100%;
        max-width: 400px;
    }

    .posts-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .main {
        padding: 1rem 0;
    }
    
    .sidebar {
        display: none;
    }
}

@media (max-width: 1200px) {
    .posts-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .posts-container {
        grid-template-columns: 1fr;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .post-card {
        padding: 1rem;
    }

    .post-title {
        font-size: 1.2rem;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .search-input {
        font-size: 16px;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .mobile-nav {
        width: 100%;
        right: -100%;
    }
    
    .table-container {
        margin: 15px -10px;
        max-height: 400px;
        overflow-y: auto;
    }
    
    .markdown-table {
        min-width: 400px;
        font-size: 0.75rem;
    }
    
    .markdown-table th,
    .markdown-table td {
        padding: 6px 4px;
        font-size: 0.7rem;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }
    
    .post-card {
        padding: 0.8rem;
    }
    
    .post-title {
        font-size: 1.1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.2rem;
    color: var(--primary-purple);
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-purple);
    border-top: 2px solid transparent;
    border-radius: 50%;
    margin-left: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Enhanced Code blocks */
.code-block {
    position: relative;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--primary-purple);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.code-block::before {
    content: attr(data-language);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #06b6d4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    padding-left: 15px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.code-block pre {
    background: #0d1117;
    color: #c9d1d9;
    padding: 50px 20px 20px;
    margin: 0;
    border-radius: 0;
    border: none;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.code-block pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

/* Prompt boxes */
.prompt-info, .prompt-warning, .prompt-danger, .prompt-success, .prompt-tip {
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid;
    position: relative;
    font-family: inherit;
}

.prompt-info {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #3b82f6;
    color: #93c5fd;
}

.prompt-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
    color: #fbbf24;
}

.prompt-danger {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
    color: #fca5a5;
}

.prompt-success {
    background: rgba(34, 197, 94, 0.1);
    border-left-color: #22c55e;
    color: #86efac;
}

.prompt-tip {
    background: rgba(139, 92, 246, 0.1);
    border-left-color: var(--primary-purple);
    color: var(--pink);
}

.prompt-info::before { content: "ℹ️ Info: "; font-weight: bold; }
.prompt-warning::before { content: "⚠️ Warning: "; font-weight: bold; }
.prompt-danger::before { content: "🚨 Danger: "; font-weight: bold; }
.prompt-success::before { content: "✅ Success: "; font-weight: bold; }
.prompt-tip::before { content: "💡 Tip: "; font-weight: bold; }
/* Inline code styling */
code {
    background: rgba(139, 92, 246, 0.1);
    color: #ef4444;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}
/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.page-btn {
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    font-family: inherit;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.page-btn:hover {
    border-color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

.page-btn.active {
    background: var(--primary-purple);
    border-color: var(--primary-purple);
    color: white;
}
/* Table styling */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.markdown-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--darker-bg);
    min-width: 600px;
}

.markdown-table th {
    background: linear-gradient(90deg, var(--primary-purple), var(--pink));
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.markdown-table td {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.markdown-table tr:hover {
    background: rgba(139, 92, 246, 0.1);
}

.markdown-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {
    .table-container {
        margin: 15px -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        -webkit-overflow-scrolling: touch;
    }
    
    .markdown-table {
        min-width: 500px;
        font-size: 0.85rem;
    }
    
    .markdown-table th,
    .markdown-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .markdown-table th {
        position: sticky;
        top: 0;
        z-index: 10;
    }
}
/* 404 Error Page Styles */
.error-404 {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    text-align: center;
}

.error-content {
    max-width: 600px;
    padding: 2rem;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--primary-purple);
    text-shadow: 0 0 20px var(--primary-purple);
    margin-bottom: 1rem;
    animation: glitch 2s infinite;
}

.error-title {
    font-size: 2rem;
    color: var(--pink);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.error-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.error-details {
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.terminal-output {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.terminal-line {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.prompt {
    color: var(--primary-purple);
    font-weight: 600;
}

.command {
    color: var(--pink);
}

.error-line .error-text {
    color: #ef4444;
}

.file-list {
    color: var(--text-secondary);
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-purple), var(--pink));
    color: white;
    border-color: transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

@keyframes glitch {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-2px); }
    20% { transform: translateX(2px); }
    30% { transform: translateX(-1px); }
    40% { transform: translateX(1px); }
    50% { transform: translateX(0); }
}