/* ==========================================================
   TCBlog — Dark Gaming Theme v4
   ========================================================== */

:root {
    --tcb-primary: #405E94;
    --tcb-accent: #4fc3f7;
    --tcb-accent-glow: #00e5ff;
    --tcb-bg-start: #0d1b2a;
    --tcb-bg-end: #1a3a6a;
    --tcb-card-bg: rgba(20, 40, 70, 0.65);
    --tcb-card-border: rgba(79, 195, 247, 0.08);
    --tcb-card-hover: rgba(30, 55, 95, 0.8);
    --tcb-text: #c8d6e5;
    --tcb-text-muted: #6b8299;
    --tcb-heading: #ffffff;
    --tcb-footer-bg: #405E94;
    --tcb-footer-link: var(--tcb-accent);
    --tcb-nav-height: 56px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    background: linear-gradient(160deg, var(--tcb-bg-start) 0%, var(--tcb-bg-end) 100%);
    background-attachment: fixed;
    color: var(--tcb-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

a { color: var(--tcb-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--tcb-accent-glow); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--tcb-bg-start); }
::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.3); border-radius: 4px; }

/* ==========================================================
   NAVBAR
   ========================================================== */
#tcb-navbar {
    background: var(--tcb-primary);
    height: var(--tcb-nav-height);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    z-index: 1030;
    padding: 0;
}
#tcb-navbar .container-fluid { height: var(--tcb-nav-height); }
.tcb-logo-nav { height: 51px; width: auto; align-self: flex-end; }
.tcb-nav-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    color: rgba(255,255,255,0.6); font-size: 1.1rem; transition: all 0.2s;
}
.tcb-nav-icon:hover, .tcb-nav-icon.active {
    color: var(--tcb-accent); background: rgba(79,195,247,0.1);
}
#search-bar {
    background: var(--tcb-bg-start);
    border-top: 1px solid var(--tcb-card-border);
}
.tcb-search-bar {
    background: var(--tcb-bg-start);
    border-bottom: 1px solid var(--tcb-card-border);
    position: sticky; top: var(--tcb-nav-height); z-index: 1029;
}

/* ==========================================================
   CATEGORY BAR (below navbar)
   ========================================================== */
.tcb-cat-bar {
    background: linear-gradient(180deg, rgba(13, 27, 42, 0.97) 0%, rgba(13, 27, 42, 0.92) 100%);
    border-bottom: 1px solid var(--tcb-card-border);
    position: sticky;
    top: var(--tcb-nav-height);
    z-index: 1028;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
/* Wrapper with fade-edge scroll indicators (desktop) */
.tcb-cat-bar-scroll {
    position: relative;
}
.tcb-cat-bar-scroll::before,
.tcb-cat-bar-scroll::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 32px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}
.tcb-cat-bar-scroll::before {
    left: 0;
    background: linear-gradient(90deg, rgba(13, 27, 42, 0.95) 0%, transparent 100%);
}
.tcb-cat-bar-scroll::after {
    right: 0;
    background: linear-gradient(-90deg, rgba(13, 27, 42, 0.95) 0%, transparent 100%);
}
.tcb-cat-bar-scroll.fade-left::before { opacity: 1; }
.tcb-cat-bar-scroll.fade-right::after { opacity: 1; }

.tcb-cat-bar-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.tcb-cat-bar-inner::-webkit-scrollbar { display: none; }

.tcb-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
    transition: all 0.25s ease;
    flex-shrink: 0;
    min-height: 30px;
}
.tcb-cat-pill:hover {
    color: #fff;
    background: var(--cat-bg-hover, rgba(79,195,247,0.15));
    border-color: var(--cat-border-hover, rgba(79,195,247,0.35));
    text-decoration: none;
    transform: translateY(-1px);
}
.tcb-cat-pill.active {
    color: #fff;
    background: var(--cat-bg-active, rgba(79,195,247,0.2));
    border-color: var(--cat-color, var(--tcb-accent));
    box-shadow: 0 0 10px var(--cat-glow, rgba(79,195,247,0.25));
}
.tcb-cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 5px var(--cat-glow, rgba(79,195,247,0.4));
}
/* Home pill — subtle separator after it */
.tcb-cat-pill-home {
    margin-right: 4px;
    border-right: none;
}
.tcb-cat-pill-home::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255,255,255,0.12);
}
.tcb-cat-pill-home {
    position: relative;
}

/* ── Desktop (≥768px): horizontal scroll, always visible ── */
@media (min-width: 768px) {
    .tcb-cat-bar { display: block; }
    /* Toggle button hidden on desktop */
    .tcb-cat-toggle { display: none !important; }
    /* Adjust search bar sticky */
    .tcb-cat-bar + .tcb-search-bar,
    .tcb-cat-bar ~ .tcb-search-bar,
    .tcb-cat-bar ~ #search-bar {
        top: calc(var(--tcb-nav-height) + 44px);
    }
}

/* ── Tablet & Mobile (<768px): collapsible, wrapped pills ── */
@media (max-width: 767.98px) {
    .tcb-cat-bar {
        display: none;
        position: sticky;
        top: var(--tcb-nav-height);
    }
    .tcb-cat-bar.open {
        display: block;
        animation: catBarSlideDown 0.25s ease-out;
    }
    @keyframes catBarSlideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    /* Fade edges hidden on mobile (wrapping mode) */
    .tcb-cat-bar-scroll::before,
    .tcb-cat-bar-scroll::after {
        display: none;
    }
    .tcb-cat-bar-inner {
        flex-wrap: wrap;
        overflow-x: visible;
        gap: 6px;
        padding: 10px 12px;
        justify-content: center;
    }
    .tcb-cat-pill {
        padding: 7px 14px;
        font-size: 0.73rem;
        min-height: 36px;
    }
    .tcb-cat-dot {
        width: 7px;
        height: 7px;
    }
    /* Adjust search bar when cat bar is open */
    .tcb-cat-bar.open + .tcb-search-bar,
    .tcb-cat-bar.open ~ .tcb-search-bar,
    .tcb-cat-bar.open ~ #search-bar {
        top: auto;
    }
}

/* ── Small phones (<576px): compact pills ── */
@media (max-width: 575.98px) {
    .tcb-cat-bar-inner {
        padding: 8px 10px;
        gap: 5px;
    }
    .tcb-cat-pill {
        padding: 6px 11px;
        font-size: 0.68rem;
        min-height: 34px;
    }
}

/* ==========================================================
   MAIN
   ========================================================== */
.tcb-main-full { flex: 1; padding-bottom: 2rem; }
main.container { flex: 1; }

/* ==========================================================
   POST CARDS
   ========================================================== */
.tcb-card {
    background: var(--tcb-card-bg);
    border: 1px solid var(--tcb-card-border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    backdrop-filter: blur(8px);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.tcb-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,229,255,0.08);
    border-color: rgba(79,195,247,0.2);
}

/* Thumbnail */
.tcb-card-thumb {
    position: relative; display: block; width: 100%;
    padding-top: 56.25%; overflow: hidden;
    background: rgba(0,0,0,0.3);
}
.tcb-card-thumb img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; transition: transform 0.3s ease;
}
.tcb-card:hover .tcb-card-thumb img { transform: scale(1.05); }

/* Play overlay */
.tcb-play-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.15); transition: background 0.3s;
}
.tcb-play-overlay i {
    font-size: 2.8rem; color: rgba(255,255,255,0.85);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5); transition: transform 0.2s;
}
.tcb-card:hover .tcb-play-overlay { background: rgba(0,0,0,0.25); }
.tcb-card:hover .tcb-play-overlay i { transform: scale(1.15); }

/* Card body */
.tcb-card-body { padding: 12px 14px 8px; flex: 1; }

/* Category badge — overlay on thumbnail */
.tcb-card-cat-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    padding: 3px 8px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #fff;
    background-color: var(--tcb-accent);
    border-radius: 3px;
    text-decoration: none;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    transition: opacity 0.2s;
    white-space: nowrap;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tcb-card-cat-badge:hover {
    opacity: 0.85;
    color: #fff;
    text-decoration: none;
}
.tcb-card-meta {
    font-size: 0.72rem; color: var(--tcb-text-muted);
    display: flex; gap: 10px; margin-bottom: 6px;
}
.tcb-card-meta i { margin-right: 3px; }
.tcb-card-title {
    font-size: 0.92rem; font-weight: 600; line-height: 1.35; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tcb-card-title a { color: var(--tcb-heading); }
.tcb-card-title a:hover { color: var(--tcb-accent); }
.tcb-card-excerpt {
    font-size: 0.78rem; color: var(--tcb-text-muted); line-height: 1.4;
    margin: 6px 0 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Card footer */
.tcb-card-footer {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 14px; border-top: 1px solid rgba(79,195,247,0.06);
    font-size: 0.75rem; color: var(--tcb-text-muted);
}
.tcb-card-author i, .tcb-card-likes i { margin-right: 4px; }

/* Like button (card + post) */
.tcb-like-btn {
    background: none; border: none; cursor: pointer;
    color: var(--tcb-text-muted); font-size: 0.75rem;
    padding: 0; display: inline-flex; align-items: center; gap: 4px;
    transition: color 0.2s, transform 0.2s;
}
.tcb-like-btn:hover { color: #ff6b8a; }
.tcb-like-btn.liked { color: #ff4d6d; }
.tcb-like-btn.liked:hover { color: #ff8fa3; }
.tcb-like-btn.tcb-like-anim { transform: scale(1.3); }
.tcb-like-btn-post { font-size: 0.9rem; color: #8899aa; gap: 6px; }

/* ==========================================================
   COLUMN SELECTOR
   ========================================================== */
.btn-outline-info {
    --bs-btn-color: var(--tcb-accent);
    --bs-btn-border-color: rgba(79,195,247,0.3);
    --bs-btn-hover-bg: rgba(79,195,247,0.15);
    --bs-btn-hover-color: var(--tcb-accent-glow);
    --bs-btn-hover-border-color: var(--tcb-accent);
    --bs-btn-active-bg: rgba(79,195,247,0.25);
    --bs-btn-active-color: #fff;
    --bs-btn-active-border-color: var(--tcb-accent);
}
@media (min-width: 1200px) {
    .col-xl-custom-8 { flex: 0 0 12.5%; max-width: 12.5%; }
}

/* ==========================================================
   AD SLOTS
   ========================================================== */
.tcb-ad-placeholder {
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(79,195,247,0.15);
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
}
.tcb-ad-slot { display: flex; align-items: center; justify-content: center; padding: 8px; overflow: hidden; }
/* Masonry ad container — fits within grid column */
.tcb-ad-masonry { display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0; }
.tcb-ad-masonry:empty { display: none; }
.tcb-ad-masonry iframe { width: 300px; height: 250px; border: none !important; display: block; }
.masonry-ad-item { overflow: hidden; }
.tcb-ad-sky { overflow: hidden; }
/* Responsive ad iframes — prevent layout breaking */
.tcb-ad-sky iframe,
.tcb-post-article iframe:not([src*="youtube"]):not([src*="youtu.be"]),
.my-2 iframe, .my-4 iframe, .mt-3 iframe, .mb-4 iframe {
    max-width: 100% !important;
    display: block;
}

/* ── Masonry ads: col-6 — 300x250 needs 2 columns below 950px ── */
@media (max-width: 949.98px) {
    .tcb-ad-col-6.masonry-ad-item { width: 100% !important; flex: 0 0 100%; max-width: 100%; }
}
/* ── Masonry ads: col-8 — 300x250 needs 2 columns below 1350px ── */
@media (max-width: 1349.98px) {
    .tcb-ad-col-8.masonry-ad-item { width: 50% !important; flex: 0 0 50%; max-width: 50%; }
}
@media (max-width: 767.98px) {
    .tcb-ad-col-8.masonry-ad-item { width: 100% !important; flex: 0 0 100%; max-width: 100%; }
}
/* ── Post/layout: hide 728x90 banners below 900px ── */
@media (max-width: 899.98px) {
    .tcb-ad-banner-728 { display: none !important; }
}

/* ==========================================================
   SINGLE POST PAGE
   ========================================================== */
.tcb-post-wrapper {
    display: flex; justify-content: center; gap: 20px;
    padding: 20px 10px; max-width: 1600px; margin: 0 auto;
}
.tcb-post-container {
    width: 100%; max-width: 1200px;
}
.tcb-post-article {
    background: var(--tcb-card-bg);
    border: 1px solid var(--tcb-card-border);
    border-radius: 12px;
    padding: 24px 28px;
    backdrop-filter: blur(8px);
    overflow: hidden;
}
.tcb-skyscraper {
    flex-shrink: 0; min-width: 160px;
    display: flex; flex-direction: column; align-items: center;
    padding-top: 20px; position: sticky;
    top: calc(var(--tcb-nav-height) + 20px); height: fit-content;
    overflow: hidden;
}
.tcb-video-embed {
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.tcb-post-title {
    font-size: 1.5rem; font-weight: 700; color: var(--tcb-heading);
    line-height: 1.3; margin-bottom: 16px;
}
.tcb-post-content {
    font-size: 0.95rem; line-height: 1.7; color: var(--tcb-text);
}
.tcb-post-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
.tcb-post-content a { color: var(--tcb-accent); text-decoration: underline; }
.tcb-post-content p { margin-bottom: 1rem; }
.tcb-post-content .tcb-content-image { text-align: center; margin: 16px 0; }
.tcb-post-content .tcb-content-image img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
.tcb-post-content .ratio { margin: 20px 0; box-shadow: 0 2px 12px rgba(0,0,0,0.3); border-radius: 8px; overflow: hidden; }

/* Social embed blocks */
.tcb-post-content .tcb-embed { margin: 20px 0; max-width: 100%; }
.tcb-post-content .tcb-embed iframe { max-width: 100% !important; display: block; }
.tcb-post-content .tcb-embed .twitter-tweet { margin: 0 auto !important; }
.tcb-post-content .tcb-embed .instagram-media { margin: 0 auto !important; max-width: 540px !important; }
/* Facebook embed */
.tcb-post-content .tcb-fb-embed { border-radius: 8px; }
.tcb-post-content .tcb-fb-embed iframe { border-radius: 8px; background: #fff; }
.tcb-post-content .tcb-fb-reel iframe { border-radius: 12px; }
/* Tweet embed */
.tcb-post-content .tcb-tweet-embed { max-width: 550px; }
.tcb-post-content .tcb-tweet-embed iframe { border-radius: 12px; }
/* Pinterest: SDK renders pin, fallback if SDK blocked */
.tcb-post-content .tcb-pin-embed { max-width: 450px; }
.tcb-pin-fallback {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 24px 20px; border-radius: 16px;
    background: #fff; text-decoration: none; color: #333;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.tcb-pin-fb-icon { display: flex; }
.tcb-pin-fb-text { font-weight: 700; font-size: 1rem; color: #333; }
.tcb-pin-fb-url { font-size: 0.75rem; color: #888; word-break: break-all; text-align: center; }
/* SDK replaces the <a> content, so fallback auto-hides when SDK loads */
.tcb-post-content .tcb-text-block { margin-bottom: 1rem; }
.tcb-badge-category {
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.3px;
    padding: 4px 10px; border-radius: 12px; color: #fff;
}
.tcb-share-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 12px;
}
.tcb-share-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: filter 0.15s, transform 0.15s;
}
.tcb-share-pill:hover {
    color: #fff;
    filter: brightness(1.25);
    transform: translateY(-2px);
}
.tcb-share-pill span { display: none; }

/* Platform colors */
.tcb-share-discord   { background: #5865F2; }
.tcb-share-x         { background: #14171a; border: 1px solid rgba(255,255,255,0.15); }
.tcb-share-facebook  { background: #1877F2; }
.tcb-share-reddit    { background: #FF4500; }
.tcb-share-whatsapp  { background: #25D366; color: #fff; }
.tcb-share-telegram  { background: #26A5E4; }
.tcb-share-threads   { background: #000; border: 1px solid rgba(255,255,255,0.15); }
.tcb-share-pinterest { background: #E60023; }
.tcb-share-email     { background: #2d6a4f; }
.tcb-share-copy      { background: #374151; border: 1px solid rgba(255,255,255,0.12); }

/* Post navigation — prev / random / next */
.tcb-post-nav {
    display: flex; gap: 10px;
}
.tcb-post-nav-btn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 10px 16px; border-radius: 8px;
    background: var(--tcb-card-bg);
    border: 1px solid var(--tcb-card-border);
    color: var(--tcb-accent); font-size: 1.1rem;
    transition: all 0.2s; text-decoration: none;
}
.tcb-post-nav-btn:hover {
    background: rgba(79,195,247,0.1);
    border-color: var(--tcb-accent);
    color: var(--tcb-accent-glow);
}
.tcb-post-nav-btn.disabled {
    opacity: 0.3; pointer-events: none;
}

/* Related posts — overlay image cards (right sidebar) */
.tcb-related-overlay-card {
    display: block; position: relative;
    border-radius: 10px; overflow: hidden;
    margin-bottom: 12px; text-decoration: none;
    min-height: 140px;
    background: rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.tcb-related-overlay-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.tcb-related-overlay-card img {
    width: 100%; height: 100%;
    position: absolute; top: 0; left: 0;
    object-fit: cover;
}
.tcb-related-overlay-info {
    position: relative; z-index: 2;
    padding: 50px 14px 14px;
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.75) 60%);
    min-height: 140px;
    display: flex; flex-direction: column;
    justify-content: flex-end; gap: 4px;
}
.tcb-related-overlay-title {
    color: #fff; font-size: 0.88rem; font-weight: 600; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tcb-related-overlay-badge {
    display: inline-block; padding: 2px 8px;
    background: rgba(255,0,80,0.7); color: #fff;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.5px;
    border-radius: 3px; width: fit-content;
}
.tcb-related-overlay-date {
    color: rgba(255,255,255,0.5); font-size: 0.7rem;
}

/* (Related posts now use .tcb-related-overlay-card — see Single Post section) */

/* ==========================================================
   CATEGORIES PAGE
   ========================================================== */
.tcb-category-card-item {
    background: var(--tcb-card-bg);
    border: 1px solid var(--tcb-card-border);
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
    height: 100%;
    transition: all 0.25s;
    backdrop-filter: blur(8px);
}
.tcb-category-card-item:hover {
    border-color: rgba(79,195,247,0.25);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,229,255,0.08);
}
.tcb-category-dot-big {
    width: 32px; height: 32px; border-radius: 50%;
    margin: 0 auto 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.tcb-category-name {
    color: #fff; font-size: 0.95rem; font-weight: 700;
    letter-spacing: 0.3px; margin-bottom: 6px;
}
.tcb-category-desc {
    color: #a8bdd0; font-size: 0.78rem;
    line-height: 1.4; margin-bottom: 8px;
}
.tcb-category-count {
    color: var(--tcb-accent); font-size: 0.75rem; font-weight: 600;
}

/* ==========================================================
   SIDEBAR
   ========================================================== */
.tcb-sidebar-section {
    background: var(--tcb-card-bg);
    border: 1px solid var(--tcb-card-border);
    border-radius: 10px; padding: 16px;
    margin-bottom: 20px; backdrop-filter: blur(8px);
}
.tcb-sidebar-title {
    font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--tcb-accent);
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 1px solid rgba(79,195,247,0.1);
}

/* ==========================================================
   PAGINATION (Round circles)
   ========================================================== */
.pagination { gap: 6px; }
.pagination .page-link {
    width: 38px; height: 38px; border-radius: 50% !important;
    display: flex; align-items: center; justify-content: center;
    background: var(--tcb-card-bg);
    border: 1px solid rgba(79,195,247,0.15);
    color: var(--tcb-text); font-size: 0.85rem; font-weight: 600;
    transition: all 0.2s; padding: 0;
}
.pagination .page-link:hover {
    background: rgba(79,195,247,0.15);
    border-color: var(--tcb-accent); color: var(--tcb-accent);
}
.pagination .active .page-link {
    background: var(--tcb-accent); border-color: var(--tcb-accent); color: #000;
}
.pagination .disabled .page-link { opacity: 0.3; }

/* ==========================================================
   FOOTER
   ========================================================== */
.tcb-footer {
    background: var(--tcb-footer-bg);
    padding: 12px 0; margin-top: auto;
    border-top: 1px solid var(--tcb-card-border);
}
.tcb-footer-link { color: var(--tcb-footer-link); transition: color 0.2s; }
.tcb-footer-link:hover { color: var(--tcb-accent-glow); text-decoration: underline; }

/* ==========================================================
   POPULAR PAGE
   ========================================================== */
.tcb-rank-badge {
    position: absolute; top: 8px; left: 8px;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--tcb-accent); color: #000;
    font-weight: 700; font-size: 0.8rem;
    display: flex; align-items: center; justify-content: center;
    z-index: 2; box-shadow: 0 2px 8px rgba(0,229,255,0.3);
}
.tcb-rank-badge.gold { background: #ffd700; }
.tcb-rank-badge.silver { background: #c0c0c0; }
.tcb-rank-badge.bronze { background: #cd7f32; }

/* ==========================================================
   SEARCH HIGHLIGHT
   ========================================================== */
mark, .search-highlight {
    background: rgba(79,195,247,0.25); color: #fff;
    padding: 1px 3px; border-radius: 3px;
}

/* ==========================================================
   ALERTS
   ========================================================== */
.tcb-flash {
    position: fixed; top: calc(var(--tcb-nav-height) + 10px);
    right: 20px; z-index: 1050; min-width: 280px;
    animation: slideInRight 0.3s ease-out;
}
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================
   ARCHIVE PAGE
   ========================================================== */
.tcb-archive-month {
    background: var(--tcb-card-bg);
    border: 1px solid var(--tcb-card-border);
    border-radius: 8px; padding: 10px 16px;
    display: flex; justify-content: space-between; align-items: center;
    color: var(--tcb-text); transition: all 0.2s;
}
.tcb-archive-month:hover {
    border-color: var(--tcb-accent);
    background: var(--tcb-card-hover); color: var(--tcb-accent);
}

/* ==========================================================
   404 PAGE
   ========================================================== */
.tcb-404 { text-align: center; padding: 80px 20px; }
.tcb-404 h1 {
    font-size: 6rem; font-weight: 800; color: var(--tcb-accent);
    text-shadow: 0 0 40px rgba(79,195,247,0.3);
}

/* ==========================================================
   SEARCH AUTOCOMPLETE
   ========================================================== */
.tcb-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 50px; /* leave room for the button */
    background: rgba(10, 22, 40, 0.98);
    border: 1px solid rgba(79, 195, 247, 0.15);
    border-radius: 0 0 8px 8px;
    max-height: 420px;
    overflow-y: auto;
    z-index: 1050;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}
.tcb-suggestion-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--tcb-text);
    text-decoration: none;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(79, 195, 247, 0.05);
}
.tcb-suggestion-item:hover a,
.tcb-suggestion-item.active a {
    background: rgba(79, 195, 247, 0.1);
    color: #fff;
}
.tcb-suggestion-thumb {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}
.tcb-suggestion-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.tcb-suggestion-title {
    font-size: 0.85rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tcb-suggestion-title mark {
    background: rgba(79, 195, 247, 0.3);
    color: #fff;
    padding: 0 2px;
    border-radius: 2px;
}
.tcb-suggestion-date {
    font-size: 0.7rem;
    color: var(--tcb-text-muted);
}
.tcb-suggestion-empty {
    padding: 16px;
    text-align: center;
    color: var(--tcb-text-muted);
    font-size: 0.85rem;
}
.tcb-suggestion-empty i {
    margin-right: 4px;
}
.tcb-suggestion-footer a {
    display: block;
    padding: 10px 12px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--tcb-accent);
    border-top: 1px solid rgba(79, 195, 247, 0.1);
    transition: background 0.15s;
}
.tcb-suggestion-footer a:hover {
    background: rgba(79, 195, 247, 0.08);
    color: var(--tcb-accent-glow);
}

/* ==========================================================
   EMPTY STATE (Search no results, etc.)
   ========================================================== */
.tcb-empty-state {
    padding: 3rem 1rem;
}
.tcb-empty-logo {
    display: block;
    margin: 0 auto;
    max-width: 540px;
    height: auto;
    opacity: 0.85;
}
.tcb-empty-icon {
    font-size: 3rem;
    color: var(--tcb-accent);
    opacity: 0.7;
    display: block;
}
.tcb-empty-title {
    color: #e8edf3;
    font-weight: 600;
    font-size: 1.4rem;
}
.tcb-empty-text {
    color: #9ab0c8;
    font-size: 1rem;
    max-width: 480px;
    margin: 0.5rem auto 0;
}
.tcb-empty-text strong {
    color: var(--tcb-accent);
}

/* ==========================================================
   SEARCH RESULTS (compact list)
   ========================================================== */
.tcb-search-results {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tcb-search-result-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 14px;
    background: var(--tcb-card-bg);
    border: 1px solid var(--tcb-card-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--tcb-text);
    transition: all 0.2s ease;
}
.tcb-search-result-item:hover {
    background: var(--tcb-card-hover);
    border-color: rgba(79, 195, 247, 0.2);
    color: var(--tcb-heading);
    transform: translateX(4px);
}
.tcb-search-result-thumb {
    width: 100px;
    height: 65px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.03);
}
.tcb-search-result-info {
    flex: 1;
    min-width: 0;
}
.tcb-search-result-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--tcb-heading);
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tcb-search-result-item:hover .tcb-search-result-title {
    color: var(--tcb-accent);
}
.tcb-search-result-excerpt {
    font-size: 0.8rem;
    color: var(--tcb-text-muted);
    margin: 0 0 6px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tcb-search-result-meta {
    display: flex;
    gap: 14px;
    font-size: 0.72rem;
    color: var(--tcb-text-muted);
}
.tcb-search-result-meta i {
    margin-right: 3px;
    opacity: 0.7;
}
@media (max-width: 575.98px) {
    .tcb-search-result-thumb {
        width: 70px;
        height: 50px;
    }
    .tcb-search-result-excerpt {
        display: none;
    }
    .tcb-search-result-meta {
        gap: 8px;
    }
}

/* ==========================================================
   ARCHIVES PAGE
   ========================================================== */
.tcb-archive-year-block {
    margin-bottom: 1.5rem;
}
.tcb-archive-year-title {
    color: var(--tcb-heading);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid rgba(79, 195, 247, 0.15);
}
.tcb-archive-month-card {
    background: var(--tcb-card-bg);
    border: 1px solid var(--tcb-card-border);
    border-radius: 8px;
    padding: 14px 10px;
    transition: all 0.2s ease;
}
.tcb-archive-month-card:hover {
    background: var(--tcb-card-hover);
    border-color: rgba(79, 195, 247, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.tcb-archive-month-name {
    display: block;
    color: var(--tcb-heading);
    font-weight: 600;
    font-size: 0.95rem;
}
.tcb-archive-month-count {
    display: block;
    color: var(--tcb-text-muted);
    font-size: 0.75rem;
    margin-top: 2px;
}

/* ==========================================================
   POPULAR PAGE — Rank badge
   ========================================================== */
.tcb-popular-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.75);
    color: var(--tcb-accent);
    font-weight: 800;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 1399.98px) {
    .tcb-skyscraper { display: none !important; }
    .tcb-post-main { max-width: 100%; }
}
@media (max-width: 767.98px) {
    .tcb-logo-nav { height: 32px; }
    .tcb-nav-icon { width: 32px; height: 32px; font-size: 0.95rem; }
    .tcb-post-main { padding: 16px; }
    .tcb-post-title { font-size: 1.3rem; }
    .tcb-card-title { font-size: 0.85rem; }
    .tcb-footer .container-fluid {
        flex-direction: column; text-align: center; gap: 8px;
    }
}
@media (max-width: 575.98px) {
    .tcb-card-excerpt { display: none; }
}

/* ── Admin Bar (front-end post view) ── */
.tcb-admin-bar {
    padding: 0 16px;
    margin-bottom: 12px;
}
.tcb-admin-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(20, 25, 35, 0.92);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50px;
    padding: 10px 24px;
    max-width: 900px;
    margin: 0 auto;
}
.tcb-admin-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c8cdd4;
    font-size: 0.92rem;
}
.tcb-admin-bar-left i {
    font-size: 1.3rem;
    opacity: 0.7;
}
.tcb-admin-bar-left strong {
    color: #fff;
}
.tcb-admin-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tcb-admin-bar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: opacity 0.15s;
    background: transparent;
}
.tcb-admin-bar-btn:hover {
    opacity: 0.75;
}
.tcb-admin-bar-edit {
    color: #4ea8ff;
}
.tcb-admin-bar-delete {
    color: #e85454;
}
.tcb-admin-bar-reject {
    color: #ffb74d;
}
@media (max-width: 575.98px) {
    .tcb-admin-bar-inner { padding: 8px 16px; }
    .tcb-admin-bar-left span { font-size: 0.82rem; }
}

/* ==========================================================
   STATIC PAGES (Legal, Disclaimer, etc.)
   ========================================================== */
.tcb-static-page {
    background: var(--tcb-card-bg);
    border: 1px solid var(--tcb-card-border);
    border-radius: 12px;
    padding: 32px;
    backdrop-filter: blur(8px);
}
.tcb-page-content {
    color: var(--tcb-text);
    line-height: 1.8;
    font-size: 0.95rem;
}
.tcb-page-content h2, .tcb-page-content h3, .tcb-page-content h4 {
    color: var(--tcb-heading);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}
.tcb-page-content p { margin-bottom: 1em; }
.tcb-page-content a { color: var(--tcb-accent); }
.tcb-page-content ul, .tcb-page-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}
.tcb-page-content blockquote {
    border-left: 3px solid var(--tcb-accent);
    padding: 0.5em 1em;
    margin: 1em 0;
    background: rgba(79,195,247,0.05);
    border-radius: 0 8px 8px 0;
}

/* ==========================================================
   AD-KEEP MODE — Never hide ad slots (Bidmatic compatibility)
   body.ad-keep is set via admin setting "Toujours visible"
   Uses visibility:hidden instead of display:none so ad-servers
   can still detect and initialize the container.
   ========================================================== */
/* Header banner: override Bootstrap d-none d-lg-flex */
body.ad-keep .tcb-ad-header-wrap { display: flex !important; }
@media (max-width: 991.98px) {
    body.ad-keep .tcb-ad-header-wrap { visibility: hidden; height: 0; overflow: hidden; padding: 0 !important; margin: 0 !important; }
}
/* Post/layout: override 728x90 banners hidden below 900px */
@media (max-width: 899.98px) {
    body.ad-keep .tcb-ad-banner-728 { display: flex !important; visibility: hidden; height: 0; overflow: hidden; padding: 0 !important; margin: 0 !important; }
}
/* Skyscrapers: override d-none d-xxl-flex and media query */
body.ad-keep .tcb-skyscraper { display: flex !important; }
@media (max-width: 1399.98px) {
    body.ad-keep .tcb-skyscraper { display: flex !important; visibility: hidden; width: 0; min-width: 0; overflow: hidden; padding: 0 !important; margin: 0 !important; }
}
/* Masonry: override :empty rule */
body.ad-keep .tcb-ad-masonry:empty { display: flex; min-height: 250px; }
body.ad-keep .masonry-ad-item { min-height: 250px; }

/* ==========================================================
   AD-WAIT MODE — Keep slots visible initially, JS hides after 10s
   body.ad-wait is set via admin setting "Attendre plus"
   ========================================================== */
/* Masonry: override :empty so CSS doesn't hide before JS timer fires */
body.ad-wait .tcb-ad-masonry:empty { display: flex; min-height: 250px; }
body.ad-wait .masonry-ad-item { min-height: 250px; }
