/* A interface do EmuNi recriada a partir das telas reais (ref/*.png): fundo #2b2b2b, linhas #383838,
   anel de foco ciano com brilho, texto claro. Tudo em pixels lógicos (800x450; 480x360 no celular),
   escalado pelo app.js. Toda regra começa com .osd para não vazar para o site. */

.osd {
  position: absolute;
  left: 0;
  top: 0;
  width: 800px;
  height: 450px;
  transform-origin: 0 0;
  background: #2b2b2b;
  color: #ececec;
  font-family: "Segoe UI", "Fredoka", system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  user-select: none;
}
.osd * { box-sizing: border-box; }
.osd h3, .osd p { margin: 0; }
.osd svg { display: block; }

/* topo: avatar, jogadores, hora, Wi-Fi e bateria */
.osd .o-top { position: absolute; left: 20px; right: 22px; top: 12px; height: 30px; display: flex; align-items: center; justify-content: space-between; z-index: 4; transition: opacity .3s; }
.osd .o-av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: radial-gradient(circle at 35% 30%, #4aa3ff, #1f5fd6 70%); }
.osd .o-end { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 11px; }
.osd .o-pill { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 99px; background: #383838; }
.osd .o-pill svg { width: 14px; height: 14px; }
.osd .o-dots { display: flex; gap: 2px; }
.osd .o-dots i, .osd .p-dots i { width: 4px; height: 4px; border-radius: 50%; background: #6b6b6b; transition: background .3s, transform .4s cubic-bezier(.34,1.56,.64,1); }
.osd .o-dots i.on, .osd .p-dots i.on { background: #3ddc7a; }
.osd .o-time { font-size: 13px; }
.osd .o-end svg { width: 15px; height: 15px; }

/* páginas */
.osd .o-pages { position: absolute; inset: 0; }
.osd .o-pg { position: absolute; inset: 0; visibility: hidden; }
.osd .o-pg.on, .osd .o-pg.leaving { visibility: visible; }
.osd .col { position: absolute; left: 0; right: 0; margin: 0 auto; }

.osd .o-h { font-size: 15px; font-weight: 700; color: #fff; }
.osd .o-sub { font-size: 8.5px; color: #a8a8a8; margin-top: 10px; }
.osd .row { position: relative; height: 26px; margin-top: 6px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-radius: 4px; background: #383838; font-size: 10.5px; }
.osd .row .v { color: #a9a9a9; font-size: 9px; position: relative; overflow: hidden; height: 14px; display: flex; align-items: center; }
.osd .row .v span { display: block; white-space: nowrap; }
.osd .row.press { background: #444; }

/* anel de foco */
.osd .o-ring {
  position: absolute;
  left: 0;
  top: 0;
  border: 2.5px solid #2ad0f0;
  border-radius: 7px;
  box-shadow: 0 0 10px rgba(42, 208, 240, .55), inset 0 0 6px rgba(42, 208, 240, .25);
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity .2s;
}
.osd .o-ring.on { opacity: 1; }

/* doca e dicas */
.osd .o-dock { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; gap: 14px; z-index: 3; transition: opacity .3s, transform .4s; }
.osd .o-dock span { width: 32px; height: 32px; border-radius: 50%; background: #3b3b3b; display: grid; place-items: center; transition: background .2s, transform .3s cubic-bezier(.34,1.56,.64,1); }
.osd .o-dock span.cur { background: #4a4a4a; }
.osd .o-dock svg { width: 15px; height: 15px; fill: none; stroke: #e8e8e8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.osd .o-hints { position: absolute; right: 22px; bottom: 6px; display: flex; gap: 14px; font-size: 8.5px; color: #c9c9c9; z-index: 3; transition: opacity .3s; }
.osd .o-hints b { display: inline-grid; place-items: center; min-width: 13px; height: 13px; padding: 0 3px; margin-right: 5px; border-radius: 99px; background: #e9e9e9; color: #222; font-size: 7.5px; }
.osd[data-pg="tester"] .o-dock, .osd[data-pg="pause"] .o-dock, .osd[data-pg="game"] .o-dock { opacity: 0; transform: translateX(-50%) translateY(20px); }
.osd[data-pg="game"] .o-top, .osd[data-pg="game"] .o-hints { opacity: 0; }

/* Controles */
.osd .pg-controls .col { top: 62px; width: 620px; }
.osd .players { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 8px; }
.osd .pcard { position: relative; height: 110px; border-radius: 6px; background: #353535; padding: 8px 9px; display: flex; flex-direction: column; }
.osd .pcard .p-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 9.5px; color: #fff; }
.osd .p-dots { display: flex; gap: 2px; }
.osd .pcard .p-body { flex: 1; display: grid; place-items: center; position: relative; }
.osd .pcard .p-empty { width: 92px; height: 46px; border: 1.5px dashed #5d5d5d; border-radius: 26px; display: grid; place-items: center; font-size: 7px; color: #6b6b6b; transition: opacity .25s; }
.osd .pcard .p-pad { position: absolute; width: 88px; opacity: 0; transform: scale(.3); }
.osd .pcard.on .p-pad { opacity: 1; transform: none; }
.osd .pcard.on .p-empty { opacity: 0; }
.osd .pcard .p-foot { text-align: center; font-size: 8px; font-weight: 700; color: #8d8d8d; }
.osd .pcard.on .p-foot { color: #cfcfcf; }
.osd .note { font-size: 8px; color: #a8a8a8; margin-top: 8px; }

/* desenho de controle (genérico, próprio) */
.osd .gp-body { fill: url(#gp-grad); stroke: #1c1c1c; stroke-width: 3; }
.osd .gp-dark { fill: #2d2d2d; }
.osd .gp-mid { fill: #3a3a3a; }
.osd .gp-light { fill: #d4d6dd; stroke: #1c1c1c; stroke-width: 2.5; }
.osd [data-k] { transition: fill .15s; }
.osd .lit.gp-dark, .osd .lit.gp-mid, .osd .lit .gp-dark, .osd .lit .gp-mid, .osd .lit.gp-light, .osd .lit .gp-light { fill: #22c3e6 !important; }
.osd .gp-face text { font: 700 12px "Segoe UI", "Fredoka", sans-serif; text-anchor: middle; }

/* Testar controle */
.osd .pg-tester .t-title { position: absolute; left: 70px; top: 64px; display: flex; align-items: baseline; gap: 10px; }
.osd .pg-tester .t-title small { font-size: 7.5px; color: #a8a8a8; }
.osd .t-head { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); font-weight: 800; font-size: 10.5px; letter-spacing: .6px; text-align: center; }
.osd .t-head::after { content: ""; display: block; width: 1px; height: 14px; margin: 3px auto 0; background: #22c3e6; }
.osd .t-pad { position: absolute; left: 50%; top: 122px; width: 300px; transform: translateX(-50%); }
.osd .t-list { position: absolute; top: 122px; display: flex; flex-direction: column; gap: 8.4px; font-weight: 800; font-size: 9.5px; letter-spacing: .3px; }
.osd .t-list li { display: flex; align-items: center; gap: 8px; list-style: none; height: 14px; transition: color .15s; }
.osd .t-list.l { right: calc(50% + 162px); align-items: flex-end; }
.osd .t-list.r { left: calc(50% + 162px); }
.osd .t-list.r li { flex-direction: row-reverse; justify-content: flex-end; }
.osd .t-chip { min-width: 15px; height: 15px; padding: 0 3px; border-radius: 4px; background: #e9e9e9; color: #222; display: grid; place-items: center; font-size: 6.5px; font-weight: 800; transition: box-shadow .15s, background .15s; }
.osd .t-list.r .t-chip { border-radius: 50%; }
.osd .t-list li.lit { color: #22c3e6; }
.osd .t-list li.lit .t-chip { box-shadow: 0 0 0 2px #22c3e6, 0 0 8px rgba(34, 195, 230, .7); background: #fff; }
.osd .t-now { display: none; }
.osd .t-foot { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); width: 560px; text-align: center; font-size: 7px; color: #a8a8a8; }

/* Jogo de exemplo (desenhado aqui, sem nada de terceiros) */
.osd .pg-game { background: linear-gradient(180deg, #7fd3ff, #d4f3ff 70%); overflow: hidden; }
.osd .g-sun { position: absolute; right: 120px; top: 60px; width: 70px; height: 70px; border-radius: 50%; background: #ffd75e; box-shadow: 0 0 0 10px rgba(255, 215, 94, .35); }
.osd .g-cloud { position: absolute; height: 28px; border-radius: 99px; background: #fff; animation: g-drift 18s linear infinite; }
.osd .g-cloud.c1 { width: 120px; top: 70px; left: 10%; }
.osd .g-cloud.c2 { width: 80px; top: 120px; left: 60%; animation-duration: 24s; }
@keyframes g-drift { from { translate: -160px 0; } to { translate: 1100px 0; } }
.osd .g-hills { position: absolute; left: 0; right: 0; bottom: 0; height: 200px; }
.osd .g-hills path { stroke: #1c2a3a; stroke-width: 3; }
.osd .g-plat { position: absolute; height: 22px; border-radius: 12px; background: #8a5a3c; border: 3px solid #1c2a3a; box-shadow: inset 0 7px 0 #57c96b; animation: g-float 3s ease-in-out infinite alternate; }
.osd .g-plat.p1 { left: 22%; top: 210px; width: 130px; }
.osd .g-plat.p2 { left: 52%; top: 165px; width: 100px; animation-delay: -1s; }
.osd .g-plat.p3 { left: 72%; top: 235px; width: 120px; animation-delay: -2s; }
@keyframes g-float { to { translate: 0 -16px; } }
.osd .g-hero { position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #1c2a3a; background: conic-gradient(#12a8e0 0 50%, #ff5247 0 100%); }
.osd .g-gem { position: absolute; width: 16px; height: 16px; border: 3px solid #1c2a3a; border-radius: 5px; background: #ffc83d; transform: rotate(45deg); animation: g-gem 1.2s ease-in-out infinite alternate; }
@keyframes g-gem { to { translate: 0 -8px; } }
.osd .o-fps { position: absolute; left: 14px; top: 12px; z-index: 6; padding: 3px 7px; border-radius: 4px; background: rgba(0, 0, 0, .62); color: #7dff9b; font: 700 10px ui-monospace, Menlo, Consolas, monospace; transition: opacity .25s; }
.osd .o-fps.off { opacity: 0; }

/* Pausa */
.osd .pg-pause .col { top: 96px; width: 460px; }
.osd .pz-line { font-size: 7.6px; color: #a8a8a8; margin-top: 12px; }
.osd .pz-line .roll { display: inline-flex; position: relative; overflow: hidden; vertical-align: bottom; }
.osd .pz-rows { margin-top: 10px; }
.osd .o-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 8; }
.osd .o-toast { position: absolute; right: 18px; top: 48px; z-index: 9; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 8px; background: #3a3a3a; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); font-size: 9.5px; font-weight: 700; opacity: 0; transform: translateY(-10px); transition: opacity .3s, transform .5s cubic-bezier(.34,1.56,.64,1); }
.osd .o-toast.on { opacity: 1; transform: none; }
.osd .o-toast .thumb { width: 54px; height: 30px; border-radius: 4px; background: linear-gradient(180deg, #7fd3ff, #d4f3ff 60%, #57c96b 60%); border: 1.5px solid #555; }
.osd .o-toast.no-thumb .thumb { display: none; }

/* Perfil */
.osd .pg-profile .col { top: 54px; width: 430px; }
.osd .pf-av-wrap { display: grid; place-items: center; margin: 10px 0 8px; }
.osd .pf-av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 28px; color: #fff; background: radial-gradient(circle at 35% 30%, #4aa3ff, #1f5fd6 70%); transition: background .45s; }
.osd .pf-av svg { width: 32px; height: 32px; }
.osd .pf-av.c-red { background: radial-gradient(circle at 35% 30%, #ff7d6f, #d9372d 70%); }
.osd .pf-av.c-green { background: radial-gradient(circle at 35% 30%, #6fe08a, #23944c 70%); }
.osd .pf-label { font-size: 7.5px; font-weight: 800; letter-spacing: .5px; color: #cfcfcf; margin: 12px 0 6px 4px; }
.osd .pf-icons { display: grid; grid-template-columns: repeat(9, 34px); gap: 7px 8px; padding-left: 2px; }
.osd .pf-icons span { width: 34px; height: 34px; border-radius: 50%; background: #3b3b3b; display: grid; place-items: center; font-weight: 700; color: #bdbdbd; font-size: 12px; }
.osd .pf-icons svg { width: 18px; height: 18px; }
.osd .pf-save { margin-top: 12px; }

/* celular: tela 480x360 */
.osd.narrow { width: 480px; height: 360px; font-size: 13px; }
.osd.narrow .o-top { left: 12px; right: 12px; top: 8px; }
.osd.narrow .o-time, .osd.narrow .o-end > svg, .osd.narrow .o-end > .o-bat-t { display: none; }
.osd.narrow .o-hints { display: none; }
.osd.narrow .o-dock { bottom: 10px; gap: 10px; }
.osd.narrow .o-dock span { width: 28px; height: 28px; }
.osd.narrow .o-h { font-size: 17px; }
.osd.narrow .o-sub { font-size: 10px; margin-top: 4px; }
.osd.narrow .row { height: 25px; margin-top: 4px; font-size: 12px; padding: 0 10px; }
.osd.narrow .row .v { font-size: 10.5px; }
.osd.narrow .pg-controls .col { top: 46px; width: 452px; }
.osd.narrow .pg-controls .o-sub { display: none; }
.osd.narrow .players { margin: 8px 0 6px; gap: 6px; }
.osd.narrow .pcard { height: 92px; padding: 6px 7px; }
.osd.narrow .pcard .p-head { font-size: 10px; }
.osd.narrow .pcard .p-pad { width: 74px; }
.osd.narrow .pcard .p-empty { width: 76px; height: 40px; font-size: 8px; }
.osd.narrow .pcard .p-foot { font-size: 9px; }
.osd.narrow .note { display: none; }
.osd.narrow .pg-tester .t-title { left: 16px; top: 44px; }
.osd.narrow .pg-tester .t-title small { display: none; }
.osd.narrow .t-head { top: 74px; font-size: 11px; }
.osd.narrow .t-pad { top: 104px; width: 280px; }
.osd.narrow .t-list, .osd.narrow .t-foot { display: none; }
.osd.narrow .t-now { display: block; position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font-weight: 800; font-size: 15px; color: #22c3e6; letter-spacing: .5px; white-space: nowrap; }
.osd.narrow .pg-pause .col { top: 44px; width: 440px; }
.osd.narrow .pz-line { font-size: 9.5px; margin-top: 6px; }
.osd.narrow .pz-line.long { display: none; }
.osd.narrow .pg-profile .col { top: 34px; width: 440px; }
.osd.narrow .pf-av-wrap { margin: 4px 0 2px; }
.osd.narrow .pf-av { width: 48px; height: 48px; font-size: 22px; }
.osd.narrow .pf-label { margin: 6px 0 4px 2px; font-size: 9px; }
.osd.narrow .pf-icons { grid-template-columns: repeat(9, 30px); gap: 5px 9px; }
.osd.narrow .pf-icons span { width: 30px; height: 30px; }
.osd.narrow .pf-save { margin-top: 6px; }
.osd.narrow .g-sun { right: 50px; top: 40px; width: 50px; height: 50px; }
.osd.narrow .g-plat.p1 { top: 170px; left: 12%; }
.osd.narrow .g-plat.p2 { top: 130px; left: 45%; }
.osd.narrow .g-plat.p3 { top: 190px; left: 70%; width: 90px; }
.osd.narrow .g-hills { height: 130px; }
.osd.narrow .o-toast { top: 40px; right: 10px; font-size: 11px; }
