:root {
  --mpl-bg: #080B14;
  --mpl-surface: #111827;
  --mpl-surface-2: #172033;
  --mpl-line: #253047;
  --mpl-text: #FFFFFF;
  --mpl-muted: #94A3B8;
  --mpl-dim: #64748B;
  --mpl-primary: #2563EB;
  --mpl-primary-hover: #1D4ED8;
  --mpl-purple: #7C3AED;
  --mpl-electric: #A855F7;
  --mpl-cyan: #06B6D4;
  --mpl-max: 1540px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.mpl-body { margin: 0; min-height: 100vh; background: var(--mpl-bg); color: var(--mpl-text); font-family: Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
a, button, input, select { outline-offset: 3px; }
:focus-visible { outline: 2px solid #60A5FA; outline-offset: 3px; }

.mpl-header {
  position: sticky; top: 0; z-index: 100; height: 66px;
  display: flex; align-items: center; gap: 12px; padding: 0 18px;
  background: rgba(8,11,20,.96); border-bottom: 1px solid #1b2538; backdrop-filter: blur(16px);
}
.mpl-menu, .mpl-icon-btn { display: inline-grid; place-items: center; border: 1px solid #27334a; border-radius: 9px; background: #0d1422; color: #fff; cursor: pointer; }
.mpl-menu { width: 38px; height: 38px; font-size: .9rem; }
.mpl-menu:hover, .mpl-icon-btn:hover { border-color: rgba(37,99,235,.65); background: #141e31; }
.mpl-brand { display: flex; align-items: center; min-width: 190px; width: 190px; height: 46px; }
.mpl-brand img { width: 178px; height: 42px; object-fit: contain; object-position: left center; display: block; }
.mpl-search { flex: 1; max-width: 640px; min-width: 180px; height: 40px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #253047; border-radius: 9px; background: #0d1422; color: #64748B; }
.mpl-search:focus-within { border-color: rgba(37,99,235,.75); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.mpl-search input { width: 100%; height: 38px; border: 0; outline: 0; background: transparent; color: #fff; }
.mpl-search input::placeholder { color: #64748B; }
.mpl-actions { display: flex; align-items: center; gap: 6px; }
.mpl-action { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid #253047; border-radius: 9px; background: #0d1422; color: #fff; text-decoration: none; font-size: .76rem; font-weight: 800; cursor: pointer; }
.mpl-action:hover { border-color: rgba(37,99,235,.55); background: #141e31; }
.mpl-login { background: var(--mpl-primary); border-color: rgba(37,99,235,.72); box-shadow: 0 8px 20px rgba(37,99,235,.18); }
.mpl-login:hover { background: var(--mpl-primary-hover); }

.mpl-layout { width: min(var(--mpl-max), 100%); margin: 0 auto; padding: 14px 18px 46px; display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 14px; }
.mpl-main { min-width: 0; }
/* Platform layout isolation: game styles may contain broad selectors such as `main { max-width: ... }`. */
.mpl-layout > .mpl-main { width: 100% !important; max-width: none !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important; }
.mpl-ad { min-height: 76px; margin: 0 0 10px; display: flex; align-items: center; justify-content: center; border: 1px dashed #2b3851; border-radius: 10px; background: #0b111d; color: #64748B; font-size: .6rem; letter-spacing: .15em; text-transform: uppercase; overflow: hidden; }
.mpl-ad-side { min-height: 250px; position: sticky; top: 80px; }
.mpl-player-wrap { position: relative; overflow: hidden; background: #080B14; border: 1px solid #253047; border-radius: 12px; box-shadow: 0 20px 55px rgba(0,0,0,.30); }
.mpl-game-root { width: 100%; min-height: clamp(520px, 68vh, 820px); display: grid; place-items: center; overflow: hidden; background: #080B14; }
.mpl-game-root > .mpl-game-page { width: 100% !important; min-width: 0 !important; min-height: clamp(520px, 68vh, 820px) !important; margin: 0 !important; display: grid !important; place-items: center !important; overflow: auto !important; background: var(--mpl-bg) !important; color: var(--mpl-text) !important; }
.mpl-game-root > .mpl-game-page main { width: min(100%, 980px) !important; max-width: 980px !important; min-width: 0 !important; margin: 0 auto !important; padding-left: 20px !important; padding-right: 20px !important; }
.mpl-game-root > .mpl-game-page header { background: #0d1422 !important; border-bottom: 1px solid #253047 !important; color: #fff !important; }
.mpl-game-root > .mpl-game-page header a { color: #fff !important; }
.mpl-game-root > .mpl-game-page button { color: #fff; }
.mpl-game-root > .mpl-game-page canvas { max-width: 100%; }
.mpl-player-bar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 11px; background: #0d1422; border-top: 1px solid #253047; }
.mpl-player-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .82rem; }
.mpl-player-title img { width: 74px; height: 26px; object-fit: contain; object-position: left center; }
.mpl-player-tools { display: flex; gap: 6px; }
.mpl-icon-btn { width: 34px; height: 34px; font-size: .82rem; }
.mpl-icon-btn.is-active { color: #60A5FA; border-color: rgba(37,99,235,.65); background: rgba(37,99,235,.14); }
.mpl-bottom-ad { min-height: 86px; margin: 10px 0 0; }

.mpl-details { display: grid; grid-template-columns: 1.15fr .95fr .95fr; gap: 10px; margin-top: 10px; }
.mpl-card { background: var(--mpl-surface); border: 1px solid #253047; border-radius: 11px; padding: 15px; }
.mpl-card h2, .mpl-card h3 { margin: 0 0 8px; font-size: .98rem; }
.mpl-card p, .mpl-card li { color: var(--mpl-muted); line-height: 1.55; font-size: .76rem; }
.mpl-card ul { padding-left: 18px; margin-bottom: 0; }
.mpl-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 13px; }
.mpl-meta div { padding: 8px; border-radius: 8px; background: #0d1422; border: 1px solid #253047; }
.mpl-meta small { display: block; color: var(--mpl-dim); font-size: .6rem; }
.mpl-meta strong { display: block; margin-top: 2px; font-size: .72rem; }
.mpl-meta a { color: #60A5FA; }

.mpl-sidebar { min-width: 0; }
.mpl-sidebar-card { background: var(--mpl-surface); border: 1px solid #253047; border-radius: 11px; padding: 11px; }
.mpl-sidebar-card h3 { margin: 4px 4px 9px; font-size: .92rem; }
.mpl-recommended { display: grid; gap: 5px; }
.mpl-recommended a { display: grid; grid-template-columns: 56px 1fr; gap: 9px; align-items: center; padding: 6px; border: 1px solid transparent; border-radius: 8px; color: #fff; text-decoration: none; }
.mpl-recommended a:hover { background: #141e31; border-color: #253047; }
.mpl-recommended img { width: 56px; height: 40px; object-fit: cover; border-radius: 6px; background: #080B14; }
.mpl-recommended span { font-size: .73rem; font-weight: 800; }
.mpl-recommended small { display: block; color: var(--mpl-muted); margin-top: 2px; font-size: .61rem; font-weight: 500; }

.mpl-footer { border-top: 1px solid #1b2538; background: #070a12; padding: 30px 22px 20px; }
.mpl-footer-inner { width: min(var(--mpl-max),100%); margin: auto; display: grid; grid-template-columns: 1.25fr repeat(3,1fr) 1.35fr; gap: 24px; }
.mpl-footer-brand { display: inline-flex; align-items: center; height: 34px; }
.mpl-footer-brand img { width: 145px; height: 32px; object-fit: contain; object-position: left center; }
.mpl-footer h3 { margin: 0 0 7px; font-size: .88rem; }
.mpl-footer p, .mpl-footer a { color: var(--mpl-muted); font-size: .74rem; line-height: 1.65; }
.mpl-footer a { display: block; text-decoration: none; }
.mpl-footer a:hover { color: #fff; }
.mpl-footer form { display: flex; gap: 5px; }
.mpl-footer input { min-width: 0; width: 100%; border: 1px solid #253047; background: #0d1422; color: #fff; border-radius: 7px; padding: 7px; font-size: .7rem; }
.mpl-footer-bottom { width: min(var(--mpl-max),100%); margin: 18px auto 0; padding-top: 14px; border-top: 1px solid #1b2538; color: #64748B; font-size: .66rem; text-align: center; }

.mpl-drawer { position: fixed; inset: 66px auto 0 0; width: 270px; z-index: 120; overflow-y: auto; background: #0d1422; border-right: 1px solid #253047; transform: translateX(-102%); transition: transform .2s ease; padding: 16px; }
.mpl-drawer.open { transform: none; }
.mpl-drawer-title { margin: 0 8px 12px; color: #fff; font-size: .78rem; font-weight: 800; }
.mpl-drawer nav { display: grid; gap: 3px; }
.mpl-drawer a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #94A3B8; text-decoration: none; font-size: .76rem; }
.mpl-drawer a i { width: 18px; text-align: center; color: #60A5FA; }
.mpl-drawer a:hover { background: #111a2a; color: #fff; }
.mpl-nav-label { margin: 14px 8px 5px; color: #64748B; font-size: .6rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.mpl-drawer-note { margin-top: 18px; display: flex; gap: 10px; padding: 13px; background: linear-gradient(145deg,rgba(37,99,235,.14),rgba(6,182,212,.07)); border: 1px solid #263653; border-radius: 10px; }
.mpl-drawer-note > i { color: var(--mpl-cyan); margin-top: 2px; }
.mpl-drawer-note strong { font-size: .72rem; }
.mpl-drawer-note p { margin: 4px 0 0; color: var(--mpl-muted); font-size: .64rem; line-height: 1.45; }
.mpl-scrim { position: fixed; inset: 66px 0 0; z-index: 110; background: rgba(0,0,0,.58); }
.mpl-hidden { display: none !important; }

@media (max-width: 1050px) {
  .mpl-layout { grid-template-columns: 1fr; }
  .mpl-sidebar { display: none; }
  .mpl-details { grid-template-columns: 1fr 1fr; }
  .mpl-footer-inner { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 700px) {
  .mpl-header { height: 58px; padding: 0 9px; gap: 7px; }
  .mpl-brand { min-width: 0; width: 150px; }
  .mpl-brand img { width: 140px; height: 36px; }
  .mpl-search { display: none; }
  .mpl-actions .mpl-action:not(.mpl-login) { display: none; }
  .mpl-layout { padding: 9px 9px 26px; }
  .mpl-game-root, .mpl-game-root > .mpl-game-page { min-height: 500px !important; }
  .mpl-game-root > .mpl-game-page main { padding-left: 10px !important; padding-right: 10px !important; }
  .mpl-details { grid-template-columns: 1fr; }
  .mpl-footer-inner { grid-template-columns: 1fr; }
  .mpl-ad { min-height: 64px; }
  .mpl-footer form { max-width: 360px; }
}
