.bb-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 16px 56px;
    color: #172033;
}

.bb-index-wrap {
    padding-top: 0;
}

.bb-hero,
.bb-panel,
.bb-game-shell {
    background: #fff;
    border: 1px solid #d9e0ec;
    border-radius: 8px;
    box-shadow: 0 16px 38px rgba(18, 31, 56, 0.08);
}

.bb-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: end;
    padding: 30px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #fff 0%, #eef7ff 55%, #fff6e7 100%);
}

.bb-eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    color: #1871a8;
    text-transform: uppercase;
    letter-spacing: 0;
}

.bb-wrap h1,
.bb-wrap h2 {
    margin: 0;
    letter-spacing: 0;
}

.bb-wrap h1 {
    font-size: 30px;
    line-height: 1.25;
}

.bb-wrap h2 {
    font-size: 18px;
}

.bb-wrap p {
    margin: 10px 0 0;
}

.bb-stat-strip,
.bb-game-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bb-stat-strip span,
.bb-game-stats span {
    min-width: 104px;
    padding: 12px 14px;
    border: 1px solid rgba(24, 113, 168, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.bb-stat-strip strong,
.bb-game-stats strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
    color: #172033;
}

.bb-panel {
    padding: 26px;
    margin-top: 20px;
}

.bb-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.bb-start-row,
.bb-control-row,
.bb-page-head {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.bb-start-row,
.bb-control-row {
    justify-content: flex-start;
}

.bb-start-row {
    gap: 14px;
    margin-top: 14px;
    margin-bottom: 14px;
}

.bb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    background: #1769aa;
    color: #fff !important;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none !important;
    cursor: pointer;
}

.bb-btn:hover,
.bb-btn:focus {
    background: #0f558d;
}

.bb-btn-muted {
    border: 1px solid #ccd6e4;
    background: #f8fafc;
    color: #172033 !important;
}

.bb-btn-muted:hover,
.bb-btn-muted:focus {
    background: #eef4fa;
}

.bb-alert {
    padding: 14px 16px;
    border: 1px solid #ffd0d0;
    border-radius: 8px;
    background: #fff5f5;
    color: #b42318;
}

.bb-note {
    color: #667085;
    font-size: 13px;
    line-height: 1.75;
}

.bb-kv {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px 18px;
    margin: 22px 0 0;
    line-height: 1.55;
}

.bb-kv-wide {
    grid-template-columns: repeat(4, auto 1fr);
}

.bb-kv dt {
    color: #667085;
}

.bb-kv dd {
    margin: 0;
    font-weight: 800;
}

.bb-rank-mini {
    display: grid;
    gap: 12px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.bb-rank-mini li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #edf1f6;
    line-height: 1.55;
}

.bb-mission-list,
.bb-rank-tabs {
    display: grid;
    gap: 12px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.bb-mission-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    border: 1px solid #e4eaf3;
    border-radius: 8px;
    background: #f8fafc;
    line-height: 1.5;
}

.bb-mission-list strong,
.bb-mission-list em {
    display: block;
    font-style: normal;
}

.bb-mission-list em {
    margin-top: 7px;
    color: #667085;
    font-size: 12px;
    line-height: 1.45;
}

.bb-mission-list b {
    color: #1769aa;
    white-space: nowrap;
}

.bb-mission-list li.is-complete {
    border-color: #85d6a3;
    background: #f0fff5;
}

.bb-mission-list li.is-awarded {
    border-color: #d8dee8;
    background: #f3f5f8;
}

.bb-mission-list li.is-awarded b {
    color: #667085;
}

.bb-rank-tabs {
    display: flex;
    flex-wrap: wrap;
}

.bb-rank-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #ccd6e4;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font-weight: 800;
    text-decoration: none;
}

.bb-rank-tabs a.active {
    border-color: #1769aa;
    background: #1769aa;
    color: #fff;
}

.bb-table-wrap {
    overflow-x: auto;
    margin-top: 18px;
}

.bb-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.bb-table th,
.bb-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #edf1f6;
    text-align: left;
    white-space: nowrap;
}

.bb-table th {
    background: #f8fafc;
    color: #475467;
    font-weight: 800;
}

.bb-game-wrap {
    max-width: 980px;
}

.bb-rebuilder-module {
    position: relative;
    z-index: 30;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto 16px;
    overflow: visible !important;
}

.bb-rebuilder-module:not(:empty)::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -18px;
    bottom: -18px;
    z-index: -1;
    pointer-events: auto;
}

.bb-rebuilder-module > * {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
}

.bb-rebuilder-module .rb_section,
.bb-rebuilder-module .rb_module,
.bb-rebuilder-module .rb_widget,
.bb-rebuilder-module .rb_box,
.bb-rebuilder-module .rb_inner,
.bb-rebuilder-module .rb_module_inner,
.bb-rebuilder-module .rb_widget_inner {
    width: 100% !important;
    max-width: none !important;
    overflow: visible !important;
}

.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"],
.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] > *,
.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .rb_layout_box,
.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .content_box,
.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .flex_box_inner,
.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .add_module_wrap,
.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .rb_section,
.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .rb_module,
.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .rb_widget,
.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .rb_box,
.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .rb_inner,
.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .rb_module_inner,
.bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .rb_widget_inner {
    padding: 0 !important;
    box-sizing: border-box;
}

section.co_gap_pc_20 .bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"],
.co_gap_pc_20 .bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"],
.co_gap_pc_20 .bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"].flex_box {
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
}

section.co_gap_pc_20 .bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .content_box,
.co_gap_pc_20 .bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .content_box,
.co_gap_pc_20 .bb-rebuilder-module[data-layout="rb_brick_breaker_index_top"] .add_module_wrap {
    padding: 0 !important;
}

.bb-rebuilder-module:empty {
    display: none;
}

.bb-rebuilder-module + .bb-game-shell {
    margin-top: 0;
}

.bb-game-wrap:fullscreen,
.bb-game-wrap.bb-size-mode,
.bb-game-wrap.bb-maximized {
    width: 100vw;
    height: var(--bb-game-vh, 100dvh);
    min-height: var(--bb-game-vh, 100dvh);
    max-width: none;
    margin: 0;
    padding: 12px;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background: #0e1726;
    color: #172033;
}

.bb-game-wrap.bb-size-mode {
    position: fixed;
    top: 0;
    left: 50%;
    right: auto;
    bottom: auto;
    z-index: 99999;
    width: min(100vw, var(--bb-game-width, 1024px));
    max-width: var(--bb-game-width, 1024px);
    transform: translateX(-50%);
}

.bb-game-wrap.bb-maximized {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

body.bb-game-is-maximized {
    overflow: hidden;
}

.bb-game-wrap:fullscreen .bb-rebuilder-module,
.bb-game-wrap.bb-size-mode .bb-rebuilder-module,
.bb-game-wrap.bb-maximized .bb-rebuilder-module {
    display: none !important;
}

.bb-game-shell {
    padding: 18px;
}

.bb-game-wrap:fullscreen .bb-game-shell,
.bb-game-wrap.bb-size-mode .bb-game-shell,
.bb-game-wrap.bb-maximized .bb-game-shell {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
    max-height: none;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bb-game-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    flex: 0 0 auto;
}

.bb-canvas-frame {
    position: relative;
    width: 100%;
    height: clamp(620px, 68vh, 780px);
    min-height: 620px;
    aspect-ratio: auto;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #cfd8e6;
    background: #0e1726;
}

.bb-game-wrap:fullscreen .bb-canvas-frame,
.bb-game-wrap.bb-size-mode .bb-canvas-frame,
.bb-game-wrap.bb-maximized .bb-canvas-frame {
    flex: 1 1 0;
    min-height: 0;
    aspect-ratio: auto;
}

#bb-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.bb-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    background: rgba(14, 23, 38, 0.78);
    color: #fff;
}

.bb-overlay[hidden] {
    display: none;
}

.bb-overlay h2 {
    font-size: 28px;
}

.bb-control-row {
    margin-top: 14px;
    flex: 0 0 auto;
}

.bb-screen-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bb-screen-buttons .bb-btn.active {
    border-color: #1769aa;
    background: #1769aa;
    color: #fff !important;
}

.bb-item-guide {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    background: #f8fafc;
    color: #475467;
    font-size: 12px;
    line-height: 1.45;
}

.bb-item-guide span {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    white-space: nowrap;
}

.bb-item-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.bb-item-paddle { background: #60a5fa; }
.bb-item-slow { background: #34d399; }
.bb-item-multiball { background: #fb7185; }
.bb-item-double { background: #fbbf24; }
.bb-item-bomb { background: #c084fc; }

.bb-game-wrap:fullscreen .bb-note,
.bb-game-wrap.bb-size-mode .bb-note,
.bb-game-wrap.bb-maximized .bb-note {
    flex: 0 0 auto;
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.35;
}

.bb-game-wrap:fullscreen .bb-item-guide,
.bb-game-wrap.bb-size-mode .bb-item-guide,
.bb-game-wrap.bb-maximized .bb-item-guide {
    flex: 0 0 auto;
    margin-top: 8px;
    padding: 8px 10px;
}

@media (max-width: 780px) {
    .bb-hero,
    .bb-grid {
        grid-template-columns: 1fr;
    }

    .bb-game-top,
    .bb-page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .bb-panel {
        padding: 22px;
    }

    .bb-start-row {
        align-items: stretch;
        gap: 10px;
    }

    .bb-start-row .bb-btn {
        flex: 1 1 140px;
    }

    .bb-kv,
    .bb-kv-wide {
        grid-template-columns: 120px 1fr;
    }

    .bb-canvas-frame {
        height: clamp(360px, 62vh, 560px);
        min-height: 360px;
    }

    .bb-game-wrap:fullscreen .bb-canvas-frame,
    .bb-game-wrap.bb-maximized .bb-canvas-frame {
        min-height: 0;
    }

    .bb-game-wrap:fullscreen,
    .bb-game-wrap.bb-maximized {
        padding: 8px;
    }

    .bb-game-wrap:fullscreen .bb-game-shell,
    .bb-game-wrap.bb-maximized .bb-game-shell {
        padding: 10px;
    }

    .bb-game-wrap:fullscreen .bb-game-top,
    .bb-game-wrap.bb-maximized .bb-game-top {
        gap: 8px;
        margin-bottom: 8px;
    }

    .bb-game-wrap:fullscreen h1,
    .bb-game-wrap.bb-maximized h1 {
        font-size: 22px;
    }

    .bb-game-wrap:fullscreen .bb-game-stats span,
    .bb-game-wrap.bb-maximized .bb-game-stats span {
        min-width: 78px;
        padding: 8px 10px;
    }

    .bb-game-wrap:fullscreen .bb-control-row,
    .bb-game-wrap.bb-maximized .bb-control-row {
        margin-top: 8px;
    }

    .bb-game-wrap:fullscreen .bb-note,
    .bb-game-wrap.bb-maximized .bb-note {
        display: none;
    }
}
