/* ==========================================================================
   MEGA888 Free Credit — shared stylesheet
   Brand palette pulled from the MEGA888 logo: electric blue -> gold/orange
   ========================================================================== */

:root{
  --bg-0:#060918;
  --bg-1:#0b1030;
  --bg-2:#121a4a;
  --panel:#141c42;
  --panel-border:rgba(255,255,255,.08);
  --blue-1:#20c7ff;
  --blue-2:#0a66ff;
  --gold-1:#ffd23f;
  --gold-2:#ff7a00;
  --text:#eef1ff;
  --text-muted:#9aa4d6;
  --success:#28e07e;
  --radius:14px;
  --radius-lg:22px;
  --shadow:0 10px 30px rgba(0,0,0,.45);
  --maxw:1180px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:
    radial-gradient(1100px 600px at 15% -10%, rgba(32,199,255,.18), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(255,122,0,.16), transparent 55%),
    linear-gradient(180deg,var(--bg-0),var(--bg-1) 40%,var(--bg-0));
  color:var(--text);
  font-family:"Segoe UI",system-ui,-apple-system,"Noto Sans",Arial,sans-serif;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4{font-family:inherit;line-height:1.25;margin:0 0 .5em}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 20px}
.gold-text{background:linear-gradient(90deg,var(--gold-1),var(--gold-2));-webkit-background-clip:text;background-clip:text;color:transparent}
.blue-text{background:linear-gradient(90deg,var(--blue-1),var(--blue-2));-webkit-background-clip:text;background-clip:text;color:transparent}
.section{padding:56px 0}
.section-tight{padding:30px 0}
.eyebrow{display:inline-block;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-1);font-weight:700;margin-bottom:10px}
.center{text-align:center}
.muted{color:var(--text-muted)}
.small{font-size:13px}

/* ---------- Top notice bar ---------- */
.notice-bar{
  background:linear-gradient(90deg,var(--gold-2),var(--gold-1));
  color:#1a1100;
  font-weight:700;
  font-size:13px;
  text-align:center;
  padding:7px 14px;
}
.notice-bar a{text-decoration:underline}

/* ---------- Header ---------- */
header.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(7,10,28,.85);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--panel-border);
}
.header-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:22px;letter-spacing:.5px}
.brand .mark{
  width:40px;height:40px;border-radius:10px;
  background:linear-gradient(135deg,var(--blue-1),var(--blue-2));
  display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:900;color:#06102b;
  box-shadow:0 0 18px rgba(32,199,255,.55);
}
.brand .num{background:linear-gradient(90deg,var(--gold-1),var(--gold-2));-webkit-background-clip:text;background-clip:text;color:transparent}
nav.main-nav{display:flex;align-items:center;gap:22px}
nav.main-nav a{font-size:14.5px;font-weight:600;color:var(--text-muted);padding:6px 2px;border-bottom:2px solid transparent;transition:.2s}
nav.main-nav a:hover,nav.main-nav a.active{color:#fff;border-color:var(--gold-1)}
.header-actions{display:flex;align-items:center;gap:10px}
.lang-switch{display:flex;gap:4px;background:var(--panel);border:1px solid var(--panel-border);border-radius:999px;padding:3px}
.lang-switch a{font-size:12px;font-weight:700;padding:5px 10px;border-radius:999px;color:var(--text-muted)}
.lang-switch a.active{background:linear-gradient(90deg,var(--blue-1),var(--blue-2));color:#041226}
.burger{display:none;background:none;border:0;color:#fff;font-size:22px;cursor:pointer}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:13px 26px;border-radius:999px;font-weight:800;font-size:15px;
  cursor:pointer;border:0;white-space:nowrap;transition:transform .15s ease, box-shadow .15s ease;
}
.btn-gold{
  background:linear-gradient(90deg,var(--gold-1),var(--gold-2));
  color:#241300;
  box-shadow:0 8px 24px rgba(255,122,0,.4);
}
.btn-gold:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(255,122,0,.55)}
.btn-blue{
  background:linear-gradient(90deg,var(--blue-1),var(--blue-2));
  color:#04122b;
  box-shadow:0 8px 24px rgba(10,102,255,.4);
}
.btn-blue:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(10,102,255,.55)}
.btn-outline{background:transparent;border:1.5px solid var(--panel-border);color:#fff}
.btn-outline:hover{border-color:var(--gold-1);color:var(--gold-1)}
.btn-block{width:100%}
.btn-lg{padding:16px 34px;font-size:17px}

/* Sticky mobile CTA */
.sticky-cta{
  position:fixed;left:0;right:0;bottom:0;z-index:60;
  display:none;padding:10px 14px;
  background:rgba(6,9,24,.92);backdrop-filter:blur(8px);
  border-top:1px solid var(--panel-border);
}

/* ---------- Hero ---------- */
.hero{position:relative;padding:60px 0 40px;overflow:hidden}
.hero-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:40px;align-items:center}
.hero h1{font-size:clamp(28px,4.4vw,46px);font-weight:900}
.hero p.lead{font-size:17px;color:var(--text-muted);max-width:54ch;margin-bottom:26px}
.hero-ctas{display:flex;gap:14px;flex-wrap:wrap;margin-bottom:22px}
.hero-stats{display:flex;gap:26px;flex-wrap:wrap;margin-top:28px}
.hero-stats div{min-width:110px}
.hero-stats b{display:block;font-size:22px;font-weight:900}
.hero-stats span{font-size:12.5px;color:var(--text-muted)}
.badge-row{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.badge{font-size:12px;font-weight:700;padding:6px 12px;border-radius:999px;background:var(--panel);border:1px solid var(--panel-border);color:var(--text-muted)}
.badge.live{color:var(--success);border-color:rgba(40,224,126,.35)}
.badge.live::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--success);margin-right:6px;box-shadow:0 0 8px var(--success)}

/* ---------- Placeholder image blocks ---------- */
.ph{
  position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 10px, rgba(255,255,255,.01) 10px 20px),
    linear-gradient(135deg,var(--bg-2),var(--panel));
  border:1.5px dashed rgba(255,255,255,.22);
  border-radius:var(--radius);
  color:var(--text-muted);
  font-size:12px;font-weight:700;letter-spacing:.04em;text-align:center;padding:10px;
}
.ph small{font-weight:500;opacity:.7;font-size:11px}
.ph-hero{aspect-ratio:4/3}
.ph-banner{aspect-ratio:16/5}
.ph-square{aspect-ratio:1/1}
.ph-wide{aspect-ratio:16/9}
.ph-logo{aspect-ratio:1/1;border-radius:50%}
.ph-tall{aspect-ratio:3/4}

/* ---------- Cards / grids ---------- */
.grid{display:grid;gap:22px}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}
.card{
  background:linear-gradient(180deg,var(--panel),var(--bg-2));
  border:1px solid var(--panel-border);
  border-radius:var(--radius-lg);
  padding:22px;
  box-shadow:var(--shadow);
}
.card h3{font-size:17px}
.card p{color:var(--text-muted);font-size:14.5px;margin:0}
.game-card{padding:0;overflow:hidden}
.game-card .ph{border-radius:var(--radius-lg) var(--radius-lg) 0 0;border-width:0 0 1.5px 0}
.game-card .meta{padding:14px 16px}
.game-card .tag{font-size:11px;color:var(--gold-1);font-weight:800;text-transform:uppercase;letter-spacing:.05em}

.step{display:flex;gap:16px;align-items:flex-start}
.step .num{
  flex:none;width:38px;height:38px;border-radius:50%;
  background:linear-gradient(135deg,var(--blue-1),var(--blue-2));
  color:#04122b;font-weight:900;display:flex;align-items:center;justify-content:center;
}

/* ---------- Forms (static / decorative — informational only, no data is transmitted) ---------- */
.form-panel{width:100%;max-width:440px;margin:0 auto;background:linear-gradient(180deg,var(--panel),var(--bg-2));border:1px solid var(--panel-border);border-radius:var(--radius-lg);padding:30px;box-shadow:var(--shadow);min-width:0}
.form-panel h2{text-align:center}
.field{margin-bottom:16px}
.field label{display:block;font-size:13px;font-weight:700;color:var(--text-muted);margin-bottom:6px}
.field input{
  width:100%;padding:12px 14px;border-radius:10px;border:1px solid var(--panel-border);
  background:rgba(255,255,255,.04);color:#fff;font-size:14px;
}
.field input::placeholder{color:#5c6499}
.form-note{font-size:12.5px;color:var(--text-muted);text-align:center;margin-top:14px}
.divider{display:flex;align-items:center;gap:12px;color:var(--text-muted);font-size:12px;margin:18px 0}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--panel-border)}

/* ---------- Table ---------- */
table.data-table{width:100%;border-collapse:collapse;overflow:hidden;border-radius:var(--radius);background:var(--panel);border:1px solid var(--panel-border)}
table.data-table th,table.data-table td{padding:14px 16px;text-align:left;font-size:14px;border-bottom:1px solid var(--panel-border)}
table.data-table th{color:var(--gold-1);font-size:12px;text-transform:uppercase;letter-spacing:.05em}
table.data-table tr:last-child td{border-bottom:0}

/* ---------- FAQ ---------- */
.faq-item{border-bottom:1px solid var(--panel-border)}
.faq-q{display:flex;justify-content:space-between;align-items:center;padding:18px 4px;cursor:pointer;font-weight:700}
.faq-q .plus{transition:.2s;color:var(--gold-1);font-size:20px}
.faq-item.open .plus{transform:rotate(45deg)}
.faq-a{max-height:0;overflow:hidden;transition:max-height .25s ease;color:var(--text-muted);font-size:14.5px}
.faq-item.open .faq-a{padding-bottom:16px}
.faq-a-inner{padding:0 4px}

/* ---------- CTA band ---------- */
.cta-band{
  border-radius:var(--radius-lg);
  padding:36px;
  background:linear-gradient(120deg,rgba(10,102,255,.22),rgba(255,122,0,.2));
  border:1px solid var(--panel-border);
  display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;
}
.cta-band h2{margin:0 0 6px}

/* ---------- Footer ---------- */
footer.site-footer{border-top:1px solid var(--panel-border);padding:40px 0 20px;margin-top:40px;background:var(--bg-0)}
.footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:28px}
.footer-grid h4{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--gold-1)}
.footer-grid a{display:block;font-size:13.5px;color:var(--text-muted);margin-bottom:9px}
.footer-grid a:hover{color:#fff}
.footer-bottom{margin-top:30px;padding-top:18px;border-top:1px solid var(--panel-border);display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px;font-size:12.5px;color:var(--text-muted)}
.disclaimer{font-size:12px;color:#6b7399;margin-top:14px;line-height:1.7}
.social-row{display:flex;gap:10px;margin-top:10px}
.social-row a{width:34px;height:34px;border-radius:50%;background:var(--panel);border:1px solid var(--panel-border);display:flex;align-items:center;justify-content:center;font-size:14px}

/* ---------- Breadcrumb / page header ---------- */
.page-head{padding:34px 0 10px}
.page-head h1{font-size:clamp(24px,3.4vw,34px)}
.crumbs{font-size:12.5px;color:var(--text-muted);margin-bottom:10px}
.crumbs a{color:var(--text-muted)}
.crumbs a:hover{color:var(--gold-1)}

/* ---------- Shrink-to-fit safety net ----------
   Grid/flex items default to min-width:auto, which stops them shrinking
   below their content's natural width — this bites hardest on longer
   MS/ZH strings. Force them to respect their track/container instead. */
.header-row>*, .main-nav>*, .header-actions>*, .hero-grid>*, .hero-ctas>*,
.hero-stats>*, .badge-row>*, .grid>*, .step>*, .divider>*, .cta-band>*,
.footer-grid>*, .footer-bottom>*, .social-row>*, .flex>* { min-width:0; }
h1,h2,h3,h4,p,.badge,.lead { overflow-wrap:break-word; word-break:break-word; }

/* ---------- Utilities ---------- */
.flex{display:flex}
.items-center{align-items:center}
.gap-10{gap:10px}
.gap-16{gap:16px}
.mt-10{margin-top:10px}
.mt-20{margin-top:20px}
.mt-30{margin-top:30px}
.mb-0{margin-bottom:0}

/* ---------- Responsive ---------- */
/* ---------- Responsive tables (don't let wide tables blow out the layout) ---------- */
.table-scroll{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:var(--radius)}
.table-scroll table.data-table{min-width:560px}

@media (max-width:980px){
  nav.main-nav{display:none}
  .burger{display:block}
  .header-actions .lang-switch{display:none}
  .header-actions > a.btn-gold{display:none}
  .header-row{padding:12px 16px}
  .hero-grid{grid-template-columns:1fr}
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:repeat(2,1fr)}
  .grid-2{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr}
  .sticky-cta{display:flex;gap:10px}
  body{padding-bottom:64px}
}
@media (max-width:560px){
  .wrap{padding:0 16px}
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  .cta-band{flex-direction:column;text-align:center;padding:26px 20px}
  .cta-band .btn{width:100%}
  .brand{font-size:19px}
  .brand .mark{width:34px;height:34px;font-size:15px}
  .hero{padding:40px 0 30px}
  .hero-ctas .btn,.hero-ctas{width:100%}
  .hero-ctas{flex-direction:column}
  .hero-stats{gap:16px 22px}
  .notice-bar{font-size:11.5px;padding:7px 10px;line-height:1.5}
  .form-panel{padding:22px 18px}
  .section{padding:40px 0}
}
@media (max-width:360px){
  .hero-stats div{min-width:44%}
  .badge{font-size:11px;padding:5px 10px}
}

/* ---------- Mobile nav drawer ---------- */
.mobile-nav{
  position:fixed;inset:0;z-index:70;background:rgba(5,7,20,.97);
  display:none;flex-direction:column;padding:20px;
}
.mobile-nav.open{display:flex}
.mobile-nav .close-btn{align-self:flex-end;background:none;border:0;color:#fff;font-size:26px}
.mobile-nav a{font-size:19px;font-weight:700;padding:14px 4px;border-bottom:1px solid var(--panel-border)}
.mobile-nav .lang-switch{margin-top:20px;align-self:flex-start}
