/* Brunei Darussalam Pools - Theme */
* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; background: #ffffff; width: 100%; }
body { font-family: 'Abel', Arial, sans-serif; font-size: 14px; color: #000; }

.bp-topbar { background: #5c0931; color: #fff; padding: 0; }
.bp-topbar-inner { max-width: 1024px; margin: 0 auto; height: 38px; display: flex; align-items: center; justify-content: flex-end; padding: 0 10px; }
.bp-topbar-inner span { color: #fff; font-size: 16px; }

.bp-marquee { background: #fff; border-bottom: 1px solid #e6e6e6; }
.bp-marquee marquee { color: #5c0931; font-weight: bold; padding: 6px 0; }

.bp-header { background: #fff; }
.bp-header-inner { max-width: 1024px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.bp-header-logo img { display: block; height: 84px; width: auto; }
.bp-header-nav { display: flex; align-items: center; }
.bp-header-nav a { display: inline-block; }
.bp-header-nav a img { display: block; height: 84px; width: auto; transition: opacity 0.2s ease; }
.bp-header-nav a:hover img { opacity: 0.8; }
.bp-header-auth { display: flex; align-items: center; gap: 8px; }
.bp-header-auth a img { display: block; height: 37px; width: auto; transition: transform 0.2s ease; }
.bp-header-auth a:hover img { transform: scale(1.03); }

.bp-main { background: #c31432; background: linear-gradient(to right, #240b36, #c31432); padding: 25px 0 40px; min-height: 553px; }
.bp-container { max-width: 1024px; margin: 0 auto; padding: 0 10px; }
.bp-welcome { color: #fff; text-align: center; font-size: 30px; font-weight: normal; margin: 0 0 20px; padding: 0; }

.bp-panel { max-width: 874px; margin: 0 auto; background: transparent; }
.bp-panel-inner { display: flex; align-items: stretch; gap: 20px; background-image: url('../images/brunei/box-middle.png'); background-repeat: no-repeat; background-size: 100% 100%; min-height: 419px; padding: 20px; }

.bp-winning { width: 297px; min-width: 297px; text-align: center; }
.bp-winning-title { color: #fff; margin-top: 10px; }
.bp-winning-title .wn { font-size: 14px; font-weight: bold; letter-spacing: 1px; }
.bp-winning-title .r4 { font-size: 34px; font-weight: bold; display: block; margin: 2px 0; line-height: 1.05; }
.bp-winning-title .drw { font-size: 14px; }
.bp-lottery-time { display: inline-block; background: #ff020d; color: #fff; padding: 6px 18px; margin: 10px 0 14px; font-size: 14px; }

.bp-balls { width: 284px; margin: 0 auto; background-image: url('../images/brunei/list-number.png'); background-repeat: no-repeat; background-position: center top; background-size: 100% auto; min-height: 124px; }
.bp-balls table { width: 100%; border-collapse: collapse; }
.bp-balls td.spacer { height: 78px; }
.bp-balls td.num { font-size: 30px; font-weight: bold; color: #000; text-align: center; padding-top: 4px; }

.bp-prize-table { width: 268px; margin: 10px auto 0; border-collapse: collapse; }
.bp-prize-table .head { background: #5c0931; color: #fff; text-align: center; font-size: 20px; height: 33px; }
.bp-prize-table td.cell { height: 33px; text-align: center; font-size: 18px; font-weight: bold; color: #000; }
.bp-prize-table td.c-a { background: #efefef; }
.bp-prize-table td.c-b { background: #e4e4e4; }

.bp-latest { flex: 1; padding-top: 10px; }
.bp-latest-title img { display: block; margin-bottom: 6px; }
.bp-latest-table { width: 100%; border-collapse: collapse; }
.bp-latest-table th { color: #fff; font-weight: bold; text-align: center; height: 38px; font-size: 14px; }
.bp-latest-table th.date { background: #000; text-align: left; padding-left: 10px; }
.bp-latest-table th.p1 { background: #eaa110; }
.bp-latest-table th.p2 { background: #88d3d2; }
.bp-latest-table th.p3 { background: #df485c; }
.bp-latest-table td { background: #efefef; height: 37px; border-right: 1px solid #a4a4a4; text-align: center; font-weight: bold; font-size: 14px; color: #000; }
.bp-latest-table td.date { text-align: left; padding-left: 8px; }
.bp-see-full { text-align: right; padding-top: 8px; }
.bp-see-full a { text-decoration: none; color: #fff; font-size: 14px; }
.bp-see-full a:hover { color: #ff9600; text-decoration: underline; }

.bp-bottom-strip { background: #5c0931; padding: 0; }
.bp-bottom-strip-inner { max-width: 1024px; margin: 0 auto; }
.bp-bottom-strip img { display: block; width: 100%; height: auto; }

.bp-footer { background: #292929; padding: 30px 0; color: #fff; }
.bp-footer-inner { max-width: 1024px; margin: 0 auto; display: flex; gap: 25px; padding: 0 20px; align-items: flex-start; }
.bp-footer-col { min-width: 150px; }
.bp-footer-col a { display: block; font-family: 'Abel', Arial; font-size: 14px; color: #fff; text-decoration: none; padding: 3px 0; transition: color 0.2s ease; }
.bp-footer-col a:hover { color: #ff9600; }
.bp-footer-notice { flex: 1; }
.bp-footer-notice span { color: #fff; font-size: 14px; line-height: 1.5; }
.bp-footer-notice img { display: block; margin-top: 8px; max-width: 290px; height: auto; }
.bp-copy { text-align: center; color: #fff; padding: 15px 0 0; font-size: 14px; }

/* Modal (Popup Login/Register/Info) */
.bp-modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 9998; display: none; align-items: center; justify-content: center; }
.bp-modal-mask.open { display: flex; }
.bp-modal { background: #5a0932; width: 356px; padding: 22px; color: #fff; text-align: center; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.4); position: relative; }
.bp-modal .cls { position: absolute; top: 8px; right: 12px; color: #fff; cursor: pointer; font-size: 18px; font-weight: bold; }
.bp-modal .t1 { color: #fff; font-size: 14px; display: block; margin-bottom: 4px; }
.bp-modal .t2 { color: #fff; font-size: 18px; display: block; }

/* Result page cards */
.bp-page-title { color: #fff; text-align: center; font-size: 24px; margin: 0 0 15px; }
.bp-search-bar { max-width: 400px; margin: 0 auto 20px; display: flex; gap: 6px; align-items: center; background: #fff; padding: 8px; border-radius: 4px; }
.bp-search-bar .icon { padding: 0 8px; color: #5c0931; }
.bp-search-bar input[type=text] { flex: 1; border: 1px solid #ccc; padding: 8px 10px; font-size: 14px; outline: none; }
.bp-search-bar button { background: #c31432; color: #fff; border: 0; padding: 9px 18px; cursor: pointer; font-weight: bold; transition: background 0.2s; }
.bp-search-bar button:hover { background: #a10f28; }

.bp-result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 1024px; margin: 0 auto; }
.bp-result-card { background: #ffffff; border-radius: 6px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.2); text-align: center; padding: 18px; border-top: 4px solid #eaa110; }
.bp-result-card .brand { background: #5c0931; color: #fff; padding: 10px; margin: -18px -18px 12px; }
.bp-result-card h5 { margin: 0 0 6px; color: #5c0931; font-size: 15px; text-transform: capitalize; font-weight: bold; }
.bp-result-card .ball { font-size: 42px; font-weight: bold; color: #c31432; letter-spacing: 4px; margin: 8px 0; }
.bp-result-card .date { color: #333; font-size: 13px; }
.bp-result-card .cta { color: #eaa110; font-size: 13px; margin-top: 8px; font-weight: bold; }

.bp-pagination { display: flex; justify-content: center; gap: 6px; margin: 25px 0; flex-wrap: wrap; }
.bp-pagination a { padding: 8px 14px; background: #fff; color: #5c0931; text-decoration: none; border-radius: 3px; font-weight: bold; font-size: 13px; transition: background 0.2s, color 0.2s; }
.bp-pagination a:hover { background: #eaa110; color: #fff; }
.bp-pagination a.active { background: #c31432; color: #fff; }
.bp-pagination a.disabled { background: #ddd; color: #888; pointer-events: none; }

/* Live draw layout */
.bp-live-wrap { max-width: 700px; margin: 0 auto; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.15); padding: 20px; border-radius: 8px; color: #fff; }
.bp-live-wrap h4, .bp-live-wrap h5, .bp-live-wrap h6 { color: #fff; text-align: center; margin: 6px 0; }
.bp-live-wrap h5 { font-size: 22px; font-weight: bold; }
.bp-live-wrap .live-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.15); }
.bp-live-wrap .live-row:last-child { border-bottom: 0; }
.bp-live-wrap .live-label { font-size: 18px; font-weight: bold; }
.bp-live-wrap .live-num { font-size: 26px; font-weight: bold; color: #eaa110; text-align: center; letter-spacing: 4px; }
.bp-live-brand { text-align: center; margin-bottom: 14px; }
.bp-live-brand img { max-height: 60px; }

/* Nav dropdown for result menu (from database) */
.bp-nav-inline { display: flex; align-items: center; gap: 4px; margin-left: 8px; position: relative; }
.bp-nav-dropdown { position: relative; }
.bp-nav-dropdown-toggle { background: transparent; border: 0; cursor: pointer; padding: 0 8px; color: #5c0931; font-family: 'Abel', Arial; font-size: 14px; font-weight: bold; height: 84px; }
.bp-nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,0.15); min-width: 200px; z-index: 200; border-radius: 4px; overflow: hidden; }
.bp-nav-dropdown.open .bp-nav-dropdown-menu { display: block; }
.bp-nav-dropdown-menu a { display: block; padding: 10px 14px; color: #5c0931; text-decoration: none; font-size: 14px; border-bottom: 1px solid #eee; }
.bp-nav-dropdown-menu a:hover, .bp-nav-dropdown-menu a.active { background: #f5f5f5; color: #c31432; }

@media (max-width: 1023px) {
  .bp-header-inner { flex-wrap: wrap; padding: 10px; gap: 10px; justify-content: center; }
  .bp-header-nav { flex-wrap: wrap; justify-content: center; }
  .bp-panel-inner { flex-direction: column; padding: 15px; background: rgba(0,0,0,0.35); border-radius: 8px; }
  .bp-winning { width: 100%; }
  .bp-latest { width: 100%; }
  .bp-result-grid { grid-template-columns: 1fr; padding: 0 10px; }
  .bp-footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
  .bp-topbar-inner { justify-content: center; }
}
