/* Article Header */
.article-header {
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%233b82f6" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.article-meta {
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #60a5fa;
}

.article-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-date {
    color: var(--gray-light);
    font-size: 0.9rem;
}

.article-category {
    background: linear-gradient(135deg, var(--primary) 0%, #60a5fa 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.article-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--light);
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

.article-excerpt {
    font-size: 1.2rem;
    color: var(--gray-light);
    line-height: 1.6;
    max-width: 800px;
    position: relative;
    z-index: 2;
}

/* Article Content */
.article-content {
    padding: 4rem 0;
}

.article-body {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.article-hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.article-body h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem 0;
    color: var(--light);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem 0;
    color: var(--light);
}

.article-body p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--gray-light);
}

.article-body ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-body li {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--gray-light);
}

.article-body strong {
    color: var(--light);
    font-weight: 600;
}

/* Simple Realistic Terminal Window */
.article-body pre {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    position: relative;
    font-family: 'Courier New', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Terminal Window Controls - Close, Minimize, Maximize */
.article-body pre::after {
    content: '';
    position: absolute;
    top: 0.5rem;
    left: 0.8rem;
    width: 10px;
    height: 10px;
    background: #ff5f56;
    border-radius: 50%;
    box-shadow: 
        18px 0 0 #ffbd2e,
        36px 0 0 #27ca3f;
    z-index: 2;
}

/* Terminal Window Title - Just Text */
.article-body pre[data-title]:before {
    content: attr(data-title);
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #ccc;
    font-size: 0.7rem;
    font-weight: 500;
    z-index: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Terminal Prompt */
.article-body pre .terminal-prompt {
    color: #00ff00;
    font-weight: bold;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    display: block;
}

.article-body pre code {
    background: transparent;
    color: #e6e6e6;
    padding: 0;
    border: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    display: block;
    white-space: pre;
}

/* Copy Button */
.article-body pre .copy-button {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.3);
    color: #00ff00;
    border: 1px solid #00ff00;
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    cursor: pointer;
    opacity: 0;
    font-family: inherit;
    z-index: 3;
}

.article-body pre:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background: #00ff00;
    color: #000;
}

.article-body code {
    background: #2d2d2d;
    color: #00ff00;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    border: 1px solid #444;
    font-weight: 500;
}

/* Syntax highlighting for common shell commands */
.article-body pre code .command {
    color: #00ff00;
    font-weight: bold;
}

.article-body pre code .comment {
    color: #888;
    font-style: italic;
}

.article-body pre code .string {
    color: #ff6b6b;
}

.article-body pre code .number {
    color: #4ecdc4;
}

.article-body pre code .keyword {
    color: #ffd93d;
    font-weight: bold;
}

/* Light theme adjustments */
body.light-theme .article-body pre {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #212529;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light-theme .article-body pre::before {
    color: #28a745;
}

body.light-theme .article-body pre code {
    color: #212529;
}

body.light-theme .article-body code {
    background: #e9ecef;
    color: #28a745;
    border-color: #adb5bd;
}

/* Mobile responsiveness for terminal */
@media (max-width: 768px) {
    .article-body pre {
        font-size: 0.8rem;
        padding: 1.8rem 1rem 1rem 1rem;
        margin: 1.5rem 0;
        border-radius: 6px;
    }
    
    .article-body pre::after {
        width: 8px;
        height: 8px;
        top: 0.4rem;
        left: 0.6rem;
        box-shadow: 
            15px 0 0 #ffbd2e,
            30px 0 0 #27ca3f;
    }
    
    .article-body pre[data-title]:before {
        font-size: 0.6rem;
        top: 0.4rem;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .article-body code {
        font-size: 0.8rem;
        padding: 0.15rem 0.3rem;
    }
    
    .copy-button {
        top: 0.4rem;
        right: 0.8rem;
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
}

/* Article CTA */
.article-cta {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 15px;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}

.article-cta h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.article-cta p {
    margin-bottom: 1.5rem;
    color: var(--gray-light);
}

/* Related Articles */
.related-articles {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.related-articles h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--light);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.related-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.related-date {
    font-size: 0.9rem;
    color: var(--gray-light);
}

/* Light Theme Styles */
body.light-theme .article-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

body.light-theme .article-header h1 {
    color: var(--dark);
}

body.light-theme .article-excerpt {
    color: var(--gray);
}

body.light-theme .article-body h2,
body.light-theme .article-body h3 {
    color: var(--dark);
}

body.light-theme .article-body p,
body.light-theme .article-body li {
    color: var(--gray);
}

body.light-theme .article-body strong {
    color: var(--dark);
}

body.light-theme .article-cta {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

body.light-theme .article-cta h3 {
    color: var(--dark);
}

body.light-theme .article-cta p {
    color: var(--gray);
}

body.light-theme .related-articles h3 {
    color: var(--dark);
}

body.light-theme .related-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.2);
}

body.light-theme .related-card:hover {
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

body.light-theme .related-card h4 {
    color: var(--dark);
}

body.light-theme .related-date {
    color: var(--gray);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .article-header {
        padding: 100px 0 40px;
    }
    
    .article-header h1 {
        font-size: 2.2rem;
    }
    
    .article-excerpt {
        font-size: 1rem;
    }
    
    .article-content {
        padding: 2rem 0;
    }
    
    .article-body {
        padding: 0 1rem;
    }
    
    .article-hero-image {
        height: 250px;
    }
    
    .article-body h2 {
        font-size: 1.6rem;
    }
    
    .article-body h3 {
        font-size: 1.3rem;
    }
    
    .article-body p,
    .article-body li {
        font-size: 1rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .article-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .article-body {
        padding: 0 0.5rem;
    }
} 