body {
    background-color: #fcfcfd;
    font-family: var(--font-main);
}

.fw-black {
    font-weight: 900;
    letter-spacing: -0.02em;
}

.read-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--primary-color);
    width: 0%;
    z-index: 2000;
    transition: width 0.1s;
}

.btn-back-premium {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 12px;
}

.btn-back-premium:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(-5px);
}

.article-hero {
    padding-top: 1.5rem;
}

.category-pill-premium {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-color);
    padding: 4px 14px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-pill-premium:link,
.category-pill-premium:visited {
    color: var(--primary-color);
}

.category-pill-premium:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-color);
}

/* Make category icons inherit the surrounding text color (like tag icons) */
.category-pill-premium i,
.floating-badge i {
    color: currentColor;
}

.author-avatar-squircle {
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
}

.author-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-label-muted {
    color: #94a3b8;
    font-weight: 600;
    opacity: 0.9;
}

.author-name-muted {
    color: #64748b;
    font-weight: 600;
    opacity: 0.85;
}

.meta-divider {
    width: 1px;
    height: 30px;
    background: #e2e8f0;
}

.tag-pill-show {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(100, 116, 139, 0.28) !important;
    background: rgba(148, 163, 184, 0.12) !important;
    color: #1e293b !important;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.tag-pill-show:link,
.tag-pill-show:visited {
    color: #1e293b !important;
}

.tag-pill-show {
    background: var(--primary-color);
    color: #fff !important;
    border-color: transparent !important;
}

.tag-pill-show:hover {
    background: var(--primary-color) !important;
    color: #000 !important;
    transform: translateY(-1px);
}

.tag-pill-show:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--primary-color) 50%, #0f172a);
    outline-offset: 2px;
}

/* Tag icon inline styles */
.tag-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.tag-icon {
    width: 1rem;
    height: 1rem;
    display: inline-block;
    vertical-align: middle;
    color: currentColor;
}
.tag-inline-text {
    line-height: 1;
}

.blog-content-premium {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #334155;
}

.blog-content-premium p {
    margin-bottom: 1.8rem;
}

.blog-content-premium a {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-content-premium a:hover {
    color: var(--primary-color);
}

.blog-content-premium ul,
.blog-content-premium ol {
    margin: 1.6rem 0;
    padding-left: 1.6rem;
    color: #334155;
}

.blog-content-premium ul {
    list-style: none;
}

.blog-content-premium ul li {
    position: relative;
    padding-left: 1.1rem;
    margin: 0.7rem 0;
}

.blog-content-premium ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-color) 70%, #0f172a);
}

.blog-content-premium ol li {
    margin: 0.7rem 0;
}

.blog-content-premium ol li::marker {
    color: var(--primary-color);
    font-weight: 700;
}

.featured-image-container,
.featured-image-container img {
    border-radius: var(--ui-radius);
}

.blog-content-premium h2,
.blog-content-premium h3 {
    font-weight: 800;
    color: #0f172a;
    margin: 2.5rem 0 1.2rem 0;
    letter-spacing: -0.01em;
}

.featured-image-container {
    width: 100%;
    min-height: 340px;
    height: 340px;
    border: none;
    background: transparent;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}

.featured-image-container img {
    width: 100%;
    height: 100% !important;
    max-height: none;
    object-fit: cover;
    display: block;
    background: transparent;
}

@media (max-width: 768px) {
    .featured-image-container {
        min-height: 220px;
        height: 220px;
        padding: 0;
    }

    .display-5 {
        font-size: 2rem;
    }
}

.blog-content-premium img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.blog-content-premium pre,
.blog-content pre {
    background: #1e1e1e !important;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
}

.blog-content-premium pre code,
.blog-content pre code {
    display: block;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 14px;
}

.blog-content-premium pre code.hljs,
.blog-content pre code.hljs {
    background: transparent !important;
}

.blog-content-premium code.hljs,
.blog-content code.hljs {
    display: block;
    background: #1e1e1e !important;
    color: #d4d4d4 !important;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
}

.btn-like-premium {
    border: none;
    background: #f1f5f9;
    padding: 8px 20px;
    border-radius: 50px;
    color: #64748b;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-like-premium:hover,
.btn-like-premium.is-liked {
    background: #fee2e2;
    color: #ef4444;
}

.login-prompt-card {
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
}

.user-avatar-squircle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.user-avatar-squircle.small {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 0.85rem;
    border-radius: 10px;
}

.user-avatar-squircle.bg-primary {
    background: var(--primary-color, #6366f1);
}

.user-avatar-squircle.bg-secondary {
    background: var(--secondary-color, #e2e8f0);
    color: #0f172a;
}

.comments-list .comment-item-premium {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.comments-list .comment-item-premium .user-avatar-squircle {
    flex: 0 0 auto;
}

.btn-primary-premium {
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 700;
    transition: all 0.3s;
}

.comment-item-premium {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.animate-up {
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .blog-show-wrapper .container {
        max-width: 100% !important;
    }

    .blog-show-wrapper .article-hero .display-5 {
        font-size: clamp(1.9rem, 5vw, 3rem);
    }

    .article-meta-premium {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem !important;
    }

    .article-meta-premium .text-start {
        flex: 0 0 auto;
    }

    .meta-divider {
        display: none;
    }

    .engagement-bar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem;
    }

    .engagement-bar>.d-flex.align-items-center.gap-4 {
        flex-wrap: wrap;
        gap: 1rem !important;
        justify-content: center;
    }

    .comments-section-premium .d-flex.align-items-center.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }

    .comment-input-card .d-flex.gap-3 {
        gap: 0.75rem !important;
    }
}

@media (max-width: 575.98px) {
    .blog-show-wrapper .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .blog-show-wrapper .article-hero {
        padding-top: 1rem;
        margin-bottom: 1.25rem !important;
    }

    .blog-show-wrapper .article-hero h1 {
        font-size: 1.65rem !important;
        line-height: 1.25 !important;
    }

    .tag-pill-show {
        padding: 0.38rem 0.72rem;
        font-size: 0.74rem;
        border-radius: var(--ui-radius);
    }

    .category-pill-premium,
    .btn-back-premium,
    .btn-like-premium,
    .btn-primary-premium,
    .login-prompt-card .btn {
        border-radius: var(--ui-radius) !important;
    }

    .engagement-bar {
        padding: 1rem !important;
    }

    .comment-input-card,
    .login-prompt-card,
    .comment-item-premium,
    .featured-image-container,
    .blog-content-premium {
        border-radius: var(--ui-radius) !important;
    }

    .comment-input-card textarea {
        min-height: 120px;
    }
}
