/* bitboxx.net Matrix Theme */

:root {
    --bitboxx-dark: #0a0f0d;
    --bitboxx-matrix-bg: #0d1117;
    --bitboxx-green: #00ff41;
    --bitboxx-green-dark: #00b82e;  /* Darker green for better contrast */
    --bitboxx-yellow: #ffff00;
    --bitboxx-border: #1f3d2f;
    --blog-background: #EBEBEB;
    --posts-container: #F2F2F2;
    --post-card: #FCFCFC;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Global link colors for Bitboxx theme */
a {
    color: #00b82e;
    text-decoration: none;
}

a:hover {
    color: #008a23;
    text-decoration: underline;
}

.page {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    width: 100% !important;
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* bitboxx.net Matrix Header */
.bitboxx-header {
    width: 100% !important;
    max-width: 100% !important;
    background: #0a0f0d url('/Themes/Bitboxx/assets/images/binary.jpg') center top no-repeat;
    background-size: cover;
    color: var(--bitboxx-green);
    border-bottom: 3px solid var(--bitboxx-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 255, 65, 0.1);
    margin: 0 !important;
    padding: 0 !important;
    min-height: 230px;
    transition: min-height 0.3s ease, padding 0.3s ease;
}

.bitboxx-header.scrolled {
    min-height: 80px;
}

.header-spacer {
    height: 230px;
    transition: height 0.3s ease;
}

body.header-scrolled .header-spacer {
    height: 80px;
}

.header-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    transition: padding 0.3s ease;
}

.bitboxx-header.scrolled .header-container {
    padding: 0.5rem 2rem;
}

/* Logo */
.logo {
    flex-shrink: 0;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.logo a {
    text-decoration: none;
    display: block;
}

.logo img {
    height: 100px;
    width: auto;
    transition: height 0.3s ease;
}

.bitboxx-header.scrolled .logo img {
    height: 50px;
}

.logo-text {
    font-size: 3rem;
    font-weight: 700;
    color: var(--bitboxx-green);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    letter-spacing: -2px;
    display: block;
    transition: font-size 0.3s ease;
}

.bitboxx-header.scrolled .logo-text {
    font-size: 1.5rem;
}

.logo-subtitle {
    font-size: 1rem;
    color: var(--bitboxx-green);
    font-family: 'Courier New', monospace;
    margin-top: -5px;
    display: block;
    transition: font-size 0.3s ease, opacity 0.3s ease;
}

.bitboxx-header.scrolled .logo-subtitle {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Scrolling Ticker */
.header-ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--bitboxx-border);
    border-radius: 4px;
    transition: height 0.3s ease;
}

.bitboxx-header.scrolled .header-ticker {
    height: 35px;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: scroll-ticker 15s linear infinite;
    padding: 15px 0;
    transition: padding 0.3s ease;
}

.bitboxx-header.scrolled .ticker-content {
    padding: 8px 0;
}

.ticker-item {
    display: inline-block;
    padding: 0 3rem;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: var(--bitboxx-yellow);
    text-decoration: none;
    transition: all 0.3s ease;
}

.bitboxx-header.scrolled .ticker-item {
    font-size: 0.9rem;
    padding: 0 2rem;
}

.ticker-item:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
}

.ticker-separator {
    color: var(--bitboxx-green);
    padding: 0 1rem;
    transition: padding 0.3s ease;
}

.bitboxx-header.scrolled .ticker-separator {
    padding: 0 0.5rem;
}

@keyframes scroll-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Sub-navigation */
.sub-nav {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--bitboxx-border);
    padding: 0.75rem 2rem;
    max-height: 50px;
    overflow: hidden;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.bitboxx-header.scrolled .sub-nav {
    max-height: 0;
    opacity: 0;
    padding: 0 2rem;
}

.sub-nav a {
    color: var(--bitboxx-green);
    text-decoration: none;
    font-family: 'Courier New', monospace;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.sub-nav a:hover,
.sub-nav a.active {
    color: var(--bitboxx-yellow);
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
}

/* Main Content */
.main-content {
    flex: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: #EBEBEB !important;
    padding-top: 0 !important;
}

.main-content > article {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Footer */
.bitboxx-footer {
    width: 100% !important;
    max-width: 100% !important;
    background: var(--bitboxx-matrix-bg);
    color: var(--bitboxx-green);
    text-align: center;
    padding: 2rem;
    border-top: 3px solid var(--bitboxx-border);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin: 0 !important;
}

/* Blog Container */
.blog-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Blog Posts */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: #F2F2F2;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.blog-post-preview {
    background: #FCFCFC;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-left-color 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    border-left: 4px solid transparent;
}

.blog-post-preview:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
    border-left-color: var(--bitboxx-green);
}

.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-image:hover img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #00b82e;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.post-summary {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #e8f5e9;
    color: #1b5e20;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tag:hover {
    background-color: #00b82e;
    color: white;
}

.read-more {
    display: inline-block;
    color: #00b82e;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #008a23;
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    background-color: #00b82e;
    color: white;
}

.pagination-link.active {
    background-color: #00b82e;
    color: white;
    font-weight: 700;
}

/* Blog Post Detail */
.blog-post-detail {
    background: #FCFCFC;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.post-header {
    /* margin-bottom: 1.5rem; */
    padding-bottom: 1rem;
    border-bottom: 2px solid #cccccc;
}

.blog-post-detail .post-title {
    font-size: 2.5rem;
}

.post-cover-image {
    width: 100%;
    max-height: 400px;
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.post-cover-image img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* Markdown Content */
.markdown-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.markdown-body h1 {
    font-size: 2rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.markdown-body h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.markdown-body a {
    color: #00b82e;
    text-decoration: none;
    font-weight: 500;
}

.markdown-body a:hover {
    color: #008a23;
    text-decoration: underline;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

.markdown-body code:not(pre code) {
    background-color: #f6f8fa;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d73a49;
    border: 1px solid #e1e4e8;
}

.markdown-body pre {
    background-color: #1e1e1e;
    border-radius: 6px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.markdown-body pre code {
    background-color: transparent !important;
    padding: 0 !important;
    color: #d4d4d4 !important;
    font-family: 'Courier New', monospace;
    border: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .bitboxx-header {
        min-height: 180px;
    }
    
    .header-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo img {
        height: 80px;
    }
    
    .bitboxx-header.scrolled .logo img {
        height: 40px;
    }
    
    .header-ticker {
        width: 100%;
        height: 40px;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    /* Reduce padding on mobile */
    .main-content {
        padding: 0.5rem 0 !important;
    }
    
    .main-content > article {
        padding: 0.5rem;
    }
    
    .blog-container {
        padding: 0;
    }
    
    .blog-posts {
        padding: 0.75rem;
        background: transparent;
    }
    
    .blog-post-detail {
        padding: 1rem;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .post-cover-image {
        margin: 1rem 0;
    }
}
