/* 3D Pinball for Windows - Space Cadet (tribute) */
.app-pinball .window-body { background: #05041a; }
.app-pinball .pb-root { flex: 1; min-height: 0; display: flex; flex-direction: row; background: #05041a; user-select: none; -webkit-user-select: none; }
.app-pinball .pb-table { position: relative; flex: 1 1 60%; min-width: 0; min-height: 0; overflow: hidden; }
.app-pinball .pb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: var(--cur-arrow); }

/* Launch (plunger) button: touch affordance, hidden for mouse users on the desktop layout */
.app-pinball .pb-plunger {
  display: none; position: absolute; right: 6px; bottom: 8px; min-width: 64px; height: 40px;
  touch-action: none; font-weight: bold; z-index: 2;
}
.app-pinball .pb-plunger:active { transform: translateY(2px); }
@media (pointer: coarse) { .app-pinball .pb-plunger { display: block; } }
.app-pinball .pb-compact .pb-plunger { display: block; }

/* Score panel */
.app-pinball .pb-panel {
  flex: 0 0 236px; display: flex; flex-direction: column; gap: 10px; padding: 12px 10px;
  background: linear-gradient(180deg, #13206e 0%, #0a1244 45%, #050826 100%);
  border-left: 3px solid #2c3a9a; box-shadow: inset 2px 0 0 #6070d0; color: #fff; overflow: hidden;
}
.app-pinball .pb-logo { display: flex; flex-direction: column; align-items: center; padding: 6px 0 2px; }
.app-pinball .pb-logo-3d {
  font: italic bold 15px "Trebuchet MS", Tahoma, sans-serif; letter-spacing: 1px; color: #ffd84a;
  text-shadow: 0 0 6px rgba(255, 180, 40, .7), 1px 1px 0 #7a3a00;
}
.app-pinball .pb-logo-sc {
  font: italic bold 26px "Trebuchet MS", Tahoma, sans-serif; line-height: 1.05;
  background: linear-gradient(180deg, #ffffff 0%, #9ff 45%, #3a7dff 55%, #b050ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 4px rgba(80, 180, 255, .7));
}
.app-pinball .pb-lcd {
  background: #000; border: 2px solid; border-color: #0a0f30 #5a6ad0 #5a6ad0 #0a0f30;
  padding: 8px 8px 10px; font-family: "Courier New", Courier, monospace; font-weight: bold;
  box-shadow: inset 0 0 12px rgba(40, 80, 255, .35);
}
.app-pinball .pb-row { display: flex; justify-content: space-between; color: #ffd84a; font-size: 13px; letter-spacing: 1px; }
.app-pinball .pb-score {
  color: #ff4040; font-size: 28px; text-align: right; margin: 6px 0 8px; letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 60, 60, .7); white-space: nowrap; overflow: hidden;
}
.app-pinball .pb-msg1, .app-pinball .pb-msg2 {
  color: #7ff8ff; font-size: 12px; min-height: 15px; line-height: 15px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-pinball .pb-msg2 { color: #b8c8ff; font-weight: normal; }
.app-pinball .pb-players { font: bold 11px "Courier New", monospace; color: #9fb3ff; white-space: pre; line-height: 15px; }
.app-pinball .pb-players:empty, .app-pinball .pb-rank:empty { display: none; }
.app-pinball .pb-rank { margin-top: auto; font: bold 11px Tahoma, sans-serif; color: #7cff6a; text-align: center; text-shadow: 0 0 4px rgba(120, 255, 100, .6); }

/* Compact (phone / narrow) layout: panel on top as a slim LCD strip */
.app-pinball .pb-compact { flex-direction: column; }
.app-pinball .pb-compact .pb-panel { order: -1; flex: none; flex-direction: row; flex-wrap: wrap; gap: 4px 8px; padding: 4px 6px; border-left: 0; border-bottom: 2px solid #2c3a9a; box-shadow: none; align-items: center; }
.app-pinball .pb-compact .pb-logo { display: none; }
.app-pinball .pb-compact .pb-lcd { flex: 1 1 100%; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "row score" "m1 m1" "m2 m2"; column-gap: 8px; padding: 3px 6px; }
.app-pinball .pb-compact .pb-row { grid-area: row; flex-direction: column; font-size: 10px; }
.app-pinball .pb-compact .pb-score { grid-area: score; font-size: 22px; margin: 0; align-self: center; }
.app-pinball .pb-compact .pb-msg1 { grid-area: m1; font-size: 11px; }
.app-pinball .pb-compact .pb-msg2 { grid-area: m2; font-size: 10px; min-height: 13px; line-height: 13px; }
.app-pinball .pb-compact .pb-players { white-space: normal; font-size: 10px; }
.app-pinball .pb-compact .pb-rank { margin: 0; font-size: 10px; }

/* Full screen (F4): cover the viewport, hide chrome like the original */
.window.app-pinball.pb-full {
  position: fixed !important; left: 0 !important; top: 0 !important; width: 100vw !important; height: 100vh !important;
  z-index: 95000 !important; border-radius: 0; border: 0;
}
.window.app-pinball.pb-full .titlebar, .window.app-pinball.pb-full .menubar { display: none; }

/* Dialogs */
.pb-dialog-win .pb-dlg { font: 11px Tahoma, Verdana, sans-serif; max-width: calc(100vw - 40px); box-sizing: border-box; }
.pb-dialog-win .pb-dlg p { margin: 0 0 8px; line-height: 1.35; }
.pb-dialog-win .pb-dlg .xp-input { width: 100%; box-sizing: border-box; }
.pb-dialog-win .pb-scores { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #7F9DB9; }
.pb-dialog-win .pb-scores th { text-align: left; font-weight: normal; background: #EBEADB; border-bottom: 1px solid #C5C2B2; padding: 3px 6px; }
.pb-dialog-win .pb-scores td { padding: 3px 6px; height: 14px; }
.pb-dialog-win .pb-scores .num { text-align: right; }
.pb-dialog-win .pb-scores tr.hi td { background: #316AC5; color: #fff; }
.pb-dialog-win .pb-keys { width: 100%; border-collapse: collapse; }
.pb-dialog-win .pb-keys td { padding: 3px 4px; }
.pb-dialog-win .pb-key { display: inline-block; min-width: 60px; padding: 1px 6px; background: #fff; border: 1px solid #7F9DB9; }
.pb-dialog-win .pb-note { color: #555; }
.pb-dialog-win .pb-help { max-height: min(320px, 60vh); overflow: auto; padding-right: 4px; }
.pb-dialog-win .pb-help h4 { margin: 8px 0 3px; font-size: 11px; color: #0b3c9c; }
.pb-dialog-win .pb-about-logo { display: flex; flex-direction: column; align-items: center; padding: 10px; margin-bottom: 8px; background: linear-gradient(180deg, #13206e, #050826); border: 1px solid #0a0f30; }
.pb-dialog-win .pb-about-logo .pb-logo-3d { font: italic bold 14px "Trebuchet MS", Tahoma, sans-serif; color: #ffd84a; }
.pb-dialog-win .pb-about-logo .pb-logo-sc {
  font: italic bold 24px "Trebuchet MS", Tahoma, sans-serif;
  background: linear-gradient(180deg, #fff 0%, #9ff 45%, #3a7dff 55%, #b050ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.app-pinball .pb-hint { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; padding: 6px; font: 10px Tahoma, sans-serif; color: #8fa0e0; border: 1px solid #22307a; background: rgba(0, 0, 0, .25); }
.app-pinball .pb-hint b { display: inline-block; min-width: 38px; color: #ffd84a; }
.app-pinball .pb-compact .pb-hint { display: none; }
