
    body {
      font-family: Arial, sans-serif;
      background-color: #f8f8f8;
      margin: 0;
      padding: 0;
    }
    .container {
      width: 90%;
      margin: auto;
      padding: 20px;
      background: #fff;
      border: 5px solid maroon;
      border-radius: 10px;
    }
    .header {
      background: #5a6872;
      color: white;
      text-align: center;
      padding: 10px;
      font-size: 20px;
      font-weight: bold;
    }
    .experiment-area {
      display: flex;
      justify-content: space-between;
      margin-top: 20px;
    }
    .display-area {
      width: 70%;
      height: 400px;
      background: white;
      border: 2px solid maroon;
      border-radius: 5px;
      position: relative;
      overflow: hidden;
    }
    .controls {
      width: 25%;
      display: flex;
      flex-direction: column;
      gap: 10px;
      align-items: center;
    }
.instructions-panel {
  margin-top: 10px;
  background: #f2f6f9;
  border: 2px solid #5a6872;
  border-radius: 8px;
  padding: 10px;
  height: 140px;          /* fixed box height */
  overflow-y: auto;      /* enables scrolling */
  font-size: 14px;
}

.instructions-panel h3 {
  text-align: center;
  margin-bottom: 8px;
  color: #5a6872;
}

.instructions-panel ol {
  padding-left: 18px;
}

.instructions-panel li {
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  .instructions-panel {
    height: 160px;
    font-size: 13px;
  }
}




    button {
      padding: 10px;
      font-size: 14px;
      border: none;
      cursor: pointer;
      border-radius: 5px;
      position: relative;
      width: 100%;
    }
    button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    .table-btn { background: lightblue; }
    .particle-btn { background: orange; }
    .speed-btn { background: lightgreen; }
    .start { background: yellow; }
    .reset { background: pink; }
    .message-box {
      background: maroon;
      color: white;
      padding: 10px;
      font-family: monospace;
      margin-top: 10px;
    }
    .input-box {
      padding: 10px;
      font-size: 14px;
      width: calc(100% - 22px);
      border-radius: 5px;
      border: 1px solid maroon;
    }
    canvas {
      width: 100%;
      height: 100%;
    }
    table {
      width: 70%;
      margin: 20px auto;
      border-collapse: collapse;
    }
    th, td {
      padding: 10px;
      margin: 20px;
      text-align: center;
      border: 1px solid #ddd;
    }
    th {
      background-color: #f2f2f2;
    }
    .image-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: none;
      justify-content: center;
      align-items: center;
      background: rgba(255, 255, 255, 0.8);
    }
    .image-overlay img {
      max-width: 100%;
      max-height: 100%;
      cursor: pointer;
    }
    .popup {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: white;
      padding: 20px;
      border: 2px solid maroon;
      border-radius: 10px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      z-index: 1000;
      display: none;
    }
    .table_container {
    display: flex;
    justify-content:center; /* Centers the tables */
   /* gap: 10px;  Adds space between tables */
}

.table {
    border: 1px solid black;
    padding: 5px;
    margin: 10px;
    width: 50%;
}



@media screen and (max-width: 768px) {
  .experiment-area {
    flex-direction: column;
    align-items: center;
  }

  .display-area,
  .controls {
    width: 100%;
    margin-bottom: 20px;
  }

  .controls {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  button {
    width: 45%;
    margin: 5px 0;
  }

  table {
    width: 100%;
  }

  .table_container {
    flex-direction: column;
    align-items: center;
  }

  .table {
    width: 90%;
  }
}

@media screen and (max-width: 480px) {
  .header {
    font-size: 16px;
    padding: 8px;
  }

  button {
    font-size: 12px;
    padding: 8px;
  }

  .input-box {
    font-size: 12px;
  }
}

