*{box-sizing:border-box}
:root{
 --bg:#edf3fb;--card:#fff;--text:#13213c;--muted:#71809a;--line:#e2e9f3;
 --navy:#071a3a;--navy2:#102b58;--blue:#2875f5;
 --mega:#e51d3d;--power:#e3a600;--lotto:#087bea;
 --result:#10a875;--special:#f3a313;--jp2:#8154db;
 --shadow:0 10px 26px rgba(29,52,91,.10)
}
html,body{min-height:100%;margin:0}
body{background:linear-gradient(180deg,#eaf1fa 0,#f8fbff 48%,#edf3fb 100%);color:var(--text);font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
.app{width:100%;max-width:760px;min-height:100vh;margin:auto;overflow:hidden}
.header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 18px 13px;background:linear-gradient(135deg,#06162f 0,#0b2450 58%,#123a79 100%);color:#fff}
.brand{display:flex;align-items:flex-start;gap:12px;min-width:0}
.brand-mark{position:relative;width:47px;height:47px;flex:0 0 47px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(from 215deg,#12d6ff,#315cff,#9b36e8,#12d6ff);box-shadow:0 5px 18px rgba(31,137,255,.35);overflow:hidden}
.brand-mark:before{content:"";position:absolute;width:27px;height:27px;border:7px solid rgba(255,255,255,.92);border-right-color:transparent;border-bottom-color:transparent;border-radius:50%;transform:rotate(-35deg)}
.brand-mark:after{content:"";position:absolute;width:8px;height:8px;border-radius:50%;background:#fff;box-shadow:13px 8px 0 rgba(255,255,255,.65)}
.brand>div{min-width:0;flex:1}
.header h1{margin:0;font-size:21px;line-height:1;font-weight:950;letter-spacing:.7px}
.brand-white{color:#fff}.brand-purple{background:linear-gradient(90deg,#a43cff,#4d8dff);-webkit-background-clip:text;background-clip:text;color:transparent}
.subtitle{margin-top:6px;color:#d1d9e8;font-size:11px;font-weight:650}
.header-meta{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;gap:3px;min-width:155px;padding-top:0}
.clock{font-size:21px;line-height:1;font-weight:950;color:#fff;letter-spacing:.7px;font-variant-numeric:tabular-nums;text-shadow:0 2px 10px rgba(70,150,255,.20)}
.next-countdown{max-width:205px;color:#b9c9df;font-size:8.5px;line-height:1.15;font-weight:750;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.online{white-space:nowrap;color:#5af06b;font-size:8.5px;font-weight:900;margin-top:1px}
.online span{display:inline-block;width:8px;height:8px;margin-right:4px;border-radius:50%;background:#49ee61;box-shadow:0 0 12px #49ee61}
.next-countdown.waiting{color:#ffd166}
.tabs{display:flex;padding:8px 18px;background:#0d2852;gap:8px}
.tab{flex:1;border:0;padding:13px 10px;border-radius:17px;background:#263b60;color:#c2cad8;font-size:14px;font-weight:900}
.tab.active{color:#fff;background:linear-gradient(135deg,#1761ee,#4b9cff);box-shadow:0 7px 18px rgba(34,111,245,.34)}
main{padding:14px 14px 7px}.tab-content{display:none}.tab-content.active{display:block}
.summary{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:12px 10px;margin-bottom:14px;border-radius:19px;background:linear-gradient(135deg,#172c4e,#253e63);box-shadow:0 8px 22px rgba(31,53,88,.15)}
.summary>div{position:relative;padding:5px 3px;text-align:center}.summary strong{display:block;color:#fff;font-size:23px;font-weight:950}.summary span{display:block;margin-top:3px;color:#c4d0e1;font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.25px}
.game-card{position:relative;margin-bottom:14px;padding:18px 17px 15px;border:1px solid rgba(217,226,239,.95);border-radius:23px;background:#fff;box-shadow:var(--shadow);overflow:hidden}
.game-card.mega{background:linear-gradient(145deg,#fff 0,#fff4f6 100%)}.game-card.power{background:linear-gradient(145deg,#fff 0,#fff9ed 100%)}.game-card.lotto{background:linear-gradient(145deg,#fff 0,#f0faff 100%)}
.game-card:after{content:"";position:absolute;width:170px;height:170px;right:-65px;top:-75px;border-radius:50%;opacity:.13}.game-card.mega:after{background:#ff4f70}.game-card.power:after{background:#ffd43e}.game-card.lotto:after{background:#35a8ff}
.card-head,.history-head{display:flex;justify-content:space-between;align-items:center;gap:10px;position:relative;z-index:1}.card-brand{display:flex;align-items:center;gap:11px;min-width:0}
.game-name{font-size:19px;font-weight:950}.draw-info{margin-top:5px;color:#687790;font-size:11px}.draw-pill{padding:7px 10px;border-radius:10px;font-size:11px;font-weight:950;background:#eaf2ff;color:#185fce}.game-card.power .draw-pill{background:#fff2ce;color:#a36d00}.game-card.lotto .draw-pill{background:#e2f2ff;color:#1767c7}
.game-badge{position:relative;width:64px;height:64px;flex:0 0 64px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;line-height:1;box-shadow:inset 0 2px 5px rgba(255,255,255,.55),0 8px 17px rgba(30,50,80,.20);border:2px solid rgba(255,255,255,.82);overflow:hidden}
.game-badge:before{content:"";position:absolute;inset:-7px;border-radius:50%;opacity:.28;filter:blur(5px)}
.game-badge:after{content:"";position:absolute;inset:4px;border:1px solid rgba(255,255,255,.36);border-radius:50%}
.game-badge .logo-orbit{position:absolute;top:8px;width:25px;height:7px;border:2px solid rgba(255,255,255,.85);border-left-color:transparent;border-right-color:transparent;border-radius:50%;transform:rotate(-18deg);opacity:.8}
.game-badge .logo-name{position:relative;z-index:2;font-size:14px;font-weight:950;text-shadow:0 1px 2px rgba(0,0,0,.28)}
.game-badge .logo-range{position:relative;z-index:2;font-size:8px;font-weight:950;margin-top:3px;letter-spacing:.2px}
.game-badge.mega{background:radial-gradient(circle at 35% 22%,#ff7489,#e8173d 58%,#9d0b2a)}
.game-badge.mega:before{background:#ff2c56}
.game-badge.power{background:radial-gradient(circle at 35% 22%,#ffe66f,#efb20d 56%,#884800)}
.game-badge.power:before{background:#ffc91f}
.game-badge.lotto{background:radial-gradient(circle at 35% 22%,#59d2ff,#138df2 56%,#0052b8)}
.game-badge.lotto:before{background:#00aaff}
.section-label{margin-top:18px;color:#687791;font-size:10px;font-weight:950;letter-spacing:.55px}.numbers{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-top:10px;position:relative;z-index:1}
.ball{width:43px;height:43px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;font-size:14px;font-weight:950;box-shadow:inset 0 2px 3px rgba(255,255,255,.3),0 6px 13px rgba(31,52,84,.18)}
.numbers.mega .ball.prediction{background:linear-gradient(145deg,#ff566f,#df1237)}.numbers.power .ball.prediction{background:linear-gradient(145deg,#ffd952,#e0a000)}.numbers.lotto .ball.prediction{background:linear-gradient(145deg,#32aaff,#0870df)}
.ball.prediction.special{background:linear-gradient(145deg,#55d982,#159b55)!important}.ball.prediction.special.matched{background:linear-gradient(145deg,#ffbf4d,#e28a00)!important;box-shadow:0 0 0 3px rgba(226,138,0,.18),0 7px 15px rgba(226,138,0,.28)}
.ball.result-ball{background:linear-gradient(145deg,#d9f3ed,#a8ddd2);color:#315d56}.ball.result-ball.special{background:linear-gradient(145deg,#ffbf4d,#e28a00)!important;color:#fff}.ball.jp2{background:linear-gradient(145deg,#b28aff,#7744d2)}
.ball.result-ball.matched,.ball.matched{background:linear-gradient(145deg,#57d9ad,#079967)!important;color:#fff;box-shadow:0 0 0 3px rgba(22,173,114,.18),0 7px 15px rgba(22,173,114,.28)}
.ball.result-ball.special.matched,.ball.prediction.special.matched{background:linear-gradient(145deg,#ffbf4d,#e28a00)!important;color:#fff;box-shadow:0 0 0 3px rgba(226,138,0,.18),0 7px 15px rgba(226,138,0,.28)}
.separator{color:#a2adbf;font-weight:950;font-size:18px;margin:0 1px}
.history-tools{display:grid;grid-template-columns:1.25fr 1fr;gap:9px;margin-bottom:9px}.history-tools select{min-width:0}
select{width:100%;padding:12px 13px;border:1px solid #dfe7f2;border-radius:14px;background:rgba(255,255,255,.96);color:var(--text);font-size:12px;font-weight:850;box-shadow:0 4px 12px rgba(35,55,90,.06);outline:none}
.history-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:3px 0 6px}.history-stats>div{padding:11px 5px;text-align:center;border:1px solid #dfe7f1;border-radius:14px;background:rgba(255,255,255,.82);box-shadow:0 5px 13px rgba(35,55,90,.05)}.history-stats strong{display:block;color:#182540;font-size:17px;font-weight:950}.history-stats small{font-size:10px;color:#71809a}.history-stats span{display:block;margin-top:4px;color:#7b879d;font-size:9px;font-weight:850}
.history-count{padding:5px 4px 9px;color:#7b879d;font-size:10px;font-weight:850}
.history-card{position:relative;margin-bottom:12px;padding:15px 15px 14px;border:1px solid #dfe7f1;border-radius:22px;background:#fff;box-shadow:var(--shadow);overflow:hidden}.history-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px}.history-card.mega:before{background:var(--mega)}.history-card.power:before{background:var(--power)}.history-card.lotto:before{background:var(--lotto)}
.history-title{font-size:15px;font-weight:950}.history-draw{color:#71809a;font-size:12px;font-weight:850;margin-left:3px}.hit-badge{padding:7px 9px;border-radius:11px;background:#eef3f9;color:#71809a;font-size:9px;font-weight:950;white-space:nowrap}.hit-badge.prize{background:#e4f8ee;color:#087b55}.hit-badge.no-prize{background:#f2f4f7;color:#7d899b}
.history-prediction .ball,.history-card .result .ball{width:36px;height:36px;font-size:12px}.history-prediction .ball.prediction{box-shadow:inset 0 1px 2px rgba(255,255,255,.3),0 4px 9px rgba(30,50,80,.14)}
.history-prediction.mega .ball.prediction{background:linear-gradient(145deg,#ff566f,#df1237)}.history-prediction.power .ball.prediction{background:linear-gradient(145deg,#ffd952,#e0a000)}.history-prediction.lotto .ball.prediction{background:linear-gradient(145deg,#32aaff,#0870df)}.history-prediction .ball.prediction.special{background:linear-gradient(145deg,#55d982,#159b55)!important}.history-prediction .ball.prediction.special.matched{background:linear-gradient(145deg,#ffbf4d,#e28a00)!important;box-shadow:0 0 0 3px rgba(226,138,0,.18),0 6px 14px rgba(226,138,0,.28)}
.result-label{margin-top:16px}.jp2-row{display:flex;align-items:center;gap:9px;margin-top:10px;color:var(--jp2);font-size:10px;font-weight:950}.jp2-row .ball{width:34px;height:34px;font-size:11px}
.evaluation{margin-top:12px;padding-top:10px;border-top:1px solid var(--line);font-size:11px;font-weight:950;color:#087c55}.prize-result{margin-top:8px;padding:10px 11px;border-radius:12px;font-size:11px;font-weight:950}.prize-result.won{background:#e7f9ef;color:#087c55}.prize-result.lost{background:#f4f5f8;color:#7f8a9c}.check{display:inline-grid;place-items:center;width:18px;height:18px;margin-right:5px;border-radius:50%;background:#e3f7ef}.special-ok{color:#087c55}.muted{color:#7f8a9c;font-weight:850}
.empty-state,.loading{padding:30px 8px;text-align:center;color:var(--muted);font-size:12px}footer{padding:18px;text-align:center;color:#8995a8;font-size:10px}
@media(max-width:480px){.header{padding:15px 13px 12px;gap:8px}.brand{gap:9px}.brand-mark{width:42px;height:42px;flex-basis:42px}.header h1{font-size:18px;letter-spacing:.45px}.subtitle{font-size:9px;margin-top:5px}.header-meta{min-width:145px;gap:3px}.online{font-size:7.5px;margin-top:1px}.online span{width:7px;height:7px;margin-right:3px}.clock{font-size:19px}.next-countdown{max-width:145px;font-size:7.5px}main{padding:12px 11px 5px}.game-card{padding:17px 15px 14px;border-radius:21px}.summary{padding:10px}.summary strong{font-size:20px}.ball{width:41px;height:41px}.numbers{gap:7px}.history-prediction .ball,.history-card .result .ball{width:35px;height:35px}}
@media(max-width:360px){.online{display:block}.summary{gap:4px}.summary span{font-size:8px}.history-tools{grid-template-columns:1fr 1fr}.history-tools select{padding:11px 8px;font-size:11px}.history-stats{gap:5px}.history-stats>div{padding:9px 3px}.history-stats strong{font-size:14px}.numbers{gap:5px}.ball{width:38px;height:38px}.game-name{font-size:17px}.game-badge{width:54px;height:54px;flex-basis:54px}.game-badge .logo-name{font-size:12px}.game-badge .logo-range{font-size:7px}.card-brand{gap:8px}.draw-pill{padding:6px 7px}}