/* Pool Pro — HarryWheat Games */
:root{
  --bg:#0c0f14;
  --panel:#111826;
  --panel2:#0f1520;
  --text:#e9eef7;
  --muted:#9fb0c8;
  --accent:#5cc8ff;
  --danger:#ff5c7a;

  --felt:#0b6b3a;
  --rail:#4a2a12;
  --pocket:#080a0f;
  --line:#bfe8ff;
}

*{box-sizing:border-box}
html,.hwppoolpro-inline{height:100%}
.hwppoolpro-inline{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background: radial-gradient(1200px 800px at 30% 10%, #18233a 0%, var(--bg) 60%);
  color:var(--text);
}

.app{min-height:100%; display:flex; flex-direction:column;}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; gap:14px;
  border-bottom:1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(17,24,38,.82), rgba(17,24,38,.55));
  backdrop-filter: blur(10px);
}

.brand{display:flex; gap:12px; align-items:center;}
.logo{
  width:40px;height:40px;border-radius:12px;
  display:grid;place-items:center;
  font-weight:800; letter-spacing:.5px;
  background: linear-gradient(135deg, rgba(92,200,255,.22), rgba(255,255,255,.06));
  border:1px solid rgba(92,200,255,.35);
  color:var(--accent);
  box-shadow: 0 10px 25px rgba(0,0,0,.22);
}
.title{font-size:18px; font-weight:800; line-height:1;}
.sub{font-size:12px; color:var(--muted); margin-top:2px;}

.hud{display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end;}
.pill{
  padding:8px 10px; border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  color:var(--muted);
  font-size:12px;
}

.btn{
  padding:9px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
  font-weight:650;
}
.btn:hover{border-color: rgba(92,200,255,.35)}
.btn:active{transform: translateY(1px)}
.btn.danger{border-color: rgba(255,92,122,.3); color:#ffd7de;}
.btn.danger:hover{border-color: rgba(255,92,122,.6)}

.stage{
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:14px;
  padding:14px;
  align-items:start;
}

.canvasWrap{
  position:relative;
  border-radius:18px;
  overflow:hidden;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  min-height: 520px;
}

canvas{display:block; width:100%; height:100%;}

.hint{
  position:absolute;
  left:12px; bottom:12px;
  max-width: 520px;
  padding:10px 12px;
  border-radius:14px;
  background: rgba(15,21,32,.66);
  border:1px solid rgba(255,255,255,.08);
  color: rgba(233,238,247,.92);
  font-size:12px;
  line-height:1.35;
  backdrop-filter: blur(8px);
}

.side{display:flex; flex-direction:column; gap:14px;}
.card{
  background: rgba(17,24,38,.66);
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:12px 12px;
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
}
.cardTitle{font-weight:800; margin-bottom:10px;}
.stats{display:flex; flex-direction:column; gap:8px;}
.statRow{display:flex; justify-content:space-between; color:var(--muted)}
.about{color:var(--muted); font-size:13px; line-height:1.4}
.about.small{font-size:12px}
.about pre{
  white-space:pre-wrap;
  background: rgba(0,0,0,.3);
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:10px;
  overflow:auto;
  color:rgba(233,238,247,.9);
}
.meta{margin-top:10px; display:flex; flex-direction:column; gap:4px; font-size:12px;}

.footer{
  padding:12px 16px;
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  color:rgba(159,176,200,.95);
  border-top:1px solid rgba(255,255,255,.06);
  background: rgba(10,14,20,.55);
}
.footer .right{opacity:.95}

.modal{
  position:fixed; inset:0;
  background: rgba(0,0,0,.55);
  display:none;
  align-items:center; justify-content:center;
  padding:16px;
}
.modal.show{display:flex}
.modalPanel{
  width:min(520px, 100%);
  border-radius:18px;
  background: rgba(17,24,38,.95);
  border:1px solid rgba(255,255,255,.10);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  overflow:hidden;
}
.modalHeader{
  padding:12px 12px;
  display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.modalTitle{font-weight:900}
.iconBtn{
  width:38px;height:38px;border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
}
.modalBody{padding:12px; display:flex; flex-direction:column; gap:12px;}
.row{display:flex; flex-direction:column; gap:8px;}
.row label{color:var(--muted); font-size:13px}
.row select, .row input[type="range"]{
  width:100%;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  color:var(--text);
}
.smallNote{color:rgba(159,176,200,.95); font-size:12px}
.toggle{display:flex; gap:10px; align-items:center; color:var(--muted); font-size:13px}
.toggle input{transform: scale(1.15)}
.modalFooter{
  padding:12px;
  border-top:1px solid rgba(255,255,255,.08);
  display:flex; justify-content:flex-end;
}

@media (max-width: 980px){
  .stage{grid-template-columns:1fr; }
  .side{order:2}
  .canvasWrap{min-height: 520px}
}

.hwppoolpro-inline { margin: 0; }
