html, body {
    height: 100%;
    overflow: hidden; /* Prevent page-level scrollbars */
}

body {
    margin: 0;
    padding: 0;
    background-color: #1e1e1e;
    color: #ffffff;
    font-family: 'Courier New', monospace;
}

#terminal-container {
    width: 100vw;
    height: 100vh;
    display: block;          /* Fill the viewport, no centering */
    overflow: hidden;        /* Keep scroll inside xterm viewport */
}

.xterm {
    width: 100%;
    height: 100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

/* Ensure the xterm internal viewport handles its own scroll */
.xterm .xterm-viewport {
  overflow-y: auto !important;
}

/* Hide xterm helper UI while keeping it functional */
.xterm-helpers { 
  background: transparent !important;
  pointer-events: none !important; /* don't allow dragging/resizing */
}

.xterm .xterm-helper-textarea {
  position: absolute !important;
  opacity: 0 !important;                    /* invisible */
  background: transparent !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important; /* Safari */
  caret-color: transparent !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  resize: none !important;                   /* remove resize handle */
  pointer-events: none !important;           /* ignore mouse */
  width: 0 !important; height: 0 !important; /* collapse box */
  min-width: 0 !important; min-height: 0 !important;
}

/* Keep measurement/composition helpers present but not visible */
.xterm .xterm-char-measure-element,
.xterm .composition-view {
  opacity: 0 !important;
  width: 0 !important; height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  background: transparent !important;
}
