/* ============== FORM & INPUT STYLES ============== */
#myForm {
  font-family: 'Fredericka the Great', cursive;
  text-align: center;
  font-size: 28px;
  margin-top: 20px;
}

/* The input box */
#numberInput {
  font-family: 'Fredericka the Great', cursive;
  font-size: 24px;
  padding: 8px 12px;
  border: 2px solid #000;
  border-radius: 5px;
  width: 180px;
  text-align: center;
  color:#000!important;
}

/* Generate button */
#generateBtn {
  font-size: 26px;
  padding: 10px 20px;
  margin-left: 10px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  background: linear-gradient(45deg, #c0c0c0, #faf6f6);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  transition: 0.4s;
  color:#000!important;
}
#generateBtn:hover {
  background-color: #d2cccc;
}

/* Error message */
#errorMsg {
  color: red;
  display: block;
  margin-top: 10px;
  font-size: 22px;
}

/* ============== TABLE CONTAINER ============== */
#tableContainer {
  width: 720px;
  height: 1024px;
  margin: 20px auto;
  position: relative;
  background: url('mutiplication-table-sheet.png') no-repeat center center;
  background-size: cover;
  text-align: center;
  color:#000!important;
}

/* Heading for the table */
#tableHeading {
  font-family: 'Fredericka the Great', cursive;
  position: absolute;
  top: 1%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 25px;
  color: blue;
  text-decoration: underline;
  color:#000!important;
}

/* Table styling */
#resultTable {
  font-family: 'Fredericka the Great', cursive;
  position: relative;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 27px;
  line-height: 1.6;
  text-align: left;
  color:#000!important;
  /* Table border */
  border: 2px solid #000;
  border-collapse: collapse;
}
#resultTable td {
  border: 1px solid #000;
  padding: 1px 20px; /* A little padding for aesthetics */
  text-align: center;
  color:#000!important;
}

/* ============== DOWNLOAD BUTTONS ============== */
#downloadButtons {
  text-align: center;
  margin-top: 20px;
}
#downloadPdfBtn,
#downloadImgBtn,
#printBtn {
  display: none; /* Will show via JS after generation */
  font-size: 24px;
  padding: 8px 16px;
  margin: 0 10px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  /* Gradient background */
  background: linear-gradient(45deg, #035c74, #0a7e2d);
  color: #fff;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  transition: 0.4s;
}
#downloadPdfBtn:hover,
#downloadImgBtn:hover,
#printBtn:hover {
  background: linear-gradient(45deg, #6dd5ed, #2193b0);
}

/* ============== RESPONSIVE SCALING ============== */
/* Only apply scaling on screens, not on print */
@media screen and (min-width:550px) and (max-width: 700px) { 
  #mobileUse {
    transform: scale(0.8);
    transform-origin: top left;
    width: 200%; /* Compensates for the scaling effect */
    height: 200%; /* Ensures proper scaling */
  }
}
@media screen and (min-width:390px) and (max-width: 549px) {
  #mobileUse {
    transform: scale(0.6);
    transform-origin: top left;
    width: 200%;
    height: 200%;
  }
}
@media screen and (max-width: 389px) {
  #mobileUse {
    transform: scale(0.5);
    transform-origin: top left;
    width: 200%;
    height: 200%;
  }
}

/* For printing, remove scaling so it stays consistent on paper/PDF */
@media print {
  #mobileUse {
    transform: none !important;
    width: auto !important;
    height: auto !important;
  }
}
