/* MoneyGames — shared styles for the redesigned Home / Login / Register pages */
:root{
  --bg:#140000; --bg2:#1f0000; --panel:#3a0b09; --panel2:#461918; --line:#4a1210; --bar:#2b0605;
  --text:#ffffff; --muted:#c9a9a4; --muted2:#b69090; --gold:#F5B400; --gold2:#FFD24D; --green:#2FBF62;
  --pink:#FF3374; --orange1:#FF8A2A; --orange2:#F0620F; --red1:#FF5A5F; --red2:#E0303A;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html,body{margin:0;padding:0}
body{background:#0d0000;color:var(--text);font-family:Poppins,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;font-size:14px;line-height:1.4}
a{color:var(--gold);text-decoration:none}
button{font-family:inherit;cursor:pointer}
img{max-width:100%}
.mg-app{max-width:430px;min-height:100vh;margin:0 auto;position:relative;background:radial-gradient(130% 420px at 50% 0%,#4b0004 0%,#1f0000 70%,#140000 100%) #140000;padding-bottom:88px;overflow-x:hidden}
.mg-app.auth{background:#260504;padding-bottom:28px}

/* header */
.mg-head{position:sticky;top:0;z-index:40;height:56px;padding:0 14px;display:flex;align-items:center;justify-content:space-between;background:var(--bar);border-bottom:1px solid var(--line)}
.mg-logo{height:30px;width:auto;display:block}
.mg-icobtn{width:42px;height:42px;border:0;border-radius:12px;background:#3d0c0a;color:#E9C9C5;display:inline-flex;align-items:center;justify-content:center;padding:0}
.mg-head .r{display:flex;gap:6px}
.mg-wrap{padding:14px 14px 0;display:flex;flex-direction:column;gap:14px}

/* buttons */
.mg-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.mg-btn{height:46px;border:0;border-radius:12px;color:#fff;font-weight:600;font-size:16px;display:flex;align-items:center;justify-content:center;gap:6px}
.mg-btn.orange{background:linear-gradient(180deg,var(--orange1),var(--orange2))}
.mg-btn.red{background:linear-gradient(180deg,var(--red1),var(--red2))}
.mg-btn.gold{background:linear-gradient(180deg,var(--gold2),var(--gold));color:#3a0b09}

/* balance card (logged in) */
.mg-bal{border-radius:14px;background:linear-gradient(120deg,#5a0e0b,#3a0907);border:1px solid #5c1714;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.mg-bal .l{display:flex;flex-direction:column;gap:2px;min-width:0}
.mg-bal .k{font-size:12px;color:var(--muted)}
.mg-bal .v{font-size:22px;font-weight:700;color:var(--gold2);white-space:nowrap}
.mg-bal .acts{display:flex;gap:8px}
.mg-bal .acts a{height:38px;padding:0 14px;border-radius:19px;font-weight:600;font-size:13px;display:flex;align-items:center}
.mg-bal .dep{background:linear-gradient(180deg,var(--orange1),var(--orange2));color:#fff}
.mg-bal .wd{border:1px solid var(--gold);color:var(--gold)}

/* notice */
.mg-notice{height:40px;border-radius:20px;background:var(--panel);display:flex;align-items:center;gap:10px;padding:0 5px 0 14px;overflow:hidden}
.mg-notice .track{flex:1;overflow:hidden;white-space:nowrap;font-size:12px;color:#E9C9C5;mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}
.mg-notice .track span{display:inline-block;padding-left:100%;animation:mgMarq 16s linear infinite}
@keyframes mgMarq{to{transform:translateX(-100%)}}
.mg-notice button{flex:none;height:30px;padding:0 14px;border:0;border-radius:15px;background:linear-gradient(90deg,#E8175D,#B0123F);color:#fff;font-weight:600;font-size:12px}

/* banner slider */
.mg-slider{position:relative;border-radius:14px;overflow:hidden;aspect-ratio:702/320;background:var(--panel)}
.mg-slides{display:flex;height:100%;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
.mg-slides::-webkit-scrollbar{display:none}
.mg-slides a{flex:0 0 100%;scroll-snap-align:start;height:100%}
.mg-slides img{width:100%;height:100%;object-fit:cover;display:block}
.mg-dots{position:absolute;left:50%;bottom:8px;transform:translateX(-50%);display:flex;gap:5px}
.mg-dots i{width:6px;height:5px;border-radius:3px;background:rgba(255,255,255,.5);transition:width .2s}
.mg-dots i.on{width:16px;background:var(--gold)}
.mg-tiles a img{width:100%;height:auto;display:block;border-radius:10px}

/* category tabs */
.mg-tabs{position:sticky;top:56px;z-index:30;margin-top:14px;padding:9px 14px;display:flex;gap:8px;align-items:center;background:#260303;border-top:1px solid var(--line);border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.mg-tabs::-webkit-scrollbar{display:none}
.mg-tab{flex:none;height:40px;padding:0 8px;border:0;border-radius:10px;background:transparent;color:var(--muted);font-weight:500;font-size:13px;display:flex;align-items:center;gap:6px}
.mg-tab img{height:28px;width:auto;display:block}
.mg-tab.on{background:linear-gradient(180deg,#A8173F,#6b0d27);color:#fff;font-weight:600}

/* sections */
.mg-sec{display:flex;flex-direction:column;gap:12px;scroll-margin-top:120px}
.mg-sec .h{display:flex;align-items:center;justify-content:space-between}
.mg-sec .h img{height:30px;width:auto;display:block}
.mg-more{font-size:12px;color:var(--pink);display:flex;align-items:center;gap:4px}
.mg-grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.mg-grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.mg-card{display:flex;flex-direction:column;gap:3px;color:#fff;background:none;border:0;padding:0;text-align:left}
.mg-card img{width:100%;height:auto;display:block;object-fit:cover;background:var(--panel)}
.mg-card .lot{aspect-ratio:222/300;border-radius:10px}
.mg-card .sq{aspect-ratio:220/297;border-radius:12px}
.mg-card .s{font-size:10px;color:var(--muted2)}
.mg-card .n{font-size:12px;font-weight:700;line-height:1.2}
.mg-card:active img{transform:scale(.97)}

/* winners */
.mg-wins{display:flex;flex-direction:column;gap:8px}
.mg-win{height:58px;border-radius:12px;background:var(--panel);display:flex;align-items:center;gap:12px;padding:0 12px}
.mg-win img{width:42px;height:42px;border-radius:8px;object-fit:cover;flex:none}
.mg-win .m{flex:1;min-width:0;display:flex;flex-direction:column}
.mg-win .m b{font-size:13px;font-weight:600}
.mg-win .m span{font-size:11px;color:var(--muted2)}
.mg-win .a{font-size:14px;font-weight:700;color:var(--gold)}
.mg-podium{position:relative;height:150px}
.mg-podium>img{position:absolute;left:50%;bottom:0;transform:translateX(-50%);width:300px;height:auto}
.mg-podium .cols{position:absolute;left:0;right:0;top:0;display:grid;grid-template-columns:repeat(3,1fr);text-align:center}
.mg-podium .cols div{display:flex;flex-direction:column;gap:2px;font-size:12px;font-weight:600}
.mg-podium .cols span{color:var(--pink);font-weight:500}
.mg-rank{height:38px;border-radius:8px;background:#4E0814;display:flex;align-items:center;padding:0 16px;gap:14px;font-size:13px}
.mg-rank .p{width:22px;color:var(--muted2);font-size:15px}
.mg-rank .nm{flex:1;font-weight:600}
.mg-rank .am{font-size:12px;color:var(--pink)}
.mg-badge-title{height:52px;align-self:center;display:block}

/* footer */
.mg-pay{display:flex;flex-direction:column;align-items:center;gap:10px;padding-bottom:6px;text-align:center}
.mg-pay h2{margin:0;font-size:18px;font-weight:700;line-height:1.25}
.mg-pay .soc{display:flex;gap:14px}
.mg-pay .soc img{width:34px;height:34px;display:block}
.mg-pay small{font-size:11px;color:#A98581}

/* floating */
.mg-float{position:fixed;z-index:35;right:max(8px,calc(50% - 215px + 8px));top:46%;display:flex;flex-direction:column;gap:10px}
.mg-float a img{width:46px;height:46px;display:block;filter:drop-shadow(0 4px 8px rgba(0,0,0,.45))}

/* bottom nav */
.mg-nav{position:fixed;z-index:45;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:430px;height:70px;background:linear-gradient(180deg,#3b0505,#240202);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);align-items:center;padding-bottom:env(safe-area-inset-bottom)}
.mg-nav a{display:flex;flex-direction:column;align-items:center;gap:4px;color:#E9C9C5;font-size:11px}
.mg-nav a.on{color:#fff;font-weight:600;gap:2px}
.mg-nav .home{width:50px;height:50px;margin-top:-26px;border-radius:50%;background:linear-gradient(180deg,var(--gold2),var(--gold));border:4px solid #2b0605;display:flex;align-items:center;justify-content:center;color:#3a0b09}

/* modal + loading */
.mg-ov{position:fixed;inset:0;z-index:90;background:rgba(0,0,0,.65);display:none;align-items:center;justify-content:center;padding:20px}
.mg-ov.on{display:flex}
.mg-modal{width:100%;max-width:360px;background:#2b0605;border:1px solid #5c1714;border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:14px}
.mg-modal h3{margin:0;font-size:17px}
.mg-modal p{margin:0;font-size:13px;color:#E9C9C5;white-space:pre-line}
.mg-spin{width:44px;height:44px;border-radius:50%;border:4px solid rgba(255,255,255,.2);border-top-color:var(--gold);animation:mgSpin 1s linear infinite}
@keyframes mgSpin{to{transform:rotate(360deg)}}
.mg-toast{position:fixed;z-index:100;left:50%;top:40%;transform:translate(-50%,-50%);max-width:300px;background:rgba(0,0,0,.85);color:#fff;font-size:14px;padding:12px 18px;border-radius:10px;text-align:center;display:none}
.mg-toast.on{display:block}

/* auth pages */
.mg-authtop{background:linear-gradient(180deg,#5a0e0b 0%,#3a0907 100%);padding:0 16px 22px}
.mg-authbar{height:56px;display:flex;align-items:center;justify-content:space-between}
.mg-authbar .back{width:44px;height:44px;display:flex;align-items:center;color:#fff}
.mg-authtop h1{margin:8px 0 6px;font-size:24px;font-weight:700}
.mg-authtop p{margin:0;font-size:12px;line-height:1.5;color:#E9C9C5}
.mg-form{padding:0 16px;display:flex;flex-direction:column;gap:18px}
.mg-ftab{height:54px;display:flex;align-items:flex-end;border-bottom:1px solid var(--line)}
.mg-ftab div{flex:1;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;border-bottom:2px solid var(--gold);color:var(--gold);font-weight:600;font-size:14px;padding-bottom:8px}
.mg-field{display:flex;flex-direction:column;gap:8px}
.mg-field label{font-size:14px;font-weight:500;display:flex;align-items:center;gap:8px}
.mg-in{height:48px;border:0;border-radius:12px;background:var(--panel2);color:#fff;font-family:inherit;font-size:15px;padding:0 14px;width:100%;outline:none}
.mg-in::placeholder{color:#A98581}
.mg-in:focus{box-shadow:0 0 0 2px rgba(245,180,0,.55)}
.mg-row{display:flex;gap:8px}
.mg-cc{width:78px;flex:none;height:48px;border-radius:12px;background:var(--panel2);display:flex;align-items:center;justify-content:center;font-size:15px;color:#E9C9C5}
.mg-pw{position:relative}
.mg-pw .mg-in{padding-right:48px}
.mg-eye{position:absolute;right:2px;top:2px;width:44px;height:44px;border:0;background:transparent;color:var(--muted);display:flex;align-items:center;justify-content:center}
.mg-sendbtn{width:110px;flex:none;height:48px;border:0;border-radius:12px;background:linear-gradient(180deg,var(--gold2),var(--gold));color:#3a0b09;font-weight:700;font-size:14px}
.mg-sendbtn:disabled{opacity:.55}
.mg-hint{font-size:12px;color:#A98581}
.mg-check{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted)}
.mg-check input{width:18px;height:18px;accent-color:var(--gold);margin:0}
.mg-pill{height:50px;border:0;border-radius:25px;font-weight:700;font-size:17px;letter-spacing:.4px;display:flex;align-items:center;justify-content:center;width:100%}
.mg-pill.solid{background:linear-gradient(180deg,var(--orange1),var(--orange2));color:#fff}
.mg-pill.line{border:1px solid var(--gold);color:var(--gold);background:transparent}
.mg-pill:disabled{opacity:.6}
.mg-support{margin-top:10px;display:flex;justify-content:center}
.mg-support a{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--muted);font-size:12px}
.mg-support img{width:44px;height:44px}
/* keep browser-autofilled fields dark */
.mg-in:-webkit-autofill,.mg-in:-webkit-autofill:hover,.mg-in:-webkit-autofill:focus{-webkit-text-fill-color:#fff;-webkit-box-shadow:0 0 0 1000px var(--panel2) inset;caret-color:#fff;transition:background-color 9999s}

/* ===== v6: closer match to the RajaGames logged-in home ===== */
.mg-head .mg-icobtn{background:transparent;width:40px}
.mg-head .mg-icobtn.mail{color:#d9b6b2}
.mg-notice{background:rgba(97,97,97,.31);border-radius:20px}
.mg-hscroll{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:none;margin:0 -14px;padding:0 14px}
.mg-hscroll::-webkit-scrollbar{display:none}
.mg-hscroll>*{flex:0 0 31%;scroll-snap-align:start}
.mg-card .lbl{font-family:"Times New Roman",Georgia,serif;font-size:11px;color:#e9dcdc}
.mg-card .nm{font-family:"Times New Roman",Georgia,serif;font-size:13px;font-weight:700;color:#fff;margin-top:-2px}
.mg-card .lot{border-radius:12px}
.mg-card .sq{border-radius:12px}
.mg-more b{font-size:15px;line-height:1;letter-spacing:-2px}
.mg-ribbon{align-self:center;display:block;height:auto}
.mg-jack-txt{text-align:center;font-size:12px;color:#fff;margin:-4px 0 2px}
.mg-jack{position:relative;color:#fff;display:flex;flex-direction:column;align-items:center;gap:2px}
.mg-jack img{width:100%;aspect-ratio:222/300;object-fit:cover;border-radius:12px;display:block}
.mg-jack .x{position:absolute;left:0;top:0;background:#8a3ff0;color:#fff;font-weight:700;font-size:12px;padding:2px 8px;border-radius:12px 0 10px 0}
.mg-jack .g{font-size:12px;margin-top:4px}
.mg-jack .a{font-size:14px;font-weight:700}
.mg-win{height:auto;min-height:64px;padding:8px 12px;background:#3d100f;border-radius:6px;align-items:center}
.mg-win img{width:34px;height:46px;border-radius:4px}
.mg-win .m{gap:2px}
.mg-win .m b{font-size:12px;font-weight:600}
.mg-win .m span{font-size:11px;color:#bba3a1}
.mg-win .m em{font-style:normal;font-size:12px;color:#bba3a1}
.mg-cribbon{align-self:center;min-width:250px;padding:10px 26px 22px;text-align:center;font-weight:800;font-size:17px;letter-spacing:1px;line-height:1.15;color:#fff;background:linear-gradient(180deg,#e8174d,#8b0b2e);clip-path:polygon(0 0,100% 0,100% 72%,50% 100%,0 72%);font-family:"Arial Black",Poppins,sans-serif}
.mg-podium2{position:relative;margin:6px auto 0;width:100%;max-width:340px;aspect-ratio:720/369}
.mg-podium2>img{position:absolute;inset:0;width:100%;height:100%}
.mg-podium2 .av{position:absolute;border-radius:50%;object-fit:cover;border:3px solid rgba(255,255,255,.85);background:#2b0605}
.mg-podium2 .av.p1{width:24%;left:38%;top:-6%}
.mg-podium2 .av.p2{width:16%;left:79%;top:22%}
.mg-podium2 .av.p3{width:16%;left:5%;top:22%}
.mg-podium2 .who{position:absolute;bottom:4%;width:30%;text-align:center;font-family:"Times New Roman",Georgia,serif;font-size:11px;line-height:1.25}
.mg-podium2 .who b{display:block;font-weight:400;color:#fff}
.mg-podium2 .who span{color:#2FBF62}
.mg-podium2 .who.p1{left:35%;font-size:12px}
.mg-podium2 .who.p2{left:70%}
.mg-podium2 .who.p3{left:0}
.mg-rank{height:40px;background:#55101b;border-radius:6px}
.mg-rank img{width:26px;height:26px;border-radius:50%;object-fit:cover}
.mg-follow{display:flex;justify-content:space-around;width:100%;max-width:330px}
.mg-follow img{width:40px;height:40px;display:block}
.mg-a2d{position:fixed;z-index:44;left:50%;transform:translateX(-50%);bottom:82px;height:44px;padding:0 22px 0 8px;border:0;border-radius:22px;background:linear-gradient(180deg,#FFD24D,#F5A400);color:#fff;font-weight:600;font-size:14px;display:flex;align-items:center;gap:10px;box-shadow:0 6px 16px rgba(0,0,0,.4);text-shadow:0 1px 1px rgba(120,60,0,.4)}
.mg-a2d img{width:30px;height:30px;border-radius:8px}
.mg-nav{height:74px;background:radial-gradient(130.56% 123.83% at 50% -23.83%,#4b0004,#140000);border-top:0}
.mg-nav a{color:#fff;font-size:12px;gap:3px}
.mg-nav a img{width:34px;height:34px;display:block}
.mg-nav a.on{font-weight:600}
.mg-pop{background:#3a0b09;border:0;padding:0;overflow:hidden;gap:0}
.mg-pop .t{background:linear-gradient(90deg,#FFD24D,#F5A400);color:#fff;text-align:center;font-weight:700;font-size:17px;padding:12px}
.mg-pop .b{padding:16px 18px;display:flex;flex-direction:column;gap:12px;max-height:55vh;overflow:auto}
.mg-pop .b p{font-size:13px;color:#fff;text-align:center}
.mg-pop .f{padding:12px 18px 18px;display:flex;flex-direction:column;gap:10px}
.mg-pop .f .mg-btn{border-radius:23px}
.mg-hscroll{scroll-padding-left:14px;scroll-padding-right:14px}
.mg-float{right:max(8px,calc(50% - 215px - 70px))}
@media (min-width:600px){.mg-float a img{width:56px;height:56px}}
