/* BDBOYS.TOP - Dark Theme */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2128;
    --bg-hover: #21262d;
    --border: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #58a6ff;
    --accent-hover: #79b8ff;
    --purple: #a371f7;
    --pink: #f778ba;
    --green: #3fb950;
    --red: #f85149;
    --orange: #d29922;
    --gradient: linear-gradient(135deg, #7f00ff, #e100ff, #00d4ff);
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
    --radius: 12px;
    --font: 'Hind Siliguri', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Progress Bar */
#progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,0.3);
    z-index: 9999;
}
#progress-bar {
    height: 100%;
    width: 0%;
    background: hsl(200, 100%, 50%);
    box-shadow: 0 0 8px currentColor;
    transition: width 0.1s linear;
}

/* Header */
.site-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 16px;
}
.logo img {
    height: 40px;
    border-radius: 8px;
}
.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
}
.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.main-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: var(--text-secondary);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.dropdown {
    position: relative;
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: var(--shadow);
    z-index: 100;
    padding: 8px 0;
}
.dropdown:hover .dropdown-menu {
    display: block;
}
.dropdown-menu li a {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.dropdown-menu li a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Main */
.main-content {
    padding: 24px 0 48px;
    min-height: 60vh;
}

/* Cards Grid */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}
.post-card .thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg-secondary);
}
.post-card .body {
    padding: 16px;
}
.post-card .cat {
    font-size: 0.75rem;
    color: var(--purple);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.post-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}
.post-card h3 a {
    color: var(--text-primary);
}
.post-card h3 a:hover {
    color: var(--accent);
}
.post-card .meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
}
.post-card .meta i {
    margin-right: 3px;
}

/* SMS Cards */
.sms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.sms-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    transition: border-color 0.2s;
}
.sms-card:hover {
    border-color: var(--pink);
}
.sms-card .content {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.sms-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.sms-card .likes {
    color: var(--pink);
}

/* Single Post */
.single-post {
    max-width: 800px;
    margin: 0 auto;
}
.single-post .post-header {
    margin-bottom: 24px;
}
.single-post .post-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}
.single-post .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.single-post .post-image {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.single-post .post-content {
    font-size: 1.05rem;
    line-height: 1.8;
}
.single-post .post-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 16px 0;
}
.single-post .post-content h2,
.single-post .post-content h3 {
    margin: 24px 0 12px;
    color: var(--accent);
}
.single-post .post-content p {
    margin-bottom: 14px;
}
.single-post .post-content a {
    color: var(--purple);
}

/* Comments - modern card design */
.comments-section {
    margin-top: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 16px 20px;
    margin-bottom: 24px;
}
.comments-header {
    margin-bottom: 16px;
}
.comments-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.comments-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7f00ff, #58a6ff);
    color: #fff;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.comments-title h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}
.comments-count {
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Compose */
.comment-compose {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 16px;
}
.compose-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.compose-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7f00ff, #58a6ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
}
.compose-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comment-compose textarea {
    flex: 1;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 12px 14px;
    font-family: var(--font);
    font-size: 0.95rem;
    resize: vertical;
    min-height: 52px;
    line-height: 1.5;
}
.comment-compose textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}
.comment-compose textarea::placeholder {
    color: var(--text-muted);
}
.btn-comment-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    margin-left: auto;
    width: 100%;
    max-width: 100%;
    padding: 11px 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #7f00ff, #58a6ff);
    color: #fff;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(88, 166, 255, 0.3);
}
.btn-comment-submit:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(127, 0, 255, 0.35);
}
.btn-comment-submit:active {
    transform: translateY(0);
}
.comment-login-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.comment-login-hint a {
    color: var(--accent);
    font-weight: 600;
}

/* Comment cards */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.comments-empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--text-muted);
}
.comments-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}
.comments-empty p {
    margin: 0;
    font-size: 0.95rem;
}
.comment-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    border-left: 3px solid transparent;
    transition: border-color 0.2s, background 0.2s;
}
.comment-card:hover {
    background: var(--bg-hover);
}
.comment-accent-blue { border-left-color: #58a6ff; }
.comment-accent-purple { border-left-color: #a371f7; }
.comment-accent-teal { border-left-color: #3fb950; }
.comment-accent-pink { border-left-color: #f778ba; }
.comment-accent-orange { border-left-color: #d29922; }

.comment-card-inner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    font-size: 0.9rem;
}
.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comment-avatar-blue { background: linear-gradient(135deg, #1f6feb, #58a6ff); }
.comment-avatar-purple { background: linear-gradient(135deg, #8957e5, #a371f7); }
.comment-avatar-teal { background: linear-gradient(135deg, #238636, #3fb950); }
.comment-avatar-pink { background: linear-gradient(135deg, #bf4b8a, #f778ba); }
.comment-avatar-orange { background: linear-gradient(135deg, #9e6a03, #d29922); }

.comment-content {
    flex: 1;
    min-width: 0;
}
.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.comment-author {
    font-weight: 600;
    font-size: 0.95rem;
}
.comment-name-blue { color: #58a6ff; }
.comment-name-purple { color: #a371f7; }
.comment-name-teal { color: #3fb950; }
.comment-name-pink { color: #f778ba; }
.comment-name-orange { color: #d29922; }
.comment-dot {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.comment-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.comment-text {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.55;
    font-size: 0.95rem;
    word-wrap: break-word;
}

@media (min-width: 769px) {
    .comments-section {
        padding: 22px 24px 24px;
    }
    .btn-comment-submit {
        width: auto;
        margin-left: 52px;
        padding: 10px 22px;
    }
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-hover);
}
.btn-danger {
    background: var(--red);
    color: #fff;
}
.btn-success {
    background: var(--green);
    color: #fff;
}
.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Auth Pages */
.auth-box {
    max-width: 420px;
    margin: 40px auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}
.auth-box h1 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.5rem;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.alert-success {
    background: rgba(63, 185, 80, 0.15);
    border: 1px solid var(--green);
    color: var(--green);
}
.alert-error {
    background: rgba(248, 81, 73, 0.15);
    border: 1px solid var(--red);
    color: var(--red);
}
.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Pagination */
.pagination {
    margin: 32px 0;
}
.pagination ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.pagination li a {
    display: block;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
}
.pagination li.active a,
.pagination li a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Sidebar */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
}
.sidebar .widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 20px;
}
.sidebar .widget h3 {
    font-size: 1.1rem;
    margin-bottom: 14px;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}
.sidebar .widget ul {
    list-style: none;
}
.sidebar .widget li {
    margin-bottom: 8px;
}
.sidebar .widget li a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.sidebar .widget li a:hover {
    color: var(--accent);
}

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 28px 0 20px;
    margin-top: 40px;
}

/* Mobile footer: search + post categories (2-col) */
.footer-mobile-nav {
    display: block;
    margin-bottom: 20px;
}
.footer-search {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 100%;
    margin: 0 auto 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.footer-search input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    padding: 12px 18px;
    outline: none;
    min-width: 0;
}
.footer-search input::placeholder {
    color: var(--text-muted);
}
.footer-search button {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    margin: 3px;
    background: linear-gradient(135deg, #58a6ff, #1f6feb);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    transition: opacity 0.2s;
}
.footer-search button:hover {
    opacity: 0.9;
}
.footer-cat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
}
.footer-cat-grid a {
    display: block;
    padding: 10px 4px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-family: var(--font);
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}
.footer-cat-grid a:hover {
    color: var(--accent);
    background: var(--bg-hover);
}

/* PC footer grid: about + social only */
.footer-grid {
    display: none;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}
.footer-about h3 {
    margin-bottom: 10px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.footer-about p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.footer-social h4 {
    margin-bottom: 12px;
    color: var(--text-primary);
}
.footer-social-all {
    margin-top: 20px;
    margin-bottom: 8px;
    text-align: center;
}
.footer-social-all h4 {
    text-align: center;
}
.footer-social-all .social-icons {
    justify-content: center;
}
.social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.social-icons a {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.15rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
/* Brand color icons + hover animation */
.social-icons a.social-fb {
    color: #1877F2;
    border-color: rgba(24, 119, 242, 0.45);
}
.social-icons a.social-fb:hover {
    background: #1877F2;
    border-color: #1877F2;
    color: #fff;
    box-shadow: 0 6px 16px rgba(24, 119, 242, 0.45);
}
.social-icons a.social-ig {
    color: #E4405F;
    border-color: rgba(228, 64, 95, 0.45);
}
.social-icons a.social-ig:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(225, 48, 108, 0.45);
}
.social-icons a.social-yt {
    color: #FF0000;
    border-color: rgba(255, 0, 0, 0.45);
}
.social-icons a.social-yt:hover {
    background: #FF0000;
    border-color: #FF0000;
    color: #fff;
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.4);
}
.social-icons a.social-tt {
    color: #25F4EE;
    border-color: rgba(37, 244, 238, 0.45);
}
.social-icons a.social-tt:hover {
    background: #010101;
    border-color: #FE2C55;
    color: #fff;
    box-shadow: 0 6px 16px rgba(254, 44, 85, 0.35);
}
.social-icons a.social-wa {
    color: #25D366;
    border-color: rgba(37, 211, 102, 0.45);
}
.social-icons a.social-wa:hover {
    background: #25D366;
    border-color: #25D366;
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}
.social-icons a:hover {
    transform: translateY(-3px) scale(1.08);
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (min-width: 769px) {
    .footer-mobile-nav {
        display: none !important;
    }
    .footer-grid.footer-pc {
        display: grid !important;
        grid-template-columns: 1fr;
        margin-bottom: 16px;
        text-align: center;
    }
    .footer-about {
        text-align: center;
    }
    .footer-social-all {
        text-align: center;
        margin-top: 0;
    }
    .footer-social-all .social-icons,
    .social-icons {
        justify-content: center;
    }
}

/* Ads */
.ad-container {
    text-align: center;
    margin: 16px 0;
    overflow: hidden;
}

/* Admin */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}
.admin-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 20px 0;
}
.admin-sidebar .logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    background: var(--bg-hover);
    color: var(--accent);
}
.admin-content {
    padding: 24px;
}
.admin-content h1 {
    margin-bottom: 24px;
    font-size: 1.6rem;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}
.stat-card .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.table-responsive {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
}
th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}
td {
    font-size: 0.95rem;
}
tr:hover td {
    background: var(--bg-hover);
}
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-published { background: rgba(63,185,80,0.2); color: var(--green); }
.badge-draft { background: rgba(139,148,158,0.2); color: var(--text-muted); }
.badge-pending { background: rgba(210,153,34,0.2); color: var(--orange); }
.badge-admin { background: rgba(163,113,247,0.2); color: var(--purple); }

/* Responsive */
@media (max-width: 900px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        display: none;
    }
}
@media (max-width: 768px) {
    .menu-toggle {
        display: none !important;
    }
    .site-header .header-top {
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    .main-nav {
        display: block !important;
        position: static !important;
        width: 100%;
        transform: none !important;
        background: transparent !important;
        border: none !important;
        padding: 0 0 6px !important;
        box-shadow: none !important;
        overflow: visible !important;
    }
    .main-nav ul {
        flex-direction: row !important;
        flex-wrap: nowrap;
        align-items: center;
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .main-nav ul::-webkit-scrollbar { display: none; }
    .main-nav ul li { flex-shrink: 0; }
    .main-nav ul li a {
        padding: 7px 12px !important;
        font-size: 0.82rem !important;
        white-space: nowrap;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: var(--bg-secondary);
    }
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background: var(--bg-primary);
    }
    .dropdown.open .dropdown-menu {
        display: block;
    }
    .posts-grid {
        grid-template-columns: 1fr;
    }
    .single-post .post-header h1 {
        font-size: 1.4rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Like / Dislike buttons */
.btn-react {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}
.btn-react:hover {
    background: var(--bg-hover);
}
.btn-like:hover, .btn-like.reacted {
    color: var(--pink);
}
.btn-dislike:hover, .btn-dislike.reacted {
    color: var(--accent);
}
.btn-react:disabled {
    opacity: 0.6;
    cursor: default;
}
.likes {
    display: flex;
    align-items: center;
    gap: 4px;
}


/* ========== List Style Cards (Dark Theme - Mobile Layout) ========== */
.cat-section {
    margin-bottom: 32px;
}

/* Mobile default: original simple header (first design) */
.cat-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}
.cat-section-title {
    display: block !important;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
    box-shadow: none;
    line-height: 1.3;
    max-width: none;
}
.cat-section-title i {
    color: var(--accent) !important;
}
.see-more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent) !important;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transition: color 0.2s;
}
.see-more-link:hover {
    color: var(--accent-hover) !important;
    opacity: 1;
    transform: none;
    background: transparent;
}

/* PC: Style 5 split banner */
@media (min-width: 769px) {
    .cat-section-header {
        align-items: stretch;
        gap: 0;
        margin-bottom: 16px;
        padding-bottom: 0;
        border-bottom: none;
        border-radius: 999px;
        overflow: hidden;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    }
    .cat-section-title {
        display: inline-flex !important;
        flex: 1;
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        color: #fff !important;
        padding: 11px 18px !important;
        border-radius: 0 !important;
        background: linear-gradient(135deg, #5b21b6, #7c3aed, #4c1d95) !important;
        -webkit-text-fill-color: #fff !important;
        box-shadow: none;
        max-width: none;
    }
    .cat-section-title i {
        color: #fff !important;
    }
    .see-more-link {
        font-size: 0.85rem;
        padding: 11px 18px;
        border-radius: 0;
        color: #fff !important;
        background: #2563eb;
        box-shadow: none;
        transform: none;
    }
    .see-more-link:hover {
        color: #fff !important;
        background: #1d4ed8;
        opacity: 1;
        transform: none;
    }
    .cat-section-header:not(:has(.see-more-link)) .cat-section-title {
        border-radius: 999px !important;
    }
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-list-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 12px;
    padding: 12px !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.post-list-item:hover {
    border-color: var(--accent) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

/* Mobile: compact title-only rows (2nd–5th posts under category) */
.post-list-item.post-list-title-only {
    padding: 10px 12px !important;
    align-items: center;
    gap: 0;
}
.post-list-item.post-list-title-only .post-list-body {
    width: 100%;
}
.post-list-item.post-list-title-only .post-list-title {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 600;
}
.post-list-item.post-list-title-only .post-list-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-list-thumb {
    flex-shrink: 0 !important;
    width: 80px !important;
    height: 80px !important;
    border-radius: 8px !important;
    overflow: hidden;
    background: var(--bg-secondary);
    display: block;
}
.post-list-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center;
    display: block;
}
img.lazy-thumb {
    background: var(--bg-secondary);
    transition: opacity 0.35s ease;
}
img.lazy-thumb:not(.lazy-loaded) {
    opacity: 0.85;
    filter: saturate(0.7);
}
img.lazy-thumb.lazy-loaded {
    opacity: 1;
    filter: none;
}
.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.4rem;
    background: var(--bg-secondary);
}

.post-list-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.post-list-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
}
.post-list-title a {
    color: var(--accent) !important;
    text-decoration: none;
}
.post-list-title a:hover {
    color: var(--accent-hover) !important;
}
.post-list-excerpt {
    font-size: 0.82rem !important;
    color: var(--text-secondary) !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-list-meta {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    margin-top: 2px;
}
.post-list-meta i {
    margin-right: 3px;
}
.meta-author {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.author-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.breadcrumb-nav {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.breadcrumb-nav a {
    color: var(--accent);
}

/* Force list layout on all screens for these sections */
@media (max-width: 768px) {
    .post-list-thumb {
        width: 70px !important;
        height: 70px !important;
    }
    .post-list-title {
        font-size: 0.92rem !important;
    }
    .post-list-excerpt {
        font-size: 0.78rem !important;
    }
    .sidebar {
        display: none !important;
    }
    .page-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 769px) {
    .post-list-thumb {
        width: 90px !important;
        height: 90px !important;
    }
    .post-list-title {
        font-size: 1.05rem !important;
    }
}

/* ========== Mobile / PC visibility ========== */
.pc-only { display: none !important; }
.mobile-only { display: block !important; }
.mobile-hide { display: none !important; }

@media (min-width: 769px) {
    .pc-only { display: block !important; }
    .mobile-only { display: none !important; }
    .mobile-hide { display: none !important; }
    .post-grid.pc-only { display: grid !important; }
}

/* ========== PC Post Grid Cards ========== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.post-grid-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.post-grid-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.pgc-thumb {
    display: block;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: var(--bg-secondary);
}
.pgc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s;
}
.post-grid-card:hover .pgc-thumb img {
    transform: scale(1.05);
}
.pgc-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}
.pgc-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.pgc-cat {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    background: var(--purple);
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    width: fit-content;
}
.pgc-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px;
}
.pgc-title a {
    color: var(--text-primary);
}
.pgc-title a:hover {
    color: var(--accent);
}
.pgc-excerpt {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.pgc-meta {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem !important;
    color: var(--text-muted) !important;
    margin-top: auto;
    font-family: var(--font);
}
.pgc-meta i {
    margin-right: 3px;
}
.pgc-meta .meta-author {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.pgc-meta .author-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

/* Home SMS Zone category chips */
.sms-home-section {
    margin-bottom: 28px;
}
.sms-cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.sms-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}
.sms-cat-chip:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
    color: var(--accent);
    transform: translateY(-1px);
}
.sms-cat-chip-count {
    background: var(--bg-secondary);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}
.sms-cat-chip:hover .sms-cat-chip-count {
    background: rgba(88, 166, 255, 0.15);
}

/* ========== PC Sidebar category list ========== */
.home-layout {
    display: block;
}
@media (min-width: 900px) {
    .home-layout {
        display: grid !important;
        grid-template-columns: 1fr 280px;
        gap: 28px;
        align-items: start;
    }
    .pc-sidebar {
        display: block !important;
        position: static;
        top: 72px;
        max-height: calc(100vh - 88px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding-right: 4px;
        align-self: start;
        scrollbar-width: thin;
        scrollbar-color: var(--border) transparent;
    }
    .pc-sidebar::-webkit-scrollbar {
        width: 5px;
    }
    .pc-sidebar::-webkit-scrollbar-track {
        background: transparent;
    }
    .pc-sidebar::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 4px;
    }
}
.pc-sidebar {
    display: none;
}
.cat-count-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cat-count-item {
    position: relative;
    margin-bottom: 4px;
}
.cat-count-link {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px !important;
    border-radius: 8px;
    color: var(--text-secondary) !important;
    font-size: 0.9rem !important;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    transition: all 0.2s;
}
.cat-count-link:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
    border-color: var(--border);
}
.count-badge {
    background: var(--bg-card);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 28px;
    text-align: center;
}
.sub-dropdown {
    display: none;
    list-style: none;
    margin: 4px 0 6px 6px;
    padding: 6px 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.cat-count-item.has-submenu:hover > .sub-dropdown,
.cat-count-item.has-submenu:focus-within > .sub-dropdown {
    display: block;
}
.sub-dropdown li a {
    display: flex !important;
    justify-content: space-between;
    padding: 6px 12px !important;
    font-size: 0.82rem !important;
    color: var(--text-muted) !important;
}
.sub-dropdown li a:hover {
    color: var(--accent) !important;
    background: var(--bg-hover);
}

/* ========== Nav nested dropdown ========== */
.dropdown-mega {
    min-width: 240px;
    max-height: 70vh;
    overflow-y: auto;
}
.dropdown-sub {
    position: relative;
}
.dropdown-sub > a {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
}
.nav-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 8px;
}
.dropdown-submenu {
    display: none;
    list-style: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 0;
    box-shadow: var(--shadow);
    z-index: 200;
}
.dropdown-sub:hover > .dropdown-submenu {
    display: block;
}
.dropdown-submenu li a {
    display: flex !important;
    justify-content: space-between;
    padding: 7px 14px !important;
    font-size: 0.88rem !important;
    color: var(--text-secondary) !important;
}
.dropdown-submenu li a:hover {
    background: var(--bg-hover);
    color: var(--text-primary) !important;
}

@media (max-width: 768px) {
    .dropdown-submenu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background: var(--bg-primary);
        padding-left: 12px;
    }
    .dropdown-sub.open > .dropdown-submenu {
        display: block;
    }
    .pc-sidebar {
        display: none !important;
    }
}

@media (min-width: 1100px) {
    .post-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 769px) and (max-width: 1099px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* SMS separate section */
.sms-section-wrap {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
}
.sms-main-header {
    margin-bottom: 20px !important;
}
.sms-main-header .cat-section-title {
    font-size: 1rem !important;
}
@media (max-width: 768px) {
    .mobile-hide-sms { display: none !important; }
}
@media (min-width: 769px) {
    .mobile-hide-sms { display: block !important; }
}

/* Force hide old leftover widgets / floating chips (NOT header/footer ads) */
#bdboys,
#progress-container + div[style*="chip"],
.floating-cats {
    display: none !important;
}

/* Header & Footer ads — visible on mobile + PC */
.ad-container.header-ad,
.ad-container.footer-ad {
    display: block !important;
    visibility: visible !important;
    max-width: 1100px;
    margin: 12px auto;
    padding: 0 16px;
    text-align: center;
    overflow: hidden;
}
.ad-container.header-ad img,
.ad-container.header-ad iframe,
.ad-container.footer-ad img,
.ad-container.footer-ad iframe {
    max-width: 100%;
    height: auto;
}

.sms-zone-header .cat-section-title {
    font-size: 1.05rem !important;
}
.sms-sub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.sms-sub-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--text-secondary) !important;
}
.sms-sub-chip:hover {
    border-color: var(--pink);
    color: var(--text-primary) !important;
}
.sms-sub-chip span {
    background: var(--bg-secondary);
    color: var(--pink);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
}

.cat-count-link.active-cat {
    background: var(--bg-hover) !important;
    color: var(--accent) !important;
    border-color: var(--border);
}

/* Mobile: show sub-categories as chips above SMS list */
.mobile-sub-bar {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
@media (max-width: 899px) {
    .mobile-sub-bar {
        display: flex;
    }
}

.sms-sub-chip.active-chip {
    border-color: var(--pink);
    color: var(--text-primary) !important;
    background: var(--bg-hover);
}

.mobile-sub-list {
    display: none;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.mobile-sub-title {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}
@media (max-width: 899px) {
    .mobile-sub-list {
        display: block;
    }
}
@media (min-width: 900px) {
    .mobile-sub-list {
        display: none !important;
    }
}

/* Single Post Page */
.single-post {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 18px 24px;
    margin-bottom: 28px;
}
.single-title {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 10px 0 12px;
    color: var(--text-primary);
}
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.post-image {
    width: 100%;
    max-height: none;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 20px;
}
.single-post .post-content {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--text-primary);
}
.single-post .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 12px 0;
}
.single-post .post-content h2,
.single-post .post-content h3 {
    margin: 20px 0 10px;
    color: var(--text-primary);
}
.single-post .post-content p {
    margin-bottom: 14px;
}
.single-post .post-content a {
    color: var(--accent);
}
.post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.post-actions .btn {
    font-size: 0.9rem;
}
@media (min-width: 769px) {
    .single-post {
        padding: 28px 32px 32px;
    }
    .single-title {
        font-size: 1.75rem;
    }
}



/* Post page tabs - polished */
.post-tabs-section {
    margin-top: 28px;
}
.post-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    padding: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.post-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 11px 14px;
    cursor: pointer;
    border-radius: 9px;
    transition: all 0.2s ease;
}
.post-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}
.post-tab.active {
    color: #fff !important;
    background: linear-gradient(135deg, #7f00ff, #58a6ff) !important;
    box-shadow: 0 4px 14px rgba(88, 166, 255, 0.35);
}
.tab-panel {
    display: none !important;
}
.tab-panel.active {
    display: block !important;
}
/* Inside active tab: respect mobile/pc layout */
.tab-panel.active .post-list.mobile-only {
    display: flex !important;
    flex-direction: column;
}
.tab-panel.active .post-grid.pc-only {
    display: none !important;
}
@media (min-width: 769px) {
    .tab-panel.active .post-list.mobile-only {
        display: none !important;
    }
    .tab-panel.active .post-grid.pc-only {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}
@media (min-width: 769px) and (max-width: 1099px) {
    .tab-panel.active .post-grid.pc-only {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== Mobile Quick Link (SMS categories) ========== */
.quick-link-bar {
    display: none;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 12px 0 14px;
}
.quick-link-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
}
.quick-link-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.quick-link-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font);
    transition: all 0.2s;
}
.quick-link-chip:hover {
    color: #fff;
    background: linear-gradient(135deg, #7f00ff, #4b6bff);
    border-color: transparent;
}
@media (max-width: 768px) {
    .quick-link-bar {
        display: block;
    }
}
@media (min-width: 769px) {
    .quick-link-bar {
        display: none !important;
    }
}

/* ========== SMS Card v2 (screenshot style) ========== */
.sms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.sms-card-v2 {
    background: #0d1117;
    border: 1px solid #21262d;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sms-card-v2:hover {
    border-color: #30363d;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.sms-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.sms-serial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #34d399, #059669 55%, #047857);
    border: 1.5px solid rgba(52, 211, 153, 0.85);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    flex-shrink: 0;
    box-shadow:
        0 0 8px rgba(16, 185, 129, 0.55),
        0 0 18px rgba(16, 185, 129, 0.35),
        0 0 28px rgba(5, 150, 105, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    text-shadow: 0 0 6px rgba(167, 243, 208, 0.5);
}
.sms-card-v2:hover .sms-serial {
    box-shadow:
        0 0 10px rgba(16, 185, 129, 0.7),
        0 0 22px rgba(16, 185, 129, 0.45),
        0 0 36px rgba(5, 150, 105, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.sms-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
}
.sms-cat-badge i { font-size: 0.75rem; }
.badge-pink { background: linear-gradient(135deg, #e11d48, #be123c); }
.badge-red { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.badge-purple { background: linear-gradient(135deg, #7c3aed, #5b21b6); }
.badge-orange { background: linear-gradient(135deg, #ea580c, #c2410c); }
.badge-teal { background: linear-gradient(135deg, #0d9488, #0f766e); }
.badge-blue { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.badge-green { background: linear-gradient(135deg, #16a34a, #15803d); }

.sms-heart-btn {
    background: transparent;
    border: none;
    color: #f43f5e;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    opacity: 0.85;
}
.sms-heart-btn:hover { opacity: 1; transform: scale(1.1); }

.sms-card-body { flex: 1; }
.sms-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #e6edf3;
    white-space: pre-wrap;
    word-break: break-word;
}

.sms-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 0.78rem;
    color: #8b949e;
}
.sms-card-meta i { margin-right: 4px; }

.sms-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding-top: 4px;
    border-top: 1px solid #21262d;
}
.sms-stat {
    font-size: 0.82rem;
    color: #8b949e;
}
.sms-stat .fa-heart { color: #f43f5e; }
.sms-share-btn {
    background: transparent;
    border: none;
    color: #8b949e;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: var(--font);
}
.sms-share-btn:hover { color: var(--accent); }
.sms-read-more {
    margin-left: auto;
    background: transparent;
    border: 1px solid #f43f5e;
    color: #f43f5e;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
}
.sms-read-more:hover {
    background: #f43f5e;
    color: #fff;
}

/* SMS compose box */
.sms-compose-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
}
.sms-compose-box h3 {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--text-primary);
}
.sms-compose-box textarea {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    padding: 12px;
    margin-bottom: 12px;
}
.sms-compose-box textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.sms-compose-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}
.sms-login-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    padding: 18px 14px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.sms-login-hint p {
    margin: 0;
}
.sms-login-hint a.sms-login-btn,
.sms-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
}

/* SMS react buttons */
.sms-react-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: transform 0.2s, border-color 0.2s, color 0.2s, background 0.2s;
}
.sms-like-btn { color: #f43f5e; border-color: rgba(244, 63, 94, 0.35); }
.sms-like-btn:hover,
.sms-like-btn.reacted {
    background: rgba(244, 63, 94, 0.12);
    border-color: #f43f5e;
    color: #f43f5e;
}
.sms-dislike-btn { color: #a78bfa; border-color: rgba(167, 139, 250, 0.35); }
.sms-dislike-btn:hover,
.sms-dislike-btn.reacted {
    background: rgba(167, 139, 250, 0.12);
    border-color: #a78bfa;
    color: #a78bfa;
}
.sms-react-btn.react-pop {
    animation: smsReactPop 0.4s ease;
}
@keyframes smsReactPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* SMS Share modal */
.sms-share-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.sms-share-overlay.open {
    display: flex;
}
.sms-share-box {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card, #161b22);
    border: 1px solid var(--border, #30363d);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.sms-share-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.sms-share-head h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-primary, #e6edf3);
}
.sms-share-close {
    background: transparent;
    border: none;
    color: var(--text-muted, #8b949e);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.sms-share-text {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    background: var(--bg-secondary, #0d1117);
    border: 1px solid var(--border, #30363d);
    border-radius: 10px;
    color: var(--text-primary, #e6edf3);
    font-family: var(--font, inherit);
    font-size: 0.95rem;
    padding: 12px;
    margin-bottom: 14px;
    box-sizing: border-box;
}
.sms-share-text:focus {
    outline: none;
    border-color: var(--accent, #58a6ff);
}
.sms-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.btn-share-action {
    flex: 1;
    min-width: 110px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    font-family: var(--font, inherit);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
}
.sms-share-wa { background: #25D366; }
.sms-share-wa:hover { opacity: 0.92; color: #fff; }
.sms-share-sms { background: #2563eb; }
.sms-share-sms:hover { opacity: 0.92; color: #fff; }
.sms-share-copy { background: #30363d; color: #e6edf3; }
.sms-share-copy:hover { background: #484f58; }

.sms-share-btn {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
    font-family: var(--font);
}
.sms-share-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Inline share box inside SMS card (not popup) */
.sms-inline-share {
    margin-top: 4px;
}
.sms-inline-text {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    box-sizing: border-box;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    color: #e6edf3;
    font-family: var(--font, inherit);
    font-size: 0.95rem;
    line-height: 1.65;
    padding: 14px;
    margin-bottom: 10px;
    white-space: pre-wrap;
}
.sms-inline-text:focus {
    outline: none;
    border-color: #58a6ff;
}
.sms-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sms-inline-actions a,
.sms-inline-actions button {
    flex: 1;
    min-width: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
    border-radius: 10px;
    border: none;
    font-family: var(--font, inherit);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
}
.sms-inline-wa { background: #25D366; }
.sms-inline-wa:hover { opacity: 0.92; color: #fff; }
.sms-inline-sms { background: #2563eb; }
.sms-inline-sms:hover { opacity: 0.92; color: #fff; }
.sms-inline-copy { background: #30363d; color: #e6edf3; }
.sms-inline-copy:hover { background: #484f58; }

.sms-card-v2.share-open {
    border-color: #30363d;
}

/* SMS author avatar */
.sms-meta-author {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.sms-author-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.sms-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed, #4b6bff);
    color: #fff;
    font-size: 0.55rem;
}
.sms-card-meta {
    font-size: 0.78rem;
}
.sms-meta-author {
    font-size: 0.78rem;
}

/* Latest posts block above footer (SMS pages) */
.latest-posts-block {
    margin: 32px 0 8px;
    padding-top: 8px;
}
.latest-posts-block .cat-section-header {
    margin-bottom: 16px;
}

/* Mobile SMS sub-category list */
.mobile-sub-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mobile-sub-cat-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: border-color 0.2s, background 0.2s;
}
.mobile-sub-cat-list li a:hover,
.mobile-sub-cat-list li a.active-sub {
    border-color: var(--accent);
    background: var(--bg-hover);
    color: var(--accent);
}

/* SMS edit / delete buttons */
.sms-edit-btn {
    color: #58a6ff;
    border-color: rgba(88, 166, 255, 0.35);
}
.sms-edit-btn:hover {
    background: rgba(88, 166, 255, 0.12);
    border-color: #58a6ff;
    color: #58a6ff;
}
.sms-delete-btn {
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.35);
}
.sms-delete-btn:hover {
    background: rgba(248, 81, 73, 0.12);
    border-color: #f85149;
    color: #f85149;
}
.sms-inline-edit {
    margin-top: 4px;
}
.sms-edit-text {
    width: 100%;
    min-height: 100px;
    resize: vertical;
    box-sizing: border-box;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    color: #e6edf3;
    font-family: var(--font, inherit);
    font-size: 0.95rem;
    line-height: 1.65;
    padding: 12px;
    margin-bottom: 10px;
}
.sms-edit-text:focus {
    outline: none;
    border-color: #58a6ff;
}
.sms-edit-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== Nav login button ===== */
.nav-login-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #7f00ff, #e100ff) !important;
    color: #fff !important;
    padding: 8px 16px !important;
    border-radius: 999px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 12px rgba(225, 0, 255, 0.35);
    transition: transform 0.15s, box-shadow 0.15s !important;
}
.nav-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(225, 0, 255, 0.5);
    color: #fff !important;
}
.nav-register-link { opacity: 0.9; }

/* ===== Login page polish ===== */
.auth-box-login {
    max-width: 420px;
    text-align: center;
}
.auth-icon-wrap {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(127,0,255,0.25), rgba(0,212,255,0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--accent);
}
.auth-subtitle {
    color: var(--text-muted);
    margin: -8px 0 20px;
    font-size: 0.95rem;
}
.auth-form { text-align: left; }
.remember-row { margin-bottom: 18px; }
.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
}
.remember-label input { width: 16px; height: 16px; accent-color: var(--accent); }
.btn-login-submit {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.05rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.auth-footer-text {
    text-align: center;
    margin-top: 18px;
    color: var(--text-muted);
}

/* ===== Sub category chips (post category) ===== */
.admin-quick-sub {
    margin: 0 0 14px;
}
.btn-admin-sub {
    background: rgba(63, 185, 80, 0.12);
    border: 1px solid rgba(63, 185, 80, 0.4);
    color: var(--green);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: var(--font);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-admin-sub:hover {
    background: rgba(63, 185, 80, 0.22);
}
.quick-sub-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.quick-sub-form .form-control {
    flex: 1;
    min-width: 180px;
}
.sub-cat-bar {
    margin: 0 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.sub-cat-chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
}
.sub-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.88rem;
    white-space: nowrap;
    transition: all 0.15s;
}
.sub-cat-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.sub-cat-chip.active {
    background: rgba(88, 166, 255, 0.15);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
}
.sub-cat-chip .chip-count {
    background: rgba(255,255,255,0.08);
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.75rem;
}
.sub-list-top {
    margin-bottom: 18px;
}

/* ===== Post react + share (SMS-style, slightly larger) ===== */
.post-actions-v2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.post-react-group,
.post-share-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.post-react-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}
.post-like-btn { color: #f43f5e; border-color: rgba(244, 63, 94, 0.4); }
.post-like-btn:hover,
.post-like-btn.active,
.post-like-btn.reacted {
    background: rgba(244, 63, 94, 0.15);
    border-color: #f43f5e;
    color: #fb7185;
}
.post-dislike-btn { color: #a78bfa; border-color: rgba(167, 139, 250, 0.4); }
.post-dislike-btn:hover,
.post-dislike-btn.active,
.post-dislike-btn.reacted {
    background: rgba(167, 139, 250, 0.15);
    border-color: #a78bfa;
    color: #c4b5fd;
}
.post-react-btn.react-pop {
    transform: scale(1.08);
}
.post-share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.post-share-btn:hover { transform: translateY(-2px); color: #fff; }
.post-share-fb:hover { background: #1877f2; border-color: #1877f2; }
.post-share-wa:hover { background: #25d366; border-color: #25d366; }
.post-share-tw:hover { background: #000; border-color: #333; }
.post-share-copy:hover { background: var(--accent); border-color: var(--accent); }

/* ===== Author card under post ===== */
.post-author-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
    padding: 16px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.post-author-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.post-author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}
.post-author-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 1.3rem;
}
.author-verify-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    font-size: 0.85rem;
}
.author-verify-inline {
    color: #3b82f6;
    font-size: 0.9rem;
    margin-left: 4px;
}
.post-author-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}
.post-author-meta {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 2px;
}
.post-author-meta i { margin-right: 4px; }

@media (max-width: 480px) {
    .post-actions-v2 {
        flex-direction: column;
        align-items: stretch;
    }
    .post-react-group,
    .post-share-group {
        justify-content: center;
    }
}

.post-author-verified-line {
    margin-top: 4px;
    font-size: 0.82rem;
    color: #3b82f6;
    font-weight: 500;
}
.post-author-verified-line::before {
    content: "✓ ";
    font-weight: 700;
}

/* ===== Author name link + post manage buttons ===== */
.author-name-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}
.author-name-link:hover {
    color: var(--accent);
    text-decoration: underline;
}
.post-meta-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
}
.inline-delete-form {
    display: inline;
    margin: 0;
    padding: 0;
}
.btn-post-manage {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-family: var(--font);
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    line-height: 1.2;
}
.btn-post-edit:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(88, 166, 255, 0.12);
}
.btn-post-delete {
    color: #f85149;
    border-color: rgba(248, 81, 73, 0.35);
}
.btn-post-delete:hover {
    background: rgba(248, 81, 73, 0.15);
    border-color: #f85149;
}

a.post-author-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
}
a.post-author-card-link:hover {
    border-color: var(--accent);
}
.post-author-view-profile {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--accent);
    white-space: nowrap;
    align-self: center;
}

/* ===== Admin quick sub box (always visible on main cat) ===== */
.admin-quick-sub-box {
    background: rgba(63, 185, 80, 0.08);
    border: 1px dashed rgba(63, 185, 80, 0.4);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
}
.admin-quick-sub-label {
    font-size: 0.88rem;
    color: var(--green, #3fb950);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.admin-quick-sub-box .quick-sub-form {
    margin-top: 0;
}

/* ===== Profile page + ID card ===== */
.profile-page {
    max-width: 860px;
    margin: 0 auto 40px;
    padding: 16px 0 32px;
}

.id-card {
    position: relative;
    background: linear-gradient(145deg, #161b22 0%, #0d1117 55%, #12181f 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    margin-bottom: 22px;
}
.id-card-stripe {
    height: 6px;
    background: linear-gradient(90deg, #58a6ff, #3fb950, #a371f7, #f778ba);
}
.id-card-inner {
    display: flex;
    gap: 22px;
    padding: 22px 24px 20px;
    flex-wrap: wrap;
}
.id-card-left {
    flex-shrink: 0;
}
.id-card-avatar {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(88, 166, 255, 0.45);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.id-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.id-card-avatar-fallback {
    font-size: 2.6rem;
    color: var(--text-muted);
}
.id-card-badge {
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0d1117;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    border: 2px solid #0d1117;
}
.id-card-right {
    flex: 1;
    min-width: 220px;
}
.id-card-brand {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.id-card-name {
    font-size: 1.45rem;
    margin: 0 0 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}
.id-card-role {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(88, 166, 255, 0.15);
    color: var(--accent);
    margin-bottom: 12px;
}
.id-card-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px 16px;
    margin-bottom: 10px;
}
.id-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.id-field-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}
.id-field-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
    word-break: break-word;
}
.id-field-value.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}
.id-card-about {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.id-card-actions {
    margin-top: 14px;
}

/* Profile tabs */
.profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
    padding-bottom: 0;
}
.profile-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}
.profile-tab:hover {
    color: var(--text-primary);
}
.profile-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}
.profile-tab .tab-count {
    background: rgba(255,255,255,0.08);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.profile-edit-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    max-width: 520px;
}
.profile-edit-box h2 {
    font-size: 1.1rem;
    margin: 0 0 16px;
}

.profile-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.profile-post-item {
    display: flex;
    gap: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    transition: border-color 0.15s;
}
.profile-post-item:hover {
    border-color: var(--accent);
}
.profile-post-thumb {
    flex-shrink: 0;
    width: 96px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-primary);
}
.profile-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-post-body {
    flex: 1;
    min-width: 0;
}
.profile-post-body h3 {
    margin: 4px 0 6px;
    font-size: 1rem;
    line-height: 1.35;
}
.profile-post-body h3 a {
    color: var(--text-primary);
    text-decoration: none;
}
.profile-post-body h3 a:hover {
    color: var(--accent);
}
.profile-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.profile-post-actions {
    margin-top: 8px;
}
.profile-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
}
.profile-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

@media (max-width: 600px) {
    .id-card-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 18px 16px;
    }
    .id-card-fields {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .id-card-name {
        justify-content: center;
    }
    .id-card-actions {
        display: flex;
        justify-content: center;
    }
    .profile-post-thumb {
        width: 72px;
        height: 56px;
    }
    .post-meta {
        flex-wrap: wrap;
    }
    .post-meta-actions {
        width: 100%;
        margin-top: 6px;
    }
}

/* Nav notification badge */
.nav-notif-link {
    position: relative;
}
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #f85149;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 2px;
    vertical-align: top;
}

/* Role request bar under header */
.role-request-bar {
    background: linear-gradient(90deg, rgba(88,166,255,0.12), rgba(163,113,247,0.12));
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}
.role-request-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}
.role-request-btn:hover { text-decoration: underline; }

/* Sidebar mini search between SMS & Post cats */
.sidebar-search-widget { padding: 0 0 4px; }
.sidebar-mini-search {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-secondary);
}
.sidebar-mini-search input {
    border: none;
    background: transparent;
    color: var(--text-primary);
    padding: 10px 12px;
    flex: 1;
    min-width: 0;
    font-family: var(--font);
    font-size: 0.9rem;
}
.sidebar-mini-search input:focus { outline: none; }
.sidebar-mini-search button {
    border: none;
    background: rgba(88,166,255,0.15);
    color: var(--accent);
    padding: 0 14px;
    cursor: pointer;
}

/* Comment replies */
.btn-comment-reply {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 4px;
    font-family: var(--font);
}
.btn-comment-reply:hover { color: var(--accent); }
.comment-replies {
    margin: 10px 0 0 36px;
    padding-left: 12px;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.comment-reply { margin: 0; }
.comment-reply-form {
    margin: 10px 0 0 36px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.comment-reply-form textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 10px;
    font-family: var(--font);
    resize: vertical;
}
.reply-form-actions { display: flex; gap: 8px; }

/* Notifications page */
.notif-page { max-width: 720px; margin: 0 auto 40px; padding: 16px 0; }
.notif-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 12px;
}
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notif-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.15s;
}
.notif-item.unread {
    border-color: rgba(88,166,255,0.45);
    background: rgba(88,166,255,0.06);
}
.notif-item a {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
}
.notif-icon {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(88,166,255,0.15);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.notif-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-preview { font-size: 0.88rem; color: var(--text-secondary); }
.notif-time { font-size: 0.78rem; color: var(--text-muted); }

.id-field-about { grid-column: 1 / -1; }

/* New post CTA on sub-category */
.new-post-cta {
    display: flex;
    justify-content: center;
    margin: 0 0 14px;
}
.btn-new-post {
    padding: 10px 22px;
    font-weight: 600;
    border-radius: 999px;
}

/* Balance panel */
.balance-card {
    background: linear-gradient(135deg, rgba(88,166,255,0.15), rgba(63,185,80,0.12));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 22px;
    text-align: center;
}
.balance-label { font-size: 0.85rem; color: var(--text-muted); }
.balance-amount { font-size: 2rem; font-weight: 700; color: var(--text-primary); margin: 6px 0; }
.balance-hint { font-size: 0.82rem; color: var(--text-secondary); margin: 0; }
.withdraw-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.method-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 0.88rem;
}
.method-chip:has(input:checked) {
    border-color: var(--accent);
    background: rgba(88,166,255,0.12);
    color: var(--accent);
}

/* Splash loading */
.site-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: radial-gradient(ellipse at 50% 40%, #161b22 0%, #0d1117 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s;
}
.site-splash.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.splash-inner { text-align: center; position: relative; }
.splash-love {
    width: 150px;
    height: 120px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 18px rgba(245, 0, 0, 0.7)) drop-shadow(0 0 36px rgba(245, 0, 0, 0.35));
}
.splash-love-img {
    width: 140px;
    height: 112px;
    object-fit: contain;
    animation: splash-love-pulse 1.15s ease-in-out infinite;
}
@keyframes splash-love-pulse {
    0%, 100% { transform: scale(0.94); opacity: 0.9; filter: brightness(1); }
    50% { transform: scale(1.1); opacity: 1; filter: brightness(1.2); }
}
.splash-ring {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #f85149;
    border-right-color: #ff6b6b;
    margin: 0 auto 16px;
    animation: splash-spin 0.9s linear infinite;
}
@keyframes splash-spin { to { transform: rotate(360deg); } }
.splash-logo {
    font-size: 2.35rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #fff;
    margin-bottom: 18px;
    white-space: nowrap;
    text-shadow:
        0 0 6px #ff2d55,
        0 0 14px #ff2d55,
        0 0 28px #f85149,
        0 0 48px rgba(248, 81, 73, 0.55);
    animation: splash-neon-glow 1.6s ease-in-out infinite alternate;
}
@keyframes splash-neon-glow {
    0% {
        text-shadow:
            0 0 5px #ff2d55,
            0 0 12px #ff2d55,
            0 0 24px #f85149,
            0 0 40px rgba(248, 81, 73, 0.4);
        transform: scale(1);
        opacity: 0.92;
    }
    100% {
        text-shadow:
            0 0 8px #ff4d6d,
            0 0 18px #ff2d55,
            0 0 36px #f85149,
            0 0 60px rgba(255, 45, 85, 0.7);
        transform: scale(1.03);
        opacity: 1;
    }
}
.splash-bar {
    width: 160px; height: 3px;
    background: rgba(255,255,255,0.08);
    border-radius: 999px;
    margin: 0 auto;
    overflow: hidden;
}
.splash-bar span {
    display: block; height: 100%; width: 40%;
    background: linear-gradient(90deg, #f85149, #ff2d55);
    border-radius: 999px;
    animation: splash-bar 1.1s ease-in-out infinite;
}
@keyframes splash-bar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

/* Profile member of + avatar preview */
.id-card-member-of {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}
.profile-avatar-preview {
    width: 88px; height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(88,166,255,0.45);
}

/* Login avatar size match */
.auth-icon-wrap {
    width: 88px; height: 88px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(88,166,255,0.12);
    border: 2px solid rgba(88,166,255,0.35);
    font-size: 2rem;
    color: var(--accent);
}

/* Mobile header — inline nav (no dropdown drawer) */
@media (max-width: 768px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        backdrop-filter: blur(12px);
        background: rgba(13,17,23,0.94);
        border-bottom: 1px solid var(--border);
    }
    .site-header .header-top {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 8px 0 4px;
        gap: 8px;
    }
    .site-header .logo { flex: 0 0 auto; }
    .site-header .logo-text {
        font-size: 1.05rem;
        font-weight: 700;
        background: linear-gradient(90deg, #58a6ff, #3fb950);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
    }
    .menu-toggle, .nav-backdrop { display: none !important; }
}

.login-avatar-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.author-verify-inline.verify-user { color: #8b949e; }
.author-verify-inline.verify-author { color: #3b82f6; }
.author-verify-inline.verify-admin { color: #f85149; }
.post-thumb-divider {
    height: 1px;
    background: var(--border);
    margin: 14px 0 10px;
}
.post-author-sitename {
    display: block;
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.nav-login-btn, .nav-register-link {
    border: 1px solid var(--border) !important;
    background: var(--bg-secondary) !important;
    border-radius: 999px !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
}
.nav-login-btn {
    background: rgba(88,166,255,0.18) !important;
    border-color: rgba(88,166,255,0.5) !important;
    color: var(--accent) !important;
}
.nav-login-btn:hover {
    background: rgba(88,166,255,0.3) !important;
}
.ad-slot {
    margin: 18px 0;
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    text-align: center;
    overflow: hidden;
}
.sitemap-hub { max-width: 960px; margin: 0 auto 40px; padding: 16px 0; }
.sitemap-xml-link { color: var(--text-muted); margin-bottom: 20px; word-break: break-all; }
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.sitemap-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}
.sitemap-card h2 { font-size: 1rem; margin: 0 0 12px; }
.sitemap-card ul { list-style: none; margin: 0; padding: 0; }
.sitemap-card li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.9rem;
}
.sitemap-card a { color: var(--text-secondary); text-decoration: none; }
.sitemap-card a:hover { color: var(--accent); }

/* Fonts: Bangla Hind Siliguri, English Poppins */
:root {
  --font: 'Hind Siliguri', 'Poppins', system-ui, sans-serif;
  --font-en: 'Poppins', 'Hind Siliguri', system-ui, sans-serif;
}
body, button, input, select, textarea {
  font-family: var(--font);
}
.logo-text, .nav-login-btn, .nav-register-link, .btn, .pgc-cat {
  font-family: var(--font);
}

/* Content typography — normal white-space (nl2br adds <br>; pre-wrap caused huge gaps on Enter) */
.post-content strong,
.post-content b,
.sms-card strong,
.sms-card b {
  color: #708090;
}
.post-content,
.single-post .post-content {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.post-content p,
.single-post .post-content p {
  margin: 0 0 0.55em 0;
  padding: 0;
  white-space: normal;
}
.sms-card .content,
.comment-text {
  margin: 0;
  padding: 0;
  color: #666666;
  white-space: pre-wrap;
}

/* Square author avatar on post */
.post-author-avatar-square,
.post-author-avatar.post-author-avatar-square {
  border-radius: 14px !important;
}
.post-author-avatar-wrap .post-author-avatar {
  border-radius: 14px;
}

/* Online dot */
.id-card-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.id-card-avatar-wrap {
  position: relative;
  display: inline-block;
}
.online-dot {
  position: absolute;
  right: -4px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #0d1117;
}
.online-dot.is-online { background: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.25); }
.online-dot.is-offline { background: #6e7681; }
.btn-follow { width: 100%; justify-content: center; }
.follower-count { font-size: 0.82rem; color: var(--text-muted); }

/* Admin badge purple */
.author-verify-inline.verify-admin { color: #a371f7 !important; }

/* Login not over-highlighted on PC */
.nav-login-btn {
  background: var(--bg-secondary) !important;
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
}
.nav-login-btn:hover {
  color: var(--text-primary) !important;
  background: var(--bg-hover) !important;
}

.method-logo {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Chat */
.chat-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  min-height: 420px;
  margin-bottom: 32px;
}
.chat-people {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.chat-people ul { list-style: none; margin: 0; padding: 0; }
.chat-people a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px; border-radius: 8px; color: var(--text-secondary); text-decoration: none;
}
.chat-people a.active, .chat-people a:hover { background: rgba(88,166,255,0.12); color: var(--accent); }
.chat-people img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.chat-main {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex; flex-direction: column;
}
.chat-head { padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 600; }
.chat-messages { flex: 1; padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; max-height: 360px; }
.chat-bubble { max-width: 75%; padding: 8px 12px; border-radius: 12px; font-size: 0.92rem; }
.chat-bubble.mine { align-self: flex-end; background: rgba(88,166,255,0.2); }
.chat-bubble.theirs { align-self: flex-start; background: rgba(255,255,255,0.06); }
.chat-bubble span { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }
.chat-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }

/* Mobile header: logo left, auth right, nav rows of 4 */
@media (max-width: 768px) {
  .site-header .header-top {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo auth"
      "nav nav";
    gap: 8px 10px;
    align-items: center;
  }
  .site-header .logo { grid-area: logo; }
  .menu-toggle { display: none !important; }
  .main-nav {
    grid-area: nav;
    width: 100% !important;
    display: block !important;
  }
  .main-nav ul {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    overflow: visible !important;
    flex-wrap: unset !important;
  }
  .main-nav ul li {
    flex-shrink: unset;
  }
  .main-nav ul li a {
    justify-content: center;
    text-align: center;
    font-size: 0.72rem !important;
    padding: 8px 4px !important;
    flex-direction: column;
    gap: 4px !important;
  }
  .main-nav ul li a i { margin: 0; font-size: 0.95rem; }
  /* Auth buttons on right */
  .main-nav ul li:has(.nav-login-btn),
  .main-nav ul li:has(.nav-register-link) {
    /* move visually via order is hard; use separate mobile auth row via CSS order on specific items */
  }
}

/* Admin mobile unique */
@media (max-width: 768px) {
  .admin-layout {
    display: block !important;
  }
  .admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100% !important;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 12px !important;
  }
  .admin-sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .admin-sidebar nav a {
    flex: 1 1 calc(50% - 6px);
    padding: 10px 8px !important;
    font-size: 0.82rem;
    border-radius: 10px;
    background: var(--bg-secondary);
    justify-content: center;
    text-align: center;
  }
  .admin-content {
    padding: 14px 12px 40px !important;
  }
}

/* Sitemap design */
.sitemap-hub h1 {
  text-align: center;
  margin-bottom: 8px;
}
.sitemap-card {
  transition: border-color 0.15s, transform 0.15s;
}
.sitemap-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.mobile-auth-actions { display: none; }
@media (max-width: 768px) {
  .mobile-auth-actions {
    display: flex;
    grid-area: auth;
    gap: 6px;
    justify-content: flex-end;
  }
  .btn-mob-auth {
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
  }
  .btn-mob-reg {
    border-color: rgba(88,166,255,0.4);
    color: var(--accent);
  }
  /* Hide login/register from scroll nav on mobile to avoid duplicate */
  .main-nav .nav-login-btn,
  .main-nav .nav-register-link { display: none !important; }
  .main-nav ul li:has(.nav-login-btn),
  .main-nav ul li:has(.nav-register-link) { display: none; }
}
@media (min-width: 769px) {
  .mobile-auth-actions { display: none !important; }
}

/* Sidebar scrolls WITH page content (not independent sticky scroll) */
@media (min-width: 901px) {
  .home-layout,
  .page-layout {
    align-items: flex-start;
  }
  .pc-sidebar,
  .sidebar {
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
    align-self: flex-start;
  }
}

/* Remove purple shadow under login / primary buttons */
.nav-login-btn,
.btn-login-submit,
.btn-primary {
  box-shadow: none !important;
}
.btn-primary:hover {
  box-shadow: none !important;
}

/* Larger post view author profile picture (square) */
.post-author-avatar,
.post-author-avatar-square,
.post-author-avatar.post-author-avatar-square {
  width: 96px !important;
  height: 96px !important;
  border-radius: 16px !important;
  object-fit: cover;
}
.post-author-avatar-fallback {
  width: 96px !important;
  height: 96px !important;
  border-radius: 16px !important;
  font-size: 2.2rem !important;
}

/* Comment avatars square */
.comment-avatar,
.comment-avatar img {
  border-radius: 10px !important;
}

/* Mobile nav: smaller FA icons beside text */
@media (max-width: 768px) {
  .main-nav ul li a {
    flex-direction: row !important;
    gap: 4px !important;
    font-size: 0.7rem !important;
    padding: 7px 4px !important;
  }
  .main-nav ul li a i {
    font-size: 0.72rem !important;
  }
}

/* Soft page loading overlay (no browser progress bar) */
.page-transit {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(13,17,23,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.page-transit.show {
  opacity: 1;
  pointer-events: all;
}
.page-transit:not(.show) {
  display: none !important;
  pointer-events: none !important;
}
.page-transit .pt-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: #58a6ff;
  border-radius: 50%;
  animation: splash-spin 0.7s linear infinite;
}

/* Light theme */
body.theme-light {
  --bg-primary: #f6f8fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #eef2f6;
  --text-primary: #1f2328;
  --text-secondary: #424a53;
  --text-muted: #656d76;
  --border: #d0d7de;
  --accent: #0969da;
  --shadow: 0 8px 24px rgba(140,149,159,0.2);
  background: var(--bg-primary);
  color: var(--text-primary);
}
body.theme-light .site-header {
  background: rgba(255,255,255,0.92) !important;
  border-bottom-color: var(--border);
}
body.theme-light .post-grid-card,
body.theme-light .post-list-item,
body.theme-light .id-card,
body.theme-light .auth-box,
body.theme-light .sms-card,
body.theme-light .comment-item {
  background: #fff;
  border-color: var(--border);
  color: var(--text-primary);
}
body.theme-light .logo-text {
  -webkit-text-fill-color: unset;
  background: none;
  color: #0969da;
}
body.theme-light .site-splash {
  background: radial-gradient(ellipse at 50% 40%, #ffffff 0%, #f6f8fa 70%);
}
body.theme-light .splash-logo {
  background: linear-gradient(90deg, #0969da, #1a7f37);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Mobile guest nav centered */
@media (max-width: 768px) {
  body:not(.is-logged-in) .main-nav ul {
    justify-content: center;
    margin: 0 auto;
    max-width: 100%;
  }
  body:not(.is-logged-in) .main-nav {
    text-align: center;
  }
}

/* Back to top button */
#backToTop {
  position: fixed;
  right: 16px;
  bottom: 24px;
  z-index: 9000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--accent);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  cursor: pointer;
  font-size: 1.1rem;
}
#backToTop.show {
  display: flex;
}
#backToTop:hover {
  background: var(--accent);
  color: #fff;
}

/* Online dot on comments */
.comment-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.online-dot-sm {
  width: 10px;
  height: 10px;
  right: -2px;
  top: 2px;
  border-width: 2px;
}
.post-author-avatar-wrap {
  position: relative;
}

/* Desktop auth (profile + logout outside nav) */
.desktop-auth-actions {
  display: none;
  align-items: center;
  gap: 8px;
}
.btn-desk-auth {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.btn-desk-logout:hover { color: #f85149; border-color: rgba(248,81,73,0.4); }
@media (min-width: 769px) {
  .desktop-auth-actions { display: flex; }
  .mobile-auth-actions { display: none !important; }
}
@media (max-width: 768px) {
  .desktop-auth-actions { display: none !important; }
  .btn-mob-logout {
    border-color: rgba(248,81,73,0.35);
    color: #f85149;
  }
}

/* ========== Admin: PC unchanged / Mobile unique ========== */
.admin-mobile-top { display: none; }
.admin-mob-backdrop { display: none; }

@media (max-width: 768px) {
  .admin-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 1200;
    padding: 10px 14px;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    border-bottom: 1px solid rgba(88,166,255,0.2);
  }
  .admin-mob-menu-btn {
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(88,166,255,0.12);
    color: #58a6ff;
    font-size: 1.05rem;
  }
  .admin-mob-brand {
    font-weight: 700;
    color: #e6edf3;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
  }
  .admin-mob-site {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
  }

  .admin-layout {
    display: block !important;
  }
  .admin-sidebar-logo-pc { display: none !important; }

  .admin-sidebar {
    position: fixed !important;
    top: 0; left: 0; bottom: 0;
    width: min(78vw, 300px) !important;
    z-index: 1300;
    transform: translateX(-105%);
    transition: transform 0.28s ease;
    background: #0d1117 !important;
    border-right: 1px solid var(--border);
    padding: 64px 12px 24px !important;
    overflow-y: auto;
    box-shadow: 8px 0 32px rgba(0,0,0,0.45);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-sidebar nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  .admin-sidebar nav a {
    flex: none !important;
    width: 100% !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    font-size: 0.92rem !important;
    justify-content: flex-start !important;
    text-align: left !important;
    background: transparent !important;
  }
  .admin-sidebar nav a:hover,
  .admin-sidebar nav a.active {
    background: rgba(88,166,255,0.12) !important;
    color: #58a6ff !important;
  }

  .admin-mob-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1250;
  }
  .admin-mob-backdrop.show { display: block; }

  .admin-content {
    padding: 14px 12px 48px !important;
    max-width: 100%;
  }
  .admin-content h1 {
    font-size: 1.25rem;
  }
  .admin-content .table-responsive,
  .admin-content table {
    font-size: 0.82rem;
  }
  .admin-content .btn {
    font-size: 0.82rem;
  }
}

@media (min-width: 769px) {
  .admin-mobile-top { display: none !important; }
  .admin-mob-backdrop { display: none !important; }
  .admin-sidebar {
    transform: none !important;
    position: sticky !important;
  }
}

/* Force sidebar to scroll with document */
.pc-sidebar,
.sidebar,
.home-layout .pc-sidebar,
.page-layout .sidebar {
  position: static !important;
  max-height: none !important;
  overflow: visible !important;
  top: auto !important;
}

/* Friends social page */
.friends-page { max-width: 900px; margin: 0 auto 40px; }
.friends-header { margin-bottom: 20px; }
.friends-header h1 { margin: 0 0 6px; font-size: 1.4rem; }
.friends-sub { color: var(--text-muted); margin: 0 0 14px; font-size: 0.92rem; }
.friends-search { display: flex; gap: 8px; max-width: 420px; }
.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.friend-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.friend-card-top { display: flex; gap: 12px; align-items: flex-start; }
.friend-avatar-wrap { position: relative; flex-shrink: 0; }
.friend-avatar {
  width: 56px; height: 56px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}
.friend-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: rgba(88,166,255,0.15);
  color: var(--accent);
  font-size: 1.3rem;
}
.friend-name {
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
}
.friend-name:hover { color: var(--accent); }
.friend-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.friend-about {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.friend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Mobile: hide profile/logout from nav (shown in top auth buttons) */
@media (max-width: 768px) {
  .main-nav ul li:has(a[href*="profile.php"]),
  .main-nav ul li:has(a[href*="logout.php"]) {
    display: none !important;
  }
}

/* Admin mobile: full-page grid, NO drawer */
.admin-mobile-shell { display: none; }

@media (max-width: 768px) {
  .admin-sidebar-pc { display: none !important; }
  .admin-mobile-top { display: none !important; } /* old drawer top */
  .admin-mob-backdrop { display: none !important; }

  .admin-mobile-shell {
    display: block;
    background: linear-gradient(180deg, #0d1117 0%, #12181f 100%);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
  }
  .admin-mob-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 8px;
  }
  .admin-mob-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #e6edf3;
  }
  .admin-mob-user {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
  }
  .admin-mob-home {
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    text-decoration: none;
    background: rgba(88,166,255,0.1);
  }
  .admin-mob-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px 12px 12px;
  }
  .admin-mob-grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 6px;
    border-radius: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    min-height: 76px;
  }
  .admin-mob-grid a i {
    font-size: 1.15rem;
    color: var(--accent);
  }
  .admin-mob-grid a:active {
    background: rgba(88,166,255,0.12);
    border-color: rgba(88,166,255,0.35);
  }

  .admin-layout { display: block !important; }
  .admin-content {
    padding: 16px 12px 56px !important;
  }
  .admin-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (min-width: 769px) {
  .admin-mobile-shell { display: none !important; }
  .admin-sidebar-pc { display: block !important; }
}

/* Admin dashboard: counts only */
.admin-stats-grid {
  margin-bottom: 8px;
}

/* Mobile admin stats — big cards like menu grid */
@media (max-width: 768px) {
  .admin-dash-title {
    font-size: 1.15rem;
    margin: 4px 0 14px;
  }
  .admin-stats-grid.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .admin-stats-grid .stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 12px;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  .admin-stats-grid .stat-card .number {
    font-size: 1.85rem !important;
    font-weight: 800;
    line-height: 1.1;
    color: var(--accent);
  }
  .admin-stats-grid .stat-card .label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
  }
}

/* ========== Messenger-style chat (mobile) / PC layout kept ========== */
.chat-page-wrap { max-width: 1100px; margin: 0 auto 32px; }

.chat-people-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 10px;
}
.chat-people-head h2 { margin: 0; font-size: 1.15rem; }
.chat-find-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(88,166,255,0.12);
  color: var(--accent);
  text-decoration: none;
}
.chat-empty-hint { color: var(--text-muted); font-size: 0.88rem; padding: 8px; }
.chat-people-list { list-style: none; margin: 0; padding: 0; }
.chat-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-secondary);
}
.chat-person.active, .chat-person:hover {
  background: rgba(88,166,255,0.1);
}
.chat-person-av-wrap {
  position: relative;
  width: 48px; height: 48px;
  flex-shrink: 0;
}
.chat-person-av-wrap img,
.chat-person-av-fb {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  background: rgba(88,166,255,0.15);
}
.chat-person-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-person-name { font-weight: 600; color: var(--text-primary); font-size: 0.95rem; }
.chat-person-preview { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-person-time { font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; }

.chat-back-mob { display: none; }
.chat-head-user {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.chat-head-av {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.chat-head-av-fb {
  display: flex; align-items: center; justify-content: center;
  background: rgba(88,166,255,0.15);
  color: var(--accent);
}
.chat-head-user strong { display: block; font-size: 0.95rem; }
.chat-head-user small { font-size: 0.75rem; }
.status-on { color: #3b82f6; }
.status-off { color: var(--text-muted); }

.chat-input {
  border-radius: 22px !important;
  padding-left: 16px !important;
}
.chat-send-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: #0084ff;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.chat-placeholder-pc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  color: var(--text-muted);
  gap: 10px;
}
.chat-placeholder-pc i { font-size: 2.5rem; opacity: 0.4; }

@media (max-width: 768px) {
  .chat-page-wrap {
    padding: 0 !important;
    max-width: 100%;
  }
  .chat-page-wrap > .container { padding: 0; }
  .container.chat-page-wrap { padding-left: 0; padding-right: 0; }

  .chat-layout {
    display: block !important;
    min-height: calc(100vh - 120px);
    margin: 0;
    border-radius: 0;
  }
  .chat-people {
    border-radius: 0;
    border-left: none;
    border-right: none;
    min-height: calc(100vh - 130px);
    background: var(--bg-primary);
  }
  .chat-main {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    border-radius: 0;
    background: var(--bg-primary);
    flex-direction: column;
  }
  .chat-layout.chat-thread-open .chat-people { display: none; }
  .chat-layout.chat-thread-open .chat-main {
    display: flex !important;
  }
  .chat-back-mob {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    color: var(--text-primary);
    text-decoration: none;
    margin-right: 4px;
  }
  .chat-head {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .chat-messages {
    flex: 1;
    max-height: none;
    height: auto;
    padding: 12px;
    background: var(--bg-primary);
  }
  .chat-bubble {
    max-width: 78%;
    border-radius: 18px;
    padding: 10px 14px;
  }
  .chat-bubble.mine {
    background: #0084ff;
    color: #fff;
    border-bottom-right-radius: 4px;
  }
  .chat-bubble.mine span { color: rgba(255,255,255,0.75); }
  .chat-bubble.theirs {
    background: var(--bg-secondary);
    border-bottom-left-radius: 4px;
  }
  .chat-compose {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
  }
  .chat-placeholder-pc { display: none; }
}

@media (min-width: 769px) {
  .chat-back-mob { display: none !important; }
  .chat-layout.chat-thread-open .chat-people { display: block; }
  .chat-layout.chat-thread-open .chat-main { display: flex; }
}

/* PC: admin already after profile in DOM */
/* Mobile: force admin tab to the end of nav grid */
@media (max-width: 768px) {
  .main-nav ul {
    display: grid !important;
  }
  .main-nav ul li.nav-item-admin {
    order: 99;
  }
}
@media (min-width: 769px) {
  .main-nav ul li.nav-item-admin {
    order: 0;
  }
}

@media (max-width: 768px) {
  .main-nav ul li.nav-item-profile,
  .main-nav ul li.nav-item-logout {
    display: none !important;
  }
}

/* Mobile Forum ID Card (demo style) */
.forum-id-card {
  max-width: 420px;
  margin: 12px auto 20px;
  background: #0d1117;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.08), 0 12px 40px rgba(0,0,0,0.35);
}
.fic-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 8px;
}
.fic-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(56,189,248,0.15);
  color: #38bdf8;
  font-size: 1.1rem;
}
.fic-brand {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #38bdf8;
  font-size: 1.05rem;
}
.fic-sub {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}
.fic-body { padding: 8px 16px 14px; }
.fic-top { display: flex; gap: 12px; align-items: flex-start; }
.fic-avatar-wrap { position: relative; flex-shrink: 0; }
.fic-avatar {
  width: 96px; height: 96px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid rgba(56,189,248,0.45);
  display: block;
}
.fic-avatar-fb {
  display: flex; align-items: center; justify-content: center;
  background: rgba(56,189,248,0.12);
  color: #38bdf8;
  font-size: 2rem;
}
.fic-name {
  margin: 0 0 8px;
  font-size: 1.15rem;
  color: #e6edf3;
}
.fic-rows { display: flex; flex-direction: column; gap: 6px; }
.fic-row {
  display: grid;
  grid-template-columns: 18px 56px 1fr;
  gap: 6px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.fic-row i { color: #38bdf8; }
.fic-row strong { color: #e6edf3; justify-self: start; }
.fic-role-pill {
  display: inline-block;
  background: #1f6feb;
  color: #fff !important;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
}
.fic-about {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.fic-about-label {
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.fic-about p { margin: 0 0 6px; color: #9da7b3; font-size: 0.9rem; line-height: 1.45; }
.fic-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.fic-followers {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.fic-followers strong {
  font-size: 1.2rem;
  color: #e6edf3;
}
.fic-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fic-btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fic-btn-follow {
  background: linear-gradient(90deg, #1f6feb, #38bdf8);
  color: #fff;
}
.fic-btn-chat {
  background: transparent;
  border: 1px solid rgba(56,189,248,0.45);
  color: #38bdf8;
}
.fic-bottom {
  text-align: center;
  padding: 10px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.post-attachment-box {
  margin: 22px 0 8px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(56,189,248,0.55);
  background: linear-gradient(135deg, rgba(56,189,248,0.14), rgba(88,166,255,0.06));
  box-shadow: 0 0 0 3px rgba(56,189,248,0.08), 0 8px 24px rgba(0,0,0,0.2);
}
.post-attachment-label {
  font-weight: 800;
  margin-bottom: 10px;
  color: #38bdf8;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.post-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(13,17,23,0.45);
  border: 1px solid rgba(56,189,248,0.25);
  transition: border-color 0.15s, background 0.15s;
}
.post-attachment-link:hover {
  border-color: #38bdf8;
  background: rgba(56,189,248,0.12);
  color: #7dd3fc;
}
.post-attachment-type {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(56,189,248,0.2);
  color: #7dd3fc;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.post-attachment-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.post-attachment-dl-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(13,17,23,0.55);
  border: 1px solid rgba(56,189,248,0.35);
  color: #7dd3fc;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.post-attachment-dl-count i {
  font-size: 0.78rem;
  opacity: 0.9;
}
.post-attachment-dl-count strong {
  font-weight: 800;
  color: #e6edf3;
  font-variant-numeric: tabular-nums;
}
.post-attachment-dl-text {
  color: var(--text-muted, #8b949e);
  font-weight: 600;
  font-size: 0.78rem;
}
.post-list-ad-card,
.post-grid-ad-card {
  border: 1px dashed rgba(88,166,255,0.35);
  background: rgba(88,166,255,0.06);
}
.post-list-ad-inner,
.pgc-ad-inner {
  width: 100%;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: hidden;
}
.post-list-ad-inner img,
.pgc-ad-inner img,
.post-list-ad-inner iframe,
.pgc-ad-inner iframe {
  max-width: 100%;
  border-radius: 8px;
}
.ad-container.header-ad,
.ad-container.footer-ad {
  max-width: 1100px;
  margin: 12px auto;
  padding: 0 16px;
  text-align: center;
  overflow: hidden;
}
.ad-slot {
  margin: 16px 0;
  text-align: center;
  overflow: hidden;
}

/* Original ID card on all devices */
.forum-id-card { display: none !important; }
.id-card, .id-card-member-of { display: block; }
@media (max-width: 768px) {
  .id-card { display: block !important; }
  .id-card-member-of { display: block !important; text-align: center; }
}



/* Page load time */
.page-load-time {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.85;
  padding: 4px 0 0;
}

/* BBCode guide */
.bbcode-page { max-width: 800px; margin: 0 auto 40px; }
.bbcode-intro { color: var(--text-muted); margin-bottom: 18px; }
.bbcode-group-title { font-size: 1.05rem; margin: 22px 0 10px; color: var(--accent); }
.bbcode-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.bbcode-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.bbcode-desc { font-size: 0.88rem; color: var(--text-secondary); }
.bbcode-code {
  margin: 0;
  padding: 8px 10px;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  font-size: 0.82rem;
  overflow-x: auto;
  white-space: pre-wrap;
  color: #e6edf3;
}

/* BBCode rendered in posts */
.bb-notice,.bb-info,.bb-success,.bb-warning,.bb-error {
  padding: 12px 14px;
  border-radius: 10px;
  margin: 12px 0;
  border-left: 4px solid;
  line-height: 1.5;
}
.bb-notice { background: rgba(56,189,248,0.12); border-color: #38bdf8; }
.bb-info { background: rgba(88,166,255,0.12); border-color: #58a6ff; }
.bb-success { background: rgba(63,185,80,0.12); border-color: #3fb950; }
.bb-warning { background: rgba(210,153,34,0.12); border-color: #d29922; }
.bb-error { background: rgba(248,81,73,0.12); border-color: #f85149; }
.bb-quote { border-left: 3px solid var(--accent); padding: 8px 12px; margin: 10px 0; background: rgba(255,255,255,0.03); }
.bb-code { background: #0d1117; padding: 12px; border-radius: 8px; overflow-x: auto; }
.bb-img { max-width: 100%; border-radius: 8px; height: auto; }
.bb-yt { position: relative; padding-bottom: 56%; height: 0; margin: 12px 0; }
.bb-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.bb-hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.bb-spoiler { margin: 10px 0; }
.bb-spoiler summary { cursor: pointer; color: var(--accent); }

/* Mobile performance */
@media (max-width: 768px) {
  .site-splash { animation: none; }
  .splash-ring { animation-duration: 0.6s; }
  * {
    -webkit-tap-highlight-color: transparent;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* post-content-colors */
.post-content, .post-content p, .post-content div, .post-content li {
  color: #c9d1d9;
}
html[data-theme="light"] .post-content,
html[data-theme="light"] .post-content p,
html[data-theme="light"] .post-content div,
html[data-theme="light"] .post-content li,
body.theme-light .post-content,
body.theme-light .post-content p {
  color: #24292f;
}
html[data-theme="dark"] .post-content,
body.theme-dark .post-content {
  color: #c9d1d9;
}
.post-content a { color: var(--accent); }
.post-mid-ad {
  margin: 20px 0;
  padding: 12px;
  text-align: center;
  clear: both;
}


/* PC post card: category on thumbnail hover (blur + focus name) */
@media (min-width: 769px) {
  .post-grid-card .pgc-thumb {
    position: relative;
    display: block;
    overflow: hidden;
  }
  .post-grid-card .pgc-thumb img {
    transition: filter 0.35s ease, transform 0.35s ease;
    width: 100%;
    display: block;
  }
  .pgc-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.25);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    padding: 12px;
    text-align: center;
  }
  .pgc-thumb-cat {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    border-bottom: 2px solid #38bdf8;
    padding-bottom: 4px;
    transform: translateY(6px);
    transition: transform 0.35s ease;
  }
  .post-grid-card .pgc-thumb:hover img,
  .post-grid-card .pgc-thumb:focus img {
    filter: blur(4px) brightness(0.7);
    transform: scale(1.04);
  }
  .post-grid-card .pgc-thumb:hover .pgc-thumb-overlay,
  .post-grid-card .pgc-thumb:focus .pgc-thumb-overlay {
    opacity: 1;
  }
  .post-grid-card .pgc-thumb:hover .pgc-thumb-cat,
  .post-grid-card .pgc-thumb:focus .pgc-thumb-cat {
    transform: translateY(0);
  }
}
@media (max-width: 768px) {
  .pgc-thumb-overlay { display: none !important; }
}

/* Hide category chip above title on PC cards (shown on thumb hover instead) */
@media (min-width: 769px) {
  .post-grid-card .pgc-body > .pgc-cat { display: none !important; }
}

.post-attachment-note { display:block;margin-top:6px;color:var(--text-muted);font-size:0.85rem; }

/* Flash auto hide */
.alert.flash-auto-hide { transition: opacity 0.35s ease, transform 0.35s ease; }
.alert.flash-hide { opacity: 0; transform: translateY(-8px); pointer-events: none; }

/* Mobile wallet / payment */
.mob-wallet { display: none; }
@media (max-width: 768px) {
  .balance-panel-pc.pc-only { display: none !important; }
  .mob-wallet.mobile-only { display: block; padding-bottom: 24px; }
}
@media (min-width: 769px) {
  .mob-wallet.mobile-only { display: none !important; }
  .balance-panel-pc.pc-only { display: block; }
}
.mob-wallet-hero {
  background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 45%, #0ea5e9 160%);
  border-radius: 20px;
  padding: 20px 18px 22px;
  color: #fff;
  box-shadow: 0 12px 32px rgba(14,165,233,0.25);
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.mob-wallet-hero::after {
  content: "";
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  right: -40px; top: -40px;
}
.mob-wallet-hero-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; position: relative; z-index: 1;
}
.mob-wallet-badge {
  background: rgba(255,255,255,0.15);
  padding: 4px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
}
.mob-wallet-user { font-size: 0.85rem; opacity: 0.9; }
.mob-wallet-balance-label {
  font-size: 0.8rem; opacity: 0.85; position: relative; z-index: 1;
}
.mob-wallet-balance {
  font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.2; margin: 4px 0 12px; position: relative; z-index: 1;
}
.mob-wallet-balance small { font-size: 1.1rem; font-weight: 600; opacity: 0.9; }
.mob-wallet-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 0.78rem; opacity: 0.9; position: relative; z-index: 1;
}
.mob-wallet-sheet, .mob-wallet-history {
  background: var(--bg-card, #161b22);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}
.mob-wallet-sheet-title {
  font-size: 1rem; margin: 0 0 14px; display: flex; align-items: center; gap: 8px;
}
.mob-wallet-label {
  display: block; font-size: 0.82rem; color: var(--text-muted);
  margin: 10px 0 6px; font-weight: 600;
}
.mob-wallet-amount-wrap {
  display: flex; align-items: center;
  background: var(--bg-secondary, rgba(0,0,0,0.25));
  border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.mob-wallet-currency {
  padding: 0 12px; font-weight: 700; color: #38bdf8; font-size: 1.1rem;
}
.mob-wallet-amount {
  flex: 1; border: none; background: transparent; color: var(--text-primary);
  padding: 14px 12px 14px 0; font-size: 1.25rem; font-weight: 700;
  outline: none; width: 100%;
}
.mob-wallet-methods {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.mob-method { cursor: pointer; }
.mob-method input { position: absolute; opacity: 0; pointer-events: none; }
.mob-method-inner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-secondary, rgba(0,0,0,0.2));
  transition: border-color 0.2s, box-shadow 0.2s;
}
.mob-method-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--mcolor); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
}
.mob-method-name { font-weight: 600; font-size: 0.9rem; }
.mob-method input:checked + .mob-method-inner {
  border-color: var(--mcolor);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mcolor) 25%, transparent);
}
.mob-wallet-input {
  width: 100%; padding: 14px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-secondary, rgba(0,0,0,0.25));
  color: var(--text-primary); font-size: 1rem; box-sizing: border-box;
}
.mob-wallet-submit {
  width: 100%; margin-top: 16px; border: none; border-radius: 14px;
  padding: 15px; font-size: 1rem; font-weight: 700; color: #fff;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  box-shadow: 0 8px 20px rgba(14,165,233,0.35);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
}
.mob-wallet-empty {
  text-align: center; padding: 24px 12px; color: var(--text-muted);
}
.mob-wallet-empty i { font-size: 2rem; margin-bottom: 8px; opacity: 0.5; }
.mob-wallet-list { list-style: none; margin: 0; padding: 0; }
.mob-wallet-item {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.mob-wallet-item:last-child { border-bottom: none; }
.mob-wallet-item-amt { display: block; font-weight: 700; font-size: 1.05rem; }
.mob-wallet-item-meta, .mob-wallet-item-date {
  display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 2px;
}
.mob-wallet-status {
  font-size: 0.7rem; font-weight: 700; padding: 4px 8px; border-radius: 999px;
  white-space: nowrap;
}
.mob-wallet-status-ok { background: rgba(63,185,80,0.15); color: #3fb950; }
.mob-wallet-status-wait { background: rgba(210,153,34,0.15); color: #d29922; }
.mob-wallet-status-bad { background: rgba(248,81,73,0.15); color: #f85149; }


/* ===== PC Wallet / Payment (new) ===== */
@media (min-width: 769px) {
  .pc-wallet.pc-only { display: block !important; }
}
@media (max-width: 768px) {
  .pc-wallet.pc-only { display: none !important; }
}

.pc-wallet-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) {
  .pc-wallet-grid { grid-template-columns: 1fr; }
}

.pc-wallet-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 28px 28px 24px;
  background: linear-gradient(135deg, #0b1220 0%, #132a4a 42%, #0ea5e9 130%);
  color: #fff;
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.22);
  margin-bottom: 18px;
}
.pc-wallet-hero-glow {
  position: absolute;
  width: 280px; height: 280px;
  right: -80px; top: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,0.35), transparent 70%);
  pointer-events: none;
}
.pc-wallet-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.pc-wallet-badge {
  background: rgba(255,255,255,0.14);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pc-wallet-chip {
  font-size: 0.88rem;
  opacity: 0.9;
  background: rgba(0,0,0,0.2);
  padding: 5px 12px;
  border-radius: 999px;
}
.pc-wallet-label {
  font-size: 0.85rem;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}
.pc-wallet-amount {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 6px 0 18px;
  position: relative;
  z-index: 1;
}
.pc-wallet-amount small {
  font-size: 1.25rem;
  font-weight: 600;
  opacity: 0.9;
}
.pc-wallet-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.pc-wallet-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 10px 14px;
  min-width: 140px;
}
.pc-wallet-stat i {
  font-size: 1.1rem;
  color: #7dd3fc;
}
.pc-wallet-stat-val {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
}
.pc-wallet-stat-lbl {
  display: block;
  font-size: 0.72rem;
  opacity: 0.8;
}

.pc-wallet-history-card,
.pc-wallet-form-card {
  background: var(--bg-card, #161b22);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.pc-wallet-section-head h3 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pc-wallet-empty {
  text-align: center;
  padding: 28px 12px;
  color: var(--text-muted);
}
.pc-wallet-empty i {
  font-size: 2rem;
  opacity: 0.45;
  margin-bottom: 8px;
}
.pc-wallet-table-wrap { overflow-x: auto; }
.pc-wallet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.pc-wallet-table th {
  text-align: left;
  padding: 10px 12px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.pc-wallet-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.pc-wallet-table tr:last-child td { border-bottom: none; }
.pc-w-amt { font-weight: 700; color: var(--text-primary); }
.pc-w-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.pc-w-status-ok { background: rgba(63,185,80,0.15); color: #3fb950; }
.pc-w-status-wait { background: rgba(210,153,34,0.15); color: #d29922; }
.pc-w-status-bad { background: rgba(248,81,73,0.15); color: #f85149; }

.pc-w-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 12px 0 6px;
}
.pc-w-amount-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-secondary, rgba(0,0,0,0.22));
  overflow: hidden;
}
.pc-w-currency {
  padding: 0 14px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #38bdf8;
}
.pc-w-amount-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 700;
  padding: 14px 14px 14px 0;
  outline: none;
  width: 100%;
}
.pc-w-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pc-w-method { cursor: pointer; }
.pc-w-method input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pc-w-method-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-secondary, rgba(0,0,0,0.18));
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  position: relative;
}
.pc-w-method-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--mcolor);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.pc-w-method-name { font-weight: 600; font-size: 0.92rem; }
.pc-w-method-check {
  margin-left: auto;
  opacity: 0;
  color: var(--mcolor);
  font-size: 0.85rem;
}
.pc-w-method input:checked + .pc-w-method-inner {
  border-color: var(--mcolor);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mcolor) 22%, transparent);
  transform: translateY(-1px);
}
.pc-w-method input:checked + .pc-w-method-inner .pc-w-method-check {
  opacity: 1;
}
.pc-w-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-secondary, rgba(0,0,0,0.22));
  color: var(--text-primary);
  font-size: 0.98rem;
}
.pc-w-input:focus,
.pc-w-amount-input:focus {
  outline: none;
}
.pc-w-amount-box:focus-within,
.pc-w-input:focus {
  border-color: rgba(56,189,248,0.55);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.12);
}
.pc-w-submit {
  width: 100%;
  margin-top: 18px;
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(90deg, #0369a1, #38bdf8);
  box-shadow: 0 10px 24px rgba(14,165,233,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.pc-w-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(14,165,233,0.4);
}




/* Splash failsafe: never block forever even if JS broken */
.site-splash.hide,
body.splash-done .site-splash {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


/* ===== Post view thumbnail: NO crop (full image) ===== */
img.post-image.lazy-thumb,
img.lazy-thumb.post-image,
.post-detail img.post-image,
article .post-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center;
    display: block;
    border-radius: 12px;
    background: transparent;
}

/* BBIMG inside post content: NO crop */
.post-content .bb-img,
.post-content img.bb-img,
.bb-img {
    max-width: 100% !important;
    width: auto;
    height: auto !important;
    object-fit: contain !important;
    display: block;
    margin: 12px auto;
    border-radius: 10px;
}


/* Report button (matches share circle buttons) */
.post-share-report:hover { background: #f85149; border-color: #f85149; color: #fff; }
.post-report-panel {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}
.post-report-title {
  font-weight: 700;
  margin-bottom: 10px;
  color: #f85149;
}
.post-report-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 8px 0 4px;
}
.post-report-form .form-control { margin-bottom: 4px; }
.post-report-form .btn { margin-top: 10px; }


/* Logout text red only (after login) */
.nav-item-logout > a,
.main-nav ul li.nav-item-logout a,
a.btn-mob-logout,
a.btn-desk-logout,
a[href*="logout.html"],
a[href*="logout.php"] {
    color: #f85149 !important;
}
.nav-item-logout > a:hover,
.main-nav ul li.nav-item-logout a:hover,
a.btn-mob-logout:hover,
a.btn-desk-logout:hover,
a[href*="logout.html"]:hover,
a[href*="logout.php"]:hover {
    color: #ff7b72 !important;
}


/* PC: ads must not break post-grid columns */
@media (min-width: 769px) {
  .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
  .post-grid > .post-grid-card {
    min-width: 0;
    max-width: 100%;
  }
  /* Full-width ad row inside grid — keeps 3-col cards aligned */
  .post-grid > .ad-slot,
  .post-grid > .post-grid-ad-full,
  .post-grid > .post-grid-ad-card,
  .post-grid > .ad-inline {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    margin: 4px 0 8px;
    padding: 12px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    contain: layout paint;
  }
  .post-grid > .ad-slot *,
  .post-grid > .post-grid-ad-full *,
  .post-grid > .post-grid-ad-card *,
  .post-grid .pgc-ad-inner * {
    max-width: 100% !important;
  }
  .post-grid > .ad-slot img,
  .post-grid > .ad-slot iframe,
  .post-grid > .post-grid-ad-full img,
  .post-grid > .post-grid-ad-full iframe,
  .post-grid .pgc-ad-inner img,
  .post-grid .pgc-ad-inner iframe {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
  }
  /* Between-category / home ads outside grid */
  .ad-slot.ad-home-cats,
  .ad-slot.ad-between-subs {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    clear: both;
    contain: layout paint;
  }
  .ad-slot.ad-home-cats img,
  .ad-slot.ad-home-cats iframe,
  .ad-slot.ad-between-subs img,
  .ad-slot.ad-between-subs iframe {
    max-width: 100% !important;
    height: auto !important;
  }
}


/* PC post feed: separate grids of 3 + full-width ad rows */
.pc-post-feed { width: 100%; }
.pc-post-feed > .post-grid {
  margin-bottom: 18px;
}
.ad-slot.ad-pc-row {
  width: 100%;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 14px;
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
  border: 1px dashed rgba(88,166,255,0.35);
  border-radius: 12px;
  background: rgba(88,166,255,0.06);
  clear: both;
  display: flex;
  align-items: center;
  justify-content: center;
  contain: layout paint;
}
.ad-slot.ad-pc-row img,
.ad-slot.ad-pc-row iframe,
.ad-slot.ad-pc-row * {
  max-width: 100% !important;
}
.ad-slot.ad-pc-row img,
.ad-slot.ad-pc-row iframe {
  height: auto !important;
  display: block;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .pc-post-feed { display: none !important; }
}


/* PC latest posts: ad as post-card style after every 6 posts */
.ad-pc-card-row {
  width: 100%;
  margin: 0 0 18px;
  box-sizing: border-box;
}
.ad-pc-card-row .post-grid-ad-card {
  width: 100%;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(88,166,255,0.4);
  background: rgba(88,166,255,0.06);
  border-radius: 12px;
  overflow: hidden;
}
.ad-pc-card-row .pgc-ad-inner {
  width: 100%;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ad-pc-card-row .pgc-ad-inner img,
.ad-pc-card-row .pgc-ad-inner iframe,
.ad-pc-card-row .pgc-ad-inner * {
  max-width: 100% !important;
}
.ad-pc-card-row .pgc-ad-inner img,
.ad-pc-card-row .pgc-ad-inner iframe {
  height: auto !important;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}
@media (max-width: 768px) {
  .ad-pc-card-row { display: none !important; }
}


/* ===== Admin Dashboard v2: card grid + side widgets ===== */
.dash-v2 { max-width: 1200px; }
.dash-v2-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.dash-v2-sub { color: var(--text-muted); margin: 4px 0 0; font-size: 0.92rem; }
.dash-v2-head-meta {
  color: var(--text-muted); font-size: 0.9rem;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-card);
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.dash-kpi {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  min-width: 0;
}
a.dash-kpi:hover {
  border-color: rgba(88,166,255,0.45);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.kpi-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; flex-shrink: 0;
}
.kpi-blue .kpi-icon { background: rgba(88,166,255,0.15); color: #58a6ff; }
.kpi-green .kpi-icon { background: rgba(63,185,80,0.15); color: #3fb950; }
.kpi-purple .kpi-icon { background: rgba(163,113,247,0.15); color: #a371f7; }
.kpi-orange .kpi-icon { background: rgba(210,153,34,0.15); color: #d29922; }
.kpi-red .kpi-icon { background: rgba(248,81,73,0.15); color: #f85149; }
.kpi-cyan .kpi-icon { background: rgba(57,197,207,0.15); color: #39c5cf; }
.kpi-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 2px; }
.kpi-num { font-size: 1.35rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }

.dash-mini-stats {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.mini-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}
.mini-stat .ms-n { display: block; font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.mini-stat .ms-l { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

.dash-mid-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.dash-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  min-width: 0;
}
.dash-panel-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px;
}
.dash-panel-h h2 {
  margin: 0; font-size: 0.98rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.dash-badge {
  font-size: 0.75rem; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px;
}
.dash-link { font-size: 0.82rem; color: #58a6ff; text-decoration: none; }
.dash-link:hover { text-decoration: underline; }
.dash-chart-wrap { position: relative; height: 220px; }
.dash-donut-wrap { height: 220px; }
.dash-empty { color: var(--text-muted); font-size: 0.9rem; margin: 8px 0; list-style: none; }

.dash-widgets-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.dash-list { list-style: none; margin: 0; padding: 0; }
.dash-list li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dash-list li:last-child { border-bottom: 0; }
.dl-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-title { color: var(--text-primary); font-size: 0.9rem; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
a.dl-title:hover { color: #58a6ff; }
.dl-sub { color: var(--text-muted); font-size: 0.75rem; }
.dl-meta { color: var(--text-muted); font-size: 0.75rem; flex-shrink: 0; }

@media (max-width: 1100px) {
  .dash-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-mini-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dash-mid-grid { grid-template-columns: 1fr; }
  .dash-widgets-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .dash-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-num { font-size: 1.15rem; }
}


/* ===== BBIMG gallery ===== */
.bbimg-page { padding-bottom: 28px; }
.bbimg-head h1 { margin: 0 0 6px; }
.bbimg-sub { color: var(--text-muted); margin: 0 0 16px; font-size: 0.92rem; }
.bbimg-upload-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 18px;
}
.bbimg-upload-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.bbimg-upload-row .form-control { flex: 1; min-width: 180px; }
.bbimg-empty { color: var(--text-muted); padding: 20px 0; }

.bbimg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.bbimg-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bbimg-thumb {
  aspect-ratio: 16/10;
  background: rgba(0,0,0,0.25);
  overflow: hidden;
}
.bbimg-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bbimg-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.bbimg-label { font-size: 0.8rem; color: var(--text-muted); }
.bbimg-code { font-size: 0.8rem; }

.bbimg-list { display: none; margin-bottom: 18px; }
.bbimg-list-card {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}
.bbimg-list-thumb {
  width: 110px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(0,0,0,0.2);
}
.bbimg-list-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bbimg-list-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; justify-content: center; }

@media (max-width: 900px) {
  .bbimg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .bbimg-grid.pc-only { display: none !important; }
  .bbimg-list.mobile-only { display: block !important; }
  .bbimg-upload-row { flex-direction: column; align-items: stretch; }
}
@media (min-width: 769px) {
  .bbimg-list.mobile-only { display: none !important; }
  .bbimg-grid.pc-only { display: grid !important; }
}


/* ===== Admin panel enhancements ===== */
.admin-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 10px;
}
.admin-brand-text {
  font-family: "Orbitron", "Poppins", sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #58a6ff, #a371f7, #3fb950);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  text-decoration: none !important;
}
.admin-brand-text span {
  font-weight: 600;
  opacity: 0.95;
}
.admin-home-btn {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: #58a6ff !important;
  background: rgba(88,166,255,0.1);
  text-decoration: none !important;
  flex-shrink: 0;
}
.admin-home-btn:hover { background: rgba(88,166,255,0.22); }

.admin-sidebar nav a.menu-alert,
.admin-mob-grid a.menu-alert {
  color: #f85149 !important;
}
.admin-sidebar nav a.menu-alert i,
.admin-mob-grid a.menu-alert i {
  color: #f85149 !important;
}
.admin-sidebar nav a em {
  font-style: normal;
  font-size: 0.75rem;
  background: rgba(248,81,73,0.15);
  color: #f85149;
  padding: 1px 7px;
  border-radius: 999px;
  margin-left: 4px;
}

.admin-content {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px 0;
  padding: 0 0 12px 0;
  border-bottom: 1px solid var(--border);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.admin-topbar-left {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-topbar-right {
  flex: 0 0 auto;
  margin-left: auto;
}
.admin-clock {
  text-align: right;
  line-height: 1.25;
  white-space: nowrap;
}
.admin-clock-time {
  display: block;
  font-family: "Orbitron", monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #58a6ff;
  letter-spacing: 0.04em;
}
.admin-clock-date {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}
@media (max-width: 768px) {
  .admin-topbar { margin-top: 4px; }
  .admin-clock-time { font-size: 0.95rem; }
}

/* Ads on/off toggle */
.ad-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
}
.ad-toggle input { display: none; }
.ad-toggle-slider {
  width: 48px; height: 26px;
  background: #3d444d;
  border-radius: 999px;
  position: relative;
  transition: background .2s;
}
.ad-toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.ad-toggle input:checked + .ad-toggle-slider {
  background: #3fb950;
}
.ad-toggle input:checked + .ad-toggle-slider::after {
  transform: translateX(22px);
}
.ad-toggle-label { font-size: 0.9rem; color: var(--text-secondary); }


/* Admin clock under BDBOYS Admin (sidebar) */
.admin-brand {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  padding: 14px 14px 12px !important;
}
.admin-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.admin-clock-sidebar {
  text-align: left !important;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(88,166,255,0.08);
  border: 1px solid rgba(88,166,255,0.18);
}
.admin-clock-sidebar .admin-clock-time {
  font-size: 0.95rem !important;
}
.admin-clock-mob {
  text-align: left !important;
  margin-top: 2px;
}
.admin-clock-mob .admin-clock-time {
  font-size: 0.85rem !important;
  display: inline;
  margin-right: 8px;
}
.admin-clock-mob .admin-clock-date {
  display: inline;
  font-size: 0.75rem !important;
}
/* topbar no longer used in content */
.admin-topbar { display: none !important; }

.bb-download-wrap { text-align: center; margin: 16px 0; }
.bb-download-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 12px 28px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
}
/* Facebook page sidebar widget — dark screenshot style */
.fb-like-widget .fb-wd-title {
  margin-bottom: 10px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fb-like-widget .fb-like-dark,
.fb-like-widget .fb-page-card {
  background: #1c1e21 !important;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #3a3b3c;
  padding: 16px 14px 14px;
  color: #e4e6eb;
}

/* ===== Demo-style centered PC Facebook widget ===== */
.fb-page-card--demo .fb-pc-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 14px;
}
.fb-page-card--demo .fb-pc-avatar-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 12px;
}
.fb-page-card--demo .fb-pc-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #1877f2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid #1877f2;
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.25);
}
.fb-page-card--demo .fb-pc-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fb-page-card--demo .fb-pc-avatar-letter {
  color: #fff;
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fb-page-card--demo .fb-pc-verified {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1877f2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  border: 2px solid #1c1e21;
}
.fb-page-card--demo .fb-pc-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 800;
  color: #e4e6eb !important;
  text-decoration: none !important;
  font-size: 1.15rem;
  margin-bottom: 4px;
  white-space: normal;
  text-align: center;
}
.fb-page-card--demo .fb-pc-name:hover { color: #1877f2 !important; }
.fb-page-card--demo .fb-pc-name-check {
  color: #1877f2;
  font-size: 0.95rem;
}
.fb-page-card--demo .fb-pc-tagline {
  display: block;
  font-size: 0.78rem;
  color: #b0b3b8;
  margin: 0 0 14px;
  line-height: 1.45;
  max-width: 240px;
  white-space: normal;
}
.fb-page-card--demo .fb-pc-like-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 220px;
  padding: 10px 18px;
  border-radius: 8px;
  background: #1877f2 !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  border: none;
  line-height: 1;
  margin-bottom: 12px;
}
.fb-page-card--demo .fb-pc-like-btn:hover {
  filter: brightness(1.1);
  color: #fff !important;
}
.fb-page-card--demo .fb-pc-followers-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #b0b3b8;
}
.fb-page-card--demo .fb-pc-followers-line i {
  color: #b0b3b8;
  font-size: 0.85rem;
}
.fb-page-card--demo .fb-pc-followers-line strong {
  color: #e4e6eb;
  font-weight: 700;
}
.fb-page-card--demo .fb-pc-recent-block {
  border-top: 1px solid #3a3b3c;
  padding-top: 12px;
  margin-top: 4px;
  text-align: center;
}
.fb-page-card--demo .fb-pc-recent-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e4e6eb;
  margin-bottom: 10px;
  text-align: left;
}
.fb-page-card--demo .fb-pc-likers-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.fb-page-card--demo .fb-pc-liker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: #3a3b3c;
  border: 2px solid #1c1e21;
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fb-page-card--demo .fb-pc-liker:first-child { margin-left: 0; }
.fb-page-card--demo .fb-pc-liker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fb-page-card--demo .fb-pc-liker .fb-pc-row-letter {
  color: #e4e6eb;
  font-weight: 700;
  font-size: 0.8rem;
}
.fb-page-card--demo .fb-pc-likers-hint {
  font-size: 0.72rem;
  color: #b0b3b8;
  margin: 0 0 8px;
  line-height: 1.4;
}
.fb-page-card--demo .fb-pc-more {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1877f2 !important;
  text-decoration: none !important;
  padding-top: 4px;
}
.fb-page-card--demo .fb-pc-more:hover { text-decoration: underline !important; }

/* legacy (non-demo) fallbacks kept for safety */
.fb-pc-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.fb-pc-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1877f2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.fb-pc-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fb-pc-avatar-letter {
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
}
.fb-pc-name {
  display: block;
  font-weight: 700;
  color: #e4e6eb !important;
  text-decoration: none !important;
  font-size: 0.92rem;
}
.fb-pc-name:hover { color: #1877f2 !important; }
.fb-pc-tagline {
  display: block;
  font-size: 0.72rem;
  color: #b0b3b8;
  margin-top: 2px;
}
.fb-pc-like-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  background: #1877f2 !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none !important;
  border: none;
  line-height: 1;
}
.fb-pc-like-btn:hover {
  filter: brightness(1.1);
  color: #fff !important;
}
.fb-pc-more {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1877f2 !important;
  text-decoration: none !important;
  padding-top: 4px;
}
.fb-pc-more:hover { text-decoration: underline !important; }
.fb-pc-row-letter {
  color: #e4e6eb;
  font-weight: 700;
  font-size: 0.85rem;
}

/* light theme */
body.theme-light .fb-like-widget .fb-page-card {
  background: #f0f2f5 !important;
  border-color: #dadde1;
  color: #050505;
}
body.theme-light .fb-page-card--demo .fb-pc-name,
body.theme-light .fb-page-card--demo .fb-pc-recent-label,
body.theme-light .fb-page-card--demo .fb-pc-followers-line strong {
  color: #050505 !important;
}
body.theme-light .fb-page-card--demo .fb-pc-tagline,
body.theme-light .fb-page-card--demo .fb-pc-followers-line,
body.theme-light .fb-page-card--demo .fb-pc-likers-hint {
  color: #65676b;
}
body.theme-light .fb-page-card--demo .fb-pc-recent-block {
  border-top-color: #dadde1;
}
body.theme-light .fb-page-card--demo .fb-pc-verified {
  border-color: #f0f2f5;
}
body.theme-light .fb-page-card--demo .fb-pc-liker {
  border-color: #f0f2f5;
  background: #ccd0d5;
}


.bb-download-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 12px 28px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  text-decoration: none !important;
  border: none !important;
  color: #fff !important;
  cursor: pointer;
}
.bb-dl-file {
  background: linear-gradient(135deg, #238636, #2ea043) !important;
  box-shadow: 0 4px 14px rgba(46,160,67,0.35);
}
.bb-dl-file:hover { filter: brightness(1.08); }
.bb-dl-video {
  background: linear-gradient(135deg, #8957e5, #a371f7) !important;
  box-shadow: 0 4px 14px rgba(163,113,247,0.4);
}
.bb-dl-video:hover { filter: brightness(1.08); }
.bb-dl-mp3 {
  background: linear-gradient(135deg, #d29922, #e3b341) !important;
  box-shadow: 0 4px 14px rgba(210,153,34,0.4);
  color: #1a1a1a !important;
}
.bb-dl-mp3:hover { filter: brightness(1.08); }


/* legacy placeholder kept harmless */
.fb-like-placeholder { display: none; }

.bbc-code-click {
  cursor: pointer;
  position: relative;
  transition: background .15s, border-color .15s;
}
.bbc-code-click:hover {
  border-color: #58a6ff !important;
  background: rgba(88,166,255,0.08);
}
.bbc-code-click.copied {
  border-color: #3fb950 !important;
  background: rgba(63,185,80,0.12);
}


/* Custom dark Facebook like box — no white */
.fb-custom-dark {
  background: #18191a !important;
  border: 1px solid #3a3b3c !important;
  border-radius: 12px;
  padding: 14px;
  color: #e4e6eb;
}
.fb-cd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.fb-cd-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: #1877f2;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.fb-cd-name {
  display: block;
  font-weight: 700;
  color: #e4e6eb !important;
  text-decoration: none !important;
  font-size: 0.95rem;
}
.fb-cd-name:hover { color: #1877f2 !important; }
.fb-cd-sub {
  display: block;
  font-size: 0.78rem;
  color: #b0b3b8;
}
.fb-cd-like {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  background: #1877f2 !important;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
  font-size: 0.9rem;
  margin-bottom: 12px;
  border: none;
}
.fb-cd-like:hover { filter: brightness(1.08); color: #fff !important; }
.fb-cd-faces {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.fb-cd-face {
  width: 32px; height: 32px;
  border-radius: 4px;
  border: 1px solid #3a3b3c;
  display: inline-block;
}
.fb-cd-note {
  margin: 0;
  font-size: 0.78rem;
  color: #b0b3b8;
  line-height: 1.35;
}


.bb-code-wrap {
  position: relative;
  margin: 12px 0;
  border-radius: 10px;
  background: #0d1117;
  border: 1px solid #30363d;
  overflow: hidden;
}
.bb-code-wrap .bb-code {
  margin: 0;
  padding: 14px 14px 14px 14px;
  background: transparent;
  border: none;
  overflow-x: auto;
  color: #e6edf3;
  font-size: 0.9rem;
  line-height: 1.5;
}
.bb-code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #21262d;
  color: #e6edf3;
  cursor: pointer;
}
.bb-code-copy:hover { background: #30363d; }
.bb-code-copy.copied { background: #238636; border-color: #238636; color: #fff; }
.fb-cd-avatar {
  overflow: hidden;
  padding: 0 !important;
}
.fb-cd-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.fb-cd-face {
  overflow: hidden;
  padding: 0 !important;
  background: #3a3b3c;
}
.fb-cd-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fb-cd-user {
  display: block;
  font-size: 0.75rem;
  color: #8ab4f8;
  margin-top: 2px;
}
.fb-cd-sub {
  display: block;
  font-size: 0.78rem;
  color: #b0b3b8;
}
