:root {
    --bo88-bg: #f6f8fb;
    --bo88-surface: #ffffff;
    --bo88-surface-soft: #eef3f8;
    --bo88-text: #121a26;
    --bo88-text-soft: #44556b;
    --bo88-heading: #0b1526;
    --bo88-brand: #0f8a5f;
    --bo88-brand-strong: #086f4b;
    --bo88-border: #d9e3ee;
    --bo88-shadow: 0 10px 28px rgba(11, 21, 38, 0.07);
    --bo88-radius: 14px;
    --bo88-radius-lg: 18px;
    --bo88-space-1: 0.5rem;
    --bo88-space-2: 0.75rem;
    --bo88-space-3: 1rem;
    --bo88-space-4: 1.25rem;
    --bo88-space-5: 1.75rem;
    --bo88-space-6: 2.5rem;
}

html {
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
}

body {
    background: linear-gradient(180deg, #f7fafc 0%, #f0f5fa 100%);
    color: var(--bo88-text);
    font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global reading comfort for pages and posts */
.entry-content,
.post .entry-content,
.page-wrapper,
.blog-wrapper {
    max-width: 100%;
}

.entry-content p,
.entry-content li,
.blog-entry-summary,
.page .entry-content p {
    color: var(--bo88-text-soft);
    font-size: 1.02rem;
    line-height: 1.8;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.section-title,
h1,
h2,
h3,
h4 {
    color: var(--bo88-heading);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.28;
    margin-top: 1.3em;
    margin-bottom: 0.55em;
}

.entry-content h1,
h1 {
    font-size: clamp(1.55rem, 4.8vw, 2.5rem);
}

.entry-content h2,
h2 {
    font-size: clamp(1.3rem, 3.8vw, 2rem);
}

.entry-content h3,
h3 {
    font-size: clamp(1.15rem, 3.1vw, 1.45rem);
}

.container,
.section-content {
    width: min(1140px, calc(100% - 1.2rem));
}

@media (min-width: 768px) {
    .container,
    .section-content {
        width: min(1140px, calc(100% - 2rem));
    }
}

.footer-wrapper .container,
#footer .container {
    margin-inline: auto;
}

/* Compact, clear header */
.header-wrapper,
#masthead {
    box-shadow: 0 2px 20px rgba(12, 28, 45, 0.06);
}

.header-main {
    min-height: 62px;
}

.header-main .nav > li > a {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2f45;
    padding-inline: 0.65rem;
}

.header-main .nav > li > a:hover,
.header-main .nav > li.active > a {
    color: var(--bo88-brand);
}

@media (max-width: 849px) {
    .header-main {
        min-height: 56px;
    }

    .off-canvas .nav-vertical > li > a {
        font-size: 0.98rem;
        font-weight: 600;
        padding: 0.72rem 0.3rem;
    }
}

/* Hero and top sections */
.home .banner,
.home .section:first-of-type {
    border-radius: var(--bo88-radius-lg);
    overflow: hidden;
    box-shadow: var(--bo88-shadow);
}

.home .banner h1,
.home .banner h2,
.home .section:first-of-type h1,
.home .section:first-of-type h2 {
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}

.home .section {
    background: var(--bo88-surface);
    border: 1px solid var(--bo88-border);
    border-radius: var(--bo88-radius);
    margin-bottom: var(--bo88-space-5);
    padding: clamp(0.85rem, 2.8vw, 1.5rem);
    box-shadow: 0 6px 24px rgba(8, 27, 46, 0.04);
}

.home .col > h1 {
    text-align: center;
    margin: 0.7rem auto 1rem;
    max-width: 28ch;
}

/* Homepage shortcuts (about/help/payment/support) */
.home .bo88-shortcuts {
    align-items: flex-start;
    row-gap: 0.3rem;
}

.home .bo88-shortcuts .img img {
    width: min(128px, 100%);
    height: auto;
    margin-inline: auto;
}

.home .bo88-shortcuts p {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

@media (max-width: 849px) {
    .home .bo88-app-links > .col-inner {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding-inline: 0.28rem;
    }

    .home .bo88-app-links .button {
        font-size: 0.88rem;
        white-space: nowrap;
        padding-top: 0.55em;
        padding-bottom: 0.55em;
    }

    .home .bo88-shortcuts > .col {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        padding-inline: 0.25rem;
    }

    .home .bo88-shortcuts .img img {
        width: min(64px, 100%);
    }

    .home .bo88-shortcuts p {
        font-size: 0.84rem;
    }

    .home .bo88-scroll-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.35rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.35rem;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .home .bo88-scroll-row > .col,
    .home .bo88-scroll-row > .col-inner {
        flex: 0 0 35% !important;
        max-width: 35% !important;
        min-width: 35% !important;
        scroll-snap-align: start;
        padding-inline: 0.25rem;
    }

    .home .bo88-scroll-row img {
        width: 86%;
        height: auto;
        margin-inline: auto;
    }

    .home .bo88-scroll-row p {
        margin-top: 0.45rem;
        font-size: 0.84rem;
        font-weight: 700;
        line-height: 1.35;
    }
}

/* Cards and post grids */
.box,
.post-item,
.product-small,
.col-inner {
    border-radius: 12px;
}

.box,
.post-item,
.product-small {
    border: 1px solid var(--bo88-border);
    background: var(--bo88-surface);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

@media (hover: hover) {
    .box:hover,
    .post-item:hover,
    .product-small:hover {
        transform: translateY(-3px);
        box-shadow: var(--bo88-shadow);
    }
}

/* CTA clear and consistent */
.button,
button,
input[type="submit"] {
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
}

.button.primary,
.button.is-primary,
button[type="submit"],
input[type="submit"] {
    background: linear-gradient(180deg, var(--bo88-brand) 0%, var(--bo88-brand-strong) 100%);
    border-color: var(--bo88-brand-strong);
    color: #fff;
}

.button.primary:hover,
.button.is-primary:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    filter: brightness(1.04);
}

/* Tables for odds/kèo visibility */
.entry-content table,
.table,
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--bo88-border);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    font-size: 0.96rem;
}

.entry-content th,
.entry-content td,
.table th,
.table td,
table th,
table td {
    padding: 0.62rem 0.68rem;
    border-bottom: 1px solid #e7edf5;
    vertical-align: middle;
}

.entry-content tr:nth-child(even),
.table tr:nth-child(even),
table tr:nth-child(even) {
    background: #f7fbff;
}

.entry-content th,
.table th,
table th {
    background: #e8f2fb;
    color: #17324f;
    font-weight: 700;
}

/* Make long tables readable on mobile */
.entry-content table,
.table,
.wp-block-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Limit costly initial rendering below the fold */
.home .section,
.blog-wrapper .post-item,
.archive .post-item {
    content-visibility: auto;
    contain-intrinsic-size: 1px 520px;
}

/* Forms and input clarity */
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
    border-radius: 10px;
    border: 1px solid #cfdbe8;
    min-height: 42px;
    padding: 0.56rem 0.72rem;
    background: #fff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #7db8ef;
    box-shadow: 0 0 0 3px rgba(29, 116, 197, 0.15);
}

/* Better spacing across article and listing pages */
.article-inner,
.post-inner,
.page-inner,
.entry-content > * {
    margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.18rem;
}

/* Avoid popup spam visual dominance if plugins inject sticky boxes */
.mfp-wrap .mfp-content,
.modal,
.popup,
.popup-main {
    border-radius: 12px;
}

/* Footer clean-up */
.footer-wrapper,
#footer {
    background: #0f1724;
    color: #d5dfec;
}

.footer-wrapper a,
#footer a {
    color: #f1f6ff;
}

.footer-wrapper a:hover,
#footer a:hover {
    color: #8fd4b8;
}

/* Structured FAQ block */
.bo88-faq {
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
}

.bo88-faq h2 {
    margin-top: 0;
}

.bo88-faq-item,
.bo88-faq details {
    background: #fff;
    border: 1px solid var(--bo88-border);
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.bo88-faq details {
    padding: 0;
}

.bo88-faq-item h3,
.bo88-faq summary {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.02rem;
}

.bo88-faq summary {
    position: relative;
    display: block;
    cursor: pointer;
    list-style: none;
    padding: 0.95rem 2.8rem 0.95rem 1rem;
    color: var(--bo88-heading);
    font-weight: 700;
}

.bo88-faq summary::-webkit-details-marker {
    display: none;
}

.bo88-faq summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    font-size: 1.3rem;
    color: var(--bo88-brand);
}

.bo88-faq details[open] summary::after {
    content: "-";
}

.bo88-faq details p,
.bo88-faq-item p {
    margin: 0;
    padding: 0 1rem 1rem;
}

.bo88-internal-links {
    margin-top: 1.1rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--bo88-border);
    border-radius: 12px;
    background: #fff;
}

.bo88-internal-links h2 {
    margin: 0 0 0.6rem;
    font-size: 1.1rem;
}

.bo88-internal-links ul {
    margin: 0;
    padding-left: 1.1rem;
}

.bo88-internal-links li {
    margin: 0.2rem 0;
}

.bo88-toc {
    margin: 1rem 0 1.1rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--bo88-border);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.bo88-toc h2 {
    margin: 0 0 0.6rem;
    font-size: 1.08rem;
}

.bo88-toc ol {
    margin: 0;
    padding-left: 1.15rem;
}

.bo88-toc li {
    margin: 0.22rem 0;
}

.bo88-search-intent-intro {
    margin: 1rem 0 1.15rem;
    padding: 1rem 1rem 0.95rem;
    border-left: 4px solid var(--bo88-brand);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(11, 21, 38, 0.05);
}

.bo88-search-intent-intro p {
    margin: 0;
}
