/* ============================================================
   EX:TRACKER - habillage de la page.
   Tout l'interface est dessine dans le canvas ; le HTML ne
   sert qu'a poser l'ecran au centre dans son cadre CRT.
   ============================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #050705;
  overflow: hidden;
  font-family: "Consolas", "Courier New", monospace;
  color: #4e9c74;
  -webkit-font-smoothing: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* fond de page : lueur tres faible derriere l'ecran */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(20, 90, 52, 0.22), rgba(3, 8, 5, 0) 62%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0 1px, rgba(0, 0, 0, 0) 1px 3px);
  pointer-events: none;
  z-index: 0;
}

#cabinet {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  padding: 8px;
}

/* le tube : cadre epais, biseaute, reflet */
#crt {
  position: relative;
  padding: 10px;
  background: linear-gradient(160deg, #2a2f2b 0%, #171b18 42%, #0d100e 100%);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(190, 255, 215, 0.10),
    inset 0 -2px 6px rgba(0, 0, 0, 0.9),
    0 0 0 2px #050705,
    0 0 34px rgba(40, 190, 110, 0.13),
    0 18px 50px rgba(0, 0, 0, 0.75);
  line-height: 0;
}

/* coins du cadre */
#crt::before,
#crt::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(92, 255, 157, 0.35);
  pointer-events: none;
}
#crt::before { top: 3px; left: 3px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
#crt::after  { bottom: 3px; right: 3px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }

#ecran {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #030604;
  border-radius: 4px;
  cursor: none;
  box-shadow: 0 0 22px rgba(60, 220, 130, 0.18) inset;
  touch-action: none;
}

/* pied de page : rappel des touches, discret, masquable */
#pied {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 3px;
  margin: 0;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: rgba(78, 156, 116, 0.45);
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 6px;
  transition: opacity 0.4s;
}
#pied.cache { opacity: 0; }

/* ecrans plus larges : on deplace le pied pour ne pas le coller */
@media (max-height: 560px) {
  #pied { font-size: 9px; }
}
@media (max-width: 520px) {
  #pied { font-size: 8px; }
}
