/* PowerPlay Offline Demo v2 (no deps) */
:root{
  --bg:#0b1020;
  --card:#121a33;
  --muted:#9aa7c7;
  --text:#eef2ff;
  --brand:#2f6bff;
  --brand2:#1f4fd6;
  --line:rgba(255,255,255,.10);
  --shadow:0 18px 40px rgba(0,0,0,.45);
  --r1:18px;
  --r2:26px;

  /* iPhone 13 logical points */
  --phone-w:390px;
  --phone-h:844px;
  --safe-top:44px;
  --safe-bot:34px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollable-container::-webkit-scrollbar {
  display: none;
}

/* For the entire page */
body::-webkit-scrollbar {
  display: none;
}

.scrollable-container {
  scrollbar-width: none; /* Firefox */
}

/* To ensure compatibility across different browsers, a combined approach is often best */
.scrollable-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge, Opera */
}
.scrollable-container {
  -ms-overflow-style: none; /* IE and Edge legacy */
  scrollbar-width: none; /* Firefox, newer Chrome/Edge */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 10% 0%, rgba(47,107,255,.22), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(51,209,122,.16), transparent 60%),
    var(--bg);
}

.app{
  min-height:100%;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding: 22px 14px;
}

.phone{
  width: min(var(--phone-w), 100%);
  height: min(var(--phone-h), calc(100vh - 44px));
  border-radius: 34px;
  overflow:hidden;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  position:relative;
}

@media (max-height: 900px){
  .phone{ height: calc(100vh - 44px); }
}

.screen{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
}

.topbar{
  height:56px;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 0 12px;
  border-bottom:1px solid var(--line);
  background: rgba(18,26,51,.78);
  position:sticky;
  top:0;
  z-index:10;
}

.topbar__title{flex:1; font-weight:800}
.topbar__actions{display:flex; gap:8px; align-items:center}

.icon-btn{
  width:40px;height:40px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  display:grid; place-items:center;
  cursor:pointer;
}

.content{
  flex:1;
  overflow:auto;
  padding: 16px;
  padding-top: 16px;
  padding-bottom: calc(16px + 72px + var(--safe-bot));
}

.card{
  background: rgba(18,26,51,.88);
  border:1px solid var(--line);
  border-radius: var(--r1);
  padding: 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
}
.card + .card{ margin-top: 12px; }

h1,h2,h3{margin:0 0 10px 0}
h1{font-size:24px}
h2{font-size:18px}
p{margin:0 0 10px 0; color:var(--muted); line-height:1.45}

.row{display:flex; gap:10px; align-items:center}
.row-between{display:flex; justify-content:space-between; align-items:center; gap:10px}
.muted{color:var(--muted)}
.small{font-size:13px}
.pill{
  display:inline-flex;
  padding: 6px 10px;
  border:1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-size: 12px;
}

.input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  outline:none;
}
.input::placeholder{color: rgba(238,242,255,.55)}

.btn{
  width:100%;
  padding: 12px 14px;
  border-radius: 14px;
  border:0;
  cursor:pointer;
  font-weight:800;
}
.btn-primary{background: linear-gradient(180deg, var(--brand), var(--brand2)); color:#fff;}
.btn-secondary{background: rgba(255,255,255,.08); color: var(--text); border:1px solid var(--line);}
.btn-ghost{background: transparent; color: var(--text); border:1px dashed var(--line);}
.btn-inline{width:auto; padding:10px 12px;}

.section-head{display:flex; align-items:flex-end; justify-content:space-between; gap:10px; margin-top:16px}
.section-head small{color:var(--muted)}
.link{color:#b8c7ff; text-decoration:none}
.link:hover{text-decoration:underline}

.hscroll{
  display:flex;
  gap:12px;
  overflow:auto;
  padding: 10px 2px 2px 2px;
  scroll-snap-type:x mandatory;
}
.hscroll::-webkit-scrollbar{height:8px}
.hscroll::-webkit-scrollbar-thumb{background: rgba(255,255,255,.10); border-radius:999px}

.tcard{
  min-width: 248px;
  padding:0;
  overflow:hidden;
  scroll-snap-align:start;
}
.banner{
  width:100%;
  height:100px;
  display:block;
  object-fit:cover;
  filter: saturate(1.05) contrast(1.05);
}
.tcard__body{padding:12px}
.tcard__title{font-weight:900}
.tcard__sub{color:var(--muted); font-size:13px; margin-top:4px}

.bottomnav{
  height: calc(72px + var(--safe-bot));
  padding: 10px 10px calc(10px + var(--safe-bot)) 10px;
  display:flex;
  justify-content:space-between;
  gap:8px;
  border-top:1px solid var(--line);
  background: rgba(18,26,51,.78);
}
.bottomnav__item{
  flex:1;
  border:1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 16px;
  cursor:pointer;
  padding: 8px 6px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-size: 11px;
}
.bottomnav__item .i{font-size:18px; line-height:1}
.bottomnav__item.is-active{
  border-color: rgba(47,107,255,.35);
  background: rgba(47,107,255,.14);
  color: #dbe6ff;
}

.kpi-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.kpi{padding:14px; border-radius:var(--r1); border:1px solid var(--line); background: rgba(255,255,255,.05);}
.kpi .k{font-size:12px; color:var(--muted)}
.kpi .v{font-size:18px; font-weight:900; margin-top:6px}

.list{display:flex; flex-direction:column; gap:10px}
.li{
  display:flex; gap:10px; align-items:center;
  padding:12px;
  border-radius:var(--r1);
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
}
.li .ic{width:40px; height:40px; border-radius:14px; border:1px solid var(--line); background: rgba(255,255,255,.06); display:grid; place-items:center}
.li .t{font-weight:900}
.li .s{color:var(--muted); font-size:13px; margin-top:3px}
.li .r{margin-left:auto; color:#dbe6ff; font-weight:900}

.tabs{display:flex; gap:10px}
.tab{
  flex:1;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-weight:800;
  cursor:pointer;
}
.tab.is-active{background: rgba(47,107,255,.16); border-color: rgba(47,107,255,.35); color:#dbe6ff}

.toast{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  background: rgba(18,26,51,.95);
  border:1px solid var(--line);
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text);
  box-shadow: var(--shadow);
  max-width: min(92vw, 520px);
  z-index: 9999;
  opacity: 0;
  pointer-events:none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show{opacity:1; transform: translateX(-50%) translateY(-8px);}
