/* ============================================
   BLOG POST DETAIL - DARK THEME (Matching Homepage)
   ============================================ */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary, #0a0a1a);
    color: var(--text-primary, #f8fafc);
    min-height: 100vh;
    line-height: 1.8;
}

/* Article Header - Dark Theme */
.article-header {
    background: linear-gradient(135deg, var(--bg-primary, #0a0a1a) 0%, var(--bg-secondary, #0d1117) 50%, var(--bg-tertiary, #0f172a) 100%);
    padding: 120px 40px 80px;
    position: relative;
    overflow: hidden;
}

.article-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
    z-index: 0;
}

.article-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    z-index: 0;
}

.article-header-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 25px;
    color: var(--primary, #6366f1);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.article-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    margin-bottom: 20px;
    text-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
}

.article-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary, #94a3b8);
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.article-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted, #64748b);
    font-size: 14px;
}

.meta-item i {
    color: var(--primary, #6366f1);
}

/* Featured Image */
.featured-image {
    max-width: 1000px;
    margin: -40px auto 40px;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

.featured-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Article Container */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
}

/* Article Content */
.article-content {
    background: var(--glass-bg, rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    border-radius: 24px;
    padding: 50px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text-primary, #f8fafc);
    margin: 2rem 0 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.article-content h2 {
    font-size: 1.75rem;
    padding-left: 16px;
    border-left: 4px solid var(--primary, #6366f1);
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content p {
    color: var(--text-secondary, #94a3b8);
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.article-content a {
    color: var(--primary, #6366f1);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.article-content a:hover {
    color: var(--accent, #06b6d4);
    border-bottom-color: var(--accent, #06b6d4);
}

.article-content ul,
.article-content ol {
    color: var(--text-secondary, #94a3b8);
    margin: 1.5rem 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 12px;
    line-height: 1.7;
}

.article-content blockquote {
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary, #6366f1);
    padding: 20px 24px;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
}

.article-content blockquote p {
    margin: 0;
    font-style: italic;
    color: var(--text-primary, #f8fafc);
}

.article-content pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    border-radius: 12px;
    padding: 20px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content code {
    font-family: 'Fira Code', 'Monaco', monospace;
    font-size: 14px;
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--accent, #06b6d4);
}

.article-content pre code {
    background: transparent;
    padding: 0;
    color: var(--text-primary, #f8fafc);
}

.article-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.article-content th,
.article-content td {
    padding: 12px 16px;
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    text-align: left;
}

.article-content th {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary, #f8fafc);
    font-weight: 600;
}

.article-content td {
    color: var(--text-secondary, #94a3b8);
}

/* Article Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
}

.article-tags .tag {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    color: var(--primary, #6366f1);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tags .tag:hover {
    background: var(--primary, #6366f1);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Comments Section */
.comments-section {
    background: var(--glass-bg, rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    border-radius: 24px;
    padding: 40px;
    margin-top: 40px;
}

.comments-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary, #f8fafc);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.comments-header h3 i {
    color: var(--primary, #6366f1);
}

/* Comment Form */
.comment-form {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.comment-form h4 {
    color: var(--text-primary, #f8fafc) !important;
    margin-bottom: 1rem;
}

.comment-form .form-group {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    color: var(--text-primary, #f8fafc);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
}

.comment-form textarea {
    width: 100%;
    min-height: 150px;
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-primary, #f8fafc);
    resize: vertical;
    transition: all 0.3s ease;
}

.comment-form textarea::placeholder {
    color: var(--text-muted, #64748b);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary, #6366f1);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.submit-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary, #6366f1) 0%, var(--secondary, #8b5cf6) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

/* Comment List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--glass-border, rgba(148, 163, 184, 0.1));
    border-radius: 16px;
    padding: 24px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary, #f8fafc);
    font-weight: 600;
}

.comment-author i {
    font-size: 24px;
    color: var(--primary, #6366f1);
}

.comment-date {
    color: var(--text-muted, #64748b);
    font-size: 13px;
}

.comment-content {
    color: var(--text-secondary, #94a3b8);
    line-height: 1.7;
}

/* Alert Styles */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.alert-info {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary, #6366f1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Responsive Design */
@media (max-width: 900px) {
    .article-header {
        padding: 100px 20px 60px;
    }
    
    .featured-image {
        padding: 0 20px;
        margin: -20px auto 30px;
    }
    
    .article-container {
        padding: 20px;
    }
    
    .article-content {
        padding: 30px 20px;
    }
    
    .comments-section {
        padding: 30px 20px;
    }
}

@media (max-width: 600px) {
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Light Theme Override */
body.light-theme {
    background: #f8fafc;
    color: #1e293b;
}

body.light-theme .article-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

body.light-theme .article-header::before {
    background: 
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

body.light-theme .article-title {
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .article-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

body.light-theme .meta-item {
    color: rgba(255, 255, 255, 0.8);
}

body.light-theme .meta-item i {
    color: rgba(255, 255, 255, 0.9);
}

body.light-theme .article-content,
body.light-theme .comments-section {
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

body.light-theme .article-content h1,
body.light-theme .article-content h2,
body.light-theme .article-content h3,
body.light-theme .article-content h4,
body.light-theme .article-content h5,
body.light-theme .article-content h6 {
    color: #1e293b;
}

body.light-theme .article-content p,
body.light-theme .article-content li,
body.light-theme .article-content td {
    color: #64748b;
}

body.light-theme .article-content pre {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

body.light-theme .article-content pre code {
    color: #1e293b;
}

body.light-theme .article-content blockquote {
    background: #e0e7ff;
}

body.light-theme .article-content blockquote p {
    color: #4338ca;
}

body.light-theme .comments-header h3 {
    color: #1e293b;
}

body.light-theme .comment-form {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-theme .comment-form h4 {
    color: #1e293b !important;
}

body.light-theme .comment-form label {
    color: #1e293b;
}

body.light-theme .comment-form textarea {
    background: #fff;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-theme .comment-form textarea:focus {
    background: #fff;
    border-color: #6366f1;
}

body.light-theme .comment {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-theme .comment-author {
    color: #1e293b;
}

body.light-theme .comment-content {
    color: #64748b;
}

body.light-theme .article-tags {
    border-top-color: #e2e8f0;
}

body.light-theme .article-tags .tag {
    background: #e0e7ff;
    border-color: #c7d2fe;
    color: #6366f1;
}

body.light-theme .article-tags .tag:hover {
    background: #6366f1;
    color: white;
}
