html, body {
  height: 100%; /* ensure full height for flex to work */
  margin: 0;    /* remove default margin */
}



body {
  background-color: #163cf9;
  color: black;
  font-family: Verdana, sans-serif;
  background-image: url("images/WINDOW.gif");
  background-repeat: repeat;
  background-size: 100% 100%;
}


@font-face{
	font-family: 'LEDLIGHT';
	src: url(fonts/LEDLIGHT.otf);
}
@font-face{
	font-family: 'Chicago';
	src: url(fonts/ChicagoFLF.ttf);
}
@font-face{
	font-family: 'Magazine';
	src: url(fonts/MagazineLetterByBrntlbrnl-Regular.ttf);
}
@font-face{
	font-family: 'curly';
	src: url(fonts/curly.ttf);
}
@font-face{
	font-family: 'Minecraft';
	src: url(fonts/Minecraft.ttf);
}
@font-face{
	font-family: 'WindowsRegular';
	src: url(fonts/WindowsRegular.ttf);
}



#title{
  display: absolute;
  text-align: center;
  font-family: 'Chicago';
}

.center-wrapper {
  
  
  display: flex;
  /*
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);*/
  
  
  align-items: center;
  justify-content: center;
  height: 50vh;  /*full viewport height */
  padding: 0px;
  box-sizing: border-box;
  /* border: 2px solid black;  <-- optional for debugging */
}

.center-box {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  grid-column-gap: 0px;
  grid-row-gap: 0px;
  
  background-color: white;
  padding: 20px;
  border: 2px solid black;
  border-radius: 10px;
  max-width: none;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  overflow: auto; /* to allow scrolling if content too big */
  height: 470px; /* if you want fixed height */
  box-sizing: border-box;
  cursor: move;
  position: relative;
  

}

/* remove grid-related styles from #h */
#h {
  border: 2px solid #75a0e6;
  box-shadow: inset 1px 1px #fff, 1px 1px #000;
  font-family:'WindowsRegular', sans-serif;
  text-align: center;
  font-size: 14px;
  /* width and height are controlled by .center-box */
}
.draggable {
  position: relative;
  cursor: move;
}

#BOXL {
  position: relative;
  grid-area: 1 / 1 / 4 / 2;
  background-color: #FFFFFF;
  overflow: auto;
  text-align: center;
  
  /* Remove full border, add only right border for internal separation */
  border-right: 2px solid #75a0e6;
  border-top: none;
  border-left: none;
  border-bottom: none;
  font-family: 'WindowsRegular';

}

#BOXM {
  position: relative;
  grid-area: 1 / 2 / 4 / 5;
  background-color: #FFFFFF;
  overflow: auto;
  text-align: center;

  /* Add left border only if not already added from left box, or remove to avoid doubling */
  border-right: 2px solid #75a0e6;
  border-left: none;
  border-top: none;
  border-bottom: none;
  font-family: 'WindowsRegular';

}

#BOXN {
  position: relative;
  grid-area: 1 / 5 / 4 / 6;
  background-color: #FFFFFF;
  overflow: auto;
  text-align: center;

  /* No right border because it is outer edge */
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: none;
  font-family: 'WindowsRegular';

}

#BOXP {
  position: relative;
  grid-area: 4 / 1 / 6 / 6;
  background-color: #FFFFFF;
  overflow: auto;
  text-align: center;

  /* Add top border for internal separation */
  border-top: 2px solid #75a0e6;

  /* No borders on left, right, bottom for outer edges */
  border-left: none;
  border-right: none;
  border-bottom: none;
  font-family: 'WindowsRegular';

}



.window-custom-position {
  position: absolute;
  top: 100px;
  left: 200px;
}


.link-btn {
  background: none;
  border: none;
  color: blue;
  text-decoration: underline;
  cursor: pointer;
  font-size: 1em;
  font-family: inherit;
  padding: 0;
  margin: 0;
}

.link-btn:hover {
  color: darkblue;
}


.floating-window {
  position: absolute;
  max-width: 500px;
  top: 50px;
  left: 700px;
  z-index: 999; /* ensure it's on top */
}

