/* ==========================================================================
   88win Malaysia theme
   Night-navy surfaces, casino-gold actions, condensed sporty display type.
   ========================================================================== */

:root {
	--bg: #081127;
	--surface: #0d1a38;
	--surface-2: #13254d;
	--line: #1e3263;
	--gold: #f2b636;
	--gold-hi: #ffd978;
	--gold-ink: #2a1a00;
	--text: #e8edf7;
	--muted: #9aa8c7;
	--hot: #e5484d;

	--font-display: "Barlow Semi Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
	--font-body: "Barlow", "Segoe UI", Roboto, Arial, sans-serif;

	--topbar-h: 64px;
	--side-w: 236px;
	--gap: 14px;
	--radius: 12px;
	--radius-sm: 8px;
	--pad: clamp(14px, 2.2vw, 28px);
}

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

html { scroll-padding-top: calc(var(--topbar-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 16px/1.6 var(--font-body);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { color: #fff; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; color: #fff; }

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; border-radius: 4px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link:focus {
	clip: auto; clip-path: none; width: auto; height: auto; margin: 0;
	z-index: 1000; top: 8px; left: 8px; padding: 10px 16px; background: var(--gold); color: var(--gold-ink); border-radius: var(--radius-sm);
}

/* Buttons ---------------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 40px; padding: 0 20px; border-radius: var(--radius-sm);
	font: 700 15px/1 var(--font-display); letter-spacing: .02em;
	border: 1px solid transparent; white-space: nowrap;
	transition: background-color .15s, color .15s, border-color .15s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); }
.btn-gold:hover { background: var(--gold-hi); color: var(--gold-ink); }
.btn-outline { border-color: var(--gold); color: var(--gold-hi); background: transparent; }
.btn-outline:hover { background: rgba(242, 182, 54, .12); color: #fff; }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }

/* Top bar ---------------------------------------------------------------- */
.topbar {
	position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--topbar-h);
	display: flex; align-items: center; gap: 12px; padding: 0 var(--pad) 0 18px;
	background: rgba(8, 17, 39, .96); border-bottom: 1px solid var(--line);
	backdrop-filter: blur(8px);
}
.brand { flex: 0 0 auto; display: flex; align-items: center; min-width: calc(var(--side-w) - 18px); }
.brand .custom-logo { max-height: 44px; width: auto; }
.logo-text { display: inline-flex; align-items: baseline; font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1; letter-spacing: -.01em; }
.logo-88 { color: var(--gold); font-style: italic; }
.logo-win { color: #fff; }
.auth { margin-left: auto; display: flex; gap: 10px; }

.menu-toggle {
	display: none; width: 40px; height: 40px; align-items: center; justify-content: center;
	background: var(--surface-2); color: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Side menu -------------------------------------------------------------- */
.sidenav {
	position: fixed; z-index: 50; top: var(--topbar-h); bottom: 0; left: 0; width: var(--side-w);
	display: flex; flex-direction: column;
	background: var(--surface); border-right: 1px solid var(--line);
	overflow-y: auto; overscroll-behavior: contain;
}
.sidenav-inner { padding: 14px 0; flex: 1; }
.side-menu { list-style: none; margin: 0; padding: 0; }
.side-menu a {
	position: relative; display: flex; align-items: center; gap: 14px;
	padding: 12px 22px; color: #c9d3ea; font: 600 16px/1.2 var(--font-body);
}
.side-menu .nav-icon { width: 22px; height: 22px; flex: 0 0 22px; color: #7f8fb5; }
.side-menu a:hover { color: #fff; background: rgba(255, 255, 255, .04); }
.side-menu a:hover .nav-icon { color: var(--gold-hi); }
.side-menu .current-menu-item > a,
.side-menu .current_page_item > a {
	color: #fff;
	background: linear-gradient(90deg, rgba(242, 182, 54, .22), rgba(242, 182, 54, 0) 85%);
}
.side-menu .current-menu-item > a::after,
.side-menu .current_page_item > a::after {
	content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 4px; background: var(--gold);
}
.side-menu .current-menu-item .nav-icon,
.side-menu .current_page_item .nav-icon { color: var(--gold); }

.sidenav-foot { padding: 16px 18px 22px; border-top: 1px solid var(--line); }
.age-note { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.age-badge {
	display: inline-grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px;
	border: 2px solid var(--hot); border-radius: 50%; color: #fff; font: 800 11px/1 var(--font-display);
}
.age-badge-lg { width: 46px; height: 46px; flex-basis: 46px; font-size: 16px; }

.sidenav-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, .6); }

/* Page shell ------------------------------------------------------------- */
.page-shell { margin-left: var(--side-w); padding-top: var(--topbar-h); min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; padding: 18px var(--pad) 40px; min-width: 0; }

/* Hero slider ------------------------------------------------------------ */
.hero { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.hero-track { position: relative; aspect-ratio: 1600 / 560; }
.hero-text .hero-track { min-height: 240px; }
.hero-slide {
	position: absolute; inset: 0; display: flex; align-items: center;
	opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s .6s;
	color: #fff;
}
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }

/* Placeholder slides (used until banner images are uploaded) */
.hero-slide:not(.has-image) { background: radial-gradient(120% 140% at 85% 50%, #3a2a8f 0%, #1a1f5c 38%, #0b1434 75%); }
.hero-slide.tone-2 { background: radial-gradient(120% 140% at 85% 50%, #8a1f3d 0%, #401540 40%, #0b1434 78%); }
.hero-slide.tone-3 { background: radial-gradient(120% 140% at 85% 50%, #0f6a5c 0%, #0e3b4f 40%, #0b1434 78%); }
.hero-slide.tone-4 { background: radial-gradient(120% 140% at 85% 50%, #8a5a12 0%, #3b2a1a 40%, #0b1434 78%); }
.hero-art { position: absolute; right: 4%; top: 50%; transform: translateY(-50%); pointer-events: none; }
.hero-88 {
	display: block; font: italic 800 clamp(140px, 24vw, 340px)/.8 var(--font-display); letter-spacing: -.04em;
	color: transparent; -webkit-text-stroke: 2px rgba(255, 217, 120, .75);
	text-shadow: 0 0 60px rgba(242, 182, 54, .35);
}
.hero-copy { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 0 clamp(20px, 6%, 72px); max-width: 640px; }
.hero-title { font: 800 clamp(28px, 4.2vw, 56px)/1.02 var(--font-display); text-transform: none; }
.hero-sub { font-size: clamp(15px, 1.4vw, 19px); color: #d9def0; max-width: 34ch; }
.hero-copy .btn { margin-top: 6px; }

.hero-nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	width: 40px; height: 40px; display: grid; place-items: center;
	background: rgba(8, 17, 39, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%;
}
.hero-nav:hover { background: rgba(8, 17, 39, .85); }
.hero-nav .icon { width: 20px; height: 20px; }
.hero-prev { left: 12px; }
.hero-next { right: 12px; }
.hero-dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; }
.hero-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .45); transition: width .25s, background-color .25s; }
.hero-dot.is-active { width: 26px; background: var(--gold); }

/* Section blocks --------------------------------------------------------- */
.block { margin-top: 30px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.block-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 24px; font-weight: 700; }
.block-icon { width: 24px; height: 24px; color: var(--gold); }
.row-controls { display: flex; gap: 6px; }
.pill {
	display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 12px;
	background: var(--surface-2); color: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
	font: 700 14px/1 var(--font-display);
}
.pill .icon { width: 16px; height: 16px; }
.pill:hover { border-color: var(--gold); color: #fff; }
.pill-icon { width: 34px; padding: 0; justify-content: center; }
.pill[disabled] { opacity: .35; cursor: default; }

/* Game tiles ------------------------------------------------------------- */
.tile-track {
	display: grid; grid-auto-flow: column; gap: var(--gap);
	grid-auto-columns: calc((100% - 7 * var(--gap)) / 8);
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none; padding-bottom: 2px;
}
.tile-track::-webkit-scrollbar { display: none; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--gap); }

.tile {
	position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius);
	overflow: hidden; scroll-snap-align: start; background: var(--surface-2);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.tile-img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tile:hover .tile-img { transform: scale(1.05); }
.tile:hover { box-shadow: inset 0 0 0 2px var(--gold); }

/* Placeholder tile until a featured image is uploaded */
.tile-ph { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(160deg, #2b3f8a, #0f1b44 70%); }
.tone-casino .tile-ph { background: linear-gradient(160deg, #8d1f3a, #2a0f2c 72%); }
.tone-sports .tile-ph { background: linear-gradient(160deg, #146b55, #0b2235 72%); }
.tone-fishing .tile-ph { background: linear-gradient(160deg, #0f6f9a, #0a2040 72%); }
.tile-ph-mark { font: italic 800 clamp(64px, 7vw, 96px)/1 var(--font-display); color: rgba(255, 255, 255, .14); }
.tile-name {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 10px;
	background: linear-gradient(0deg, rgba(5, 10, 26, .92), rgba(5, 10, 26, 0));
	font: 700 15px/1.15 var(--font-display); color: #fff; text-align: center;
}
.tile-img ~ .tile-name { position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.tile-badge {
	position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 6px;
	background: var(--hot); color: #fff; font: 700 12px/1.2 var(--font-display);
}

/* Promotion cards -------------------------------------------------------- */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.promo-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.promo-media { display: block; aspect-ratio: 2 / 1; background: var(--surface-2); }
.promo-media img { width: 100%; height: 100%; object-fit: cover; }
.promo-ph {
	display: flex; align-items: center; justify-content: flex-end; height: 100%; padding: 0 22px; overflow: hidden;
	background: radial-gradient(90% 120% at 100% 0%, rgba(242, 182, 54, .45), transparent 60%), linear-gradient(135deg, #1b2c63, #0d1736);
}
.promo-ph-mark { font: italic 800 120px/.8 var(--font-display); color: transparent; -webkit-text-stroke: 1.5px rgba(255, 217, 120, .6); }
.promo-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 18px; flex: 1; }
.promo-title { font-size: 20px; margin: 0; }
.promo-title a { color: #fff; }
.promo-excerpt { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.promo-actions { display: flex; gap: 8px; margin-top: 6px; }

/* SEO content + Read more ------------------------------------------------ */
.seo { margin-top: 40px; padding: clamp(20px, 3vw, 34px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.seo-h1 { font-size: clamp(26px, 3vw, 38px); color: var(--gold-hi); max-width: 30ch; margin-bottom: .6em; }
.seo-body { color: #c6cfe4; max-width: 78ch; }
.seo-body h2 { font-size: 22px; margin-top: 1.3em; }
.seo-body h2:first-child { margin-top: 0; }
.seo-body.is-collapsed { max-height: 13.5em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.read-more { margin-top: 14px; }
.read-more .icon { transition: transform .2s; }
.read-more .rm-less { display: none; }
.read-more[aria-expanded="true"] .rm-more { display: none; }
.read-more[aria-expanded="true"] .rm-less { display: inline; }
.read-more[aria-expanded="true"] .icon { transform: rotate(180deg); }

/* Inner pages ------------------------------------------------------------ */
.page-wrap { max-width: 900px; }
.page-wide { max-width: none; }
.page-head { margin-bottom: 22px; }
.page-title { font-size: clamp(30px, 4vw, 46px); margin-bottom: .3em; }
.page-meta { color: var(--muted); font-size: 14px; margin: 0; }
.lead { color: #c6cfe4; font-size: 17px; max-width: 70ch; }
.lead p { margin: 0 0 .6em; }
.page-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
.crumb { margin: 0 0 10px; }
.crumb a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.crumb .icon { width: 16px; height: 16px; }

.prose { color: #c6cfe4; max-width: 72ch; }
.prose h2 { font-size: 26px; margin-top: 1.4em; }
.prose h3 { font-size: 21px; margin-top: 1.2em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--surface-2); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
	display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
	background: var(--surface); border: 1px solid var(--line); border-radius: 40px; color: #c9d3ea; font-weight: 600;
}
.chip .icon { width: 18px; height: 18px; color: var(--muted); }
.chip:hover { border-color: var(--gold); color: #fff; }
.chip.is-current { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.chip.is-current .icon { color: var(--gold-ink); }

.download-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 28px; }
.download-card {
	display: flex; align-items: center; gap: 16px; padding: 20px 22px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: #fff;
}
.download-card:hover { border-color: var(--gold); color: #fff; }
.download-icon { width: 40px; height: 40px; color: var(--gold); flex: 0 0 40px; }
.download-label { display: block; color: var(--muted); font-size: 14px; }
.download-os { display: block; font: 700 22px/1.1 var(--font-display); }

.post-list { display: grid; gap: 26px; }
.post-item { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.post-thumb { display: block; border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.post-title { font-size: 24px; margin-bottom: 4px; }
.post-title a { color: #fff; }
.nav-links { display: flex; gap: 8px; margin-top: 24px; }
.page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: #fff; }
.page-numbers.current { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }

.notfound { padding: 40px 0; }
.notfound-code { font: italic 800 120px/1 var(--font-display); color: transparent; -webkit-text-stroke: 2px var(--gold); margin: 0 0 10px; }
.empty { color: var(--muted); }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: #050c1e; border-top: 1px solid var(--line); padding: 40px var(--pad) 22px; color: #c6cfe4; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.15fr .8fr 1.5fr 1.1fr 1.15fr; gap: 28px 32px; }
.footer-title { font-size: 20px; color: var(--gold); margin-bottom: 14px; }
.footer-col p { margin: 0 0 10px; }
.footer-site a { color: var(--gold-hi); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { color: #c6cfe4; }
.footer-links a:hover { color: var(--gold-hi); }
.pay-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pay-list li {
	padding: 5px 10px; border-radius: 6px; background: #f4f6fb; color: #0b1430;
	font: 700 13px/1.1 var(--font-display); letter-spacing: .01em;
}
.footer-logos { max-width: 100%; margin-bottom: 10px; }
.rg { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.rg p { margin: 0; }
.footer-more { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }
.socials { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.social { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: var(--surface-2); }
.social-facebook { background: #1877f2; }
.social-x { background: #000; border: 1px solid #333; }
.social-instagram { background: radial-gradient(circle at 30% 110%, #fdc468, #df4996 55%, #4f5bd5); }
.social-telegram { background: #229ed9; }
.social-youtube { background: #ff0000; }
.social-whatsapp { background: #25d366; }
.social:hover { color: #fff; filter: brightness(1.15); }
.copyright { margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }

/* Floating live chat */
.livechat {
	position: fixed; right: 18px; bottom: 18px; z-index: 55; width: 56px; height: 56px; border-radius: 50%;
	display: grid; place-items: center; background: var(--gold); color: var(--gold-ink);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.livechat .icon { width: 28px; height: 28px; }
.livechat:hover { color: var(--gold-ink); background: var(--gold-hi); }

/* WordPress core classes */
.alignwide, .alignfull { max-width: 100%; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { color: var(--muted); font-size: 14px; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1400px) {
	.tile-track { grid-auto-columns: calc((100% - 5 * var(--gap)) / 6); }
}
@media (max-width: 1180px) {
	.footer-grid { grid-template-columns: repeat(3, 1fr); }
	.footer-col-wide { grid-column: span 2; }
}
@media (max-width: 1024px) {
	.menu-toggle { display: inline-flex; }
	.brand { min-width: 0; }
	.sidenav { transform: translateX(-100%); transition: transform .25s ease; width: min(280px, 82vw); }
	.sidenav.is-open { transform: none; }
	.page-shell { margin-left: 0; }
	.tile-track { grid-auto-columns: calc((100% - 4 * var(--gap)) / 4.6); }
}
@media (max-width: 640px) {
	:root { --topbar-h: 58px; --gap: 10px; }
	.logo-text { font-size: 26px; }
	.brand .custom-logo { max-height: 36px; }
	.auth { gap: 6px; }
	.auth .btn { min-height: 36px; padding: 0 12px; font-size: 14px; }
	.block-title { font-size: 20px; }
	.tile-track { grid-auto-columns: calc((100% - 2 * var(--gap)) / 2.8); }
	.tile-grid { grid-template-columns: repeat(3, 1fr); }
	.block .promo-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.block .promo-card { scroll-snap-align: start; }
	.tile-name { font-size: 13px; padding: 20px 6px 8px; }
	.hero-text .hero-track { aspect-ratio: auto; height: 250px; }
	.hero-art { right: -6%; opacity: .55; }
	.hero-nav { display: none; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-col-wide { grid-column: span 2; }
}
@media (max-width: 420px) {
	.footer-grid { grid-template-columns: 1fr; }
	.footer-col-wide { grid-column: auto; }
	.tile-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
