    body {
      margin-top: 60px;
      font-family: 'Segoe UI', Arial, sans-serif;
      /*background: #f4f6fa url('images/UniversalFunctionGenerator.png') no-repeat center center fixed;*/
      background-size: 65%;
      min-height: 100vh;
    }
    .container {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
      padding: 12px 4px;
      max-width: 900px;
      margin: auto;
    }
    .panel {
      background: #fff;
      border-radius: 10px;
      box-shadow: 0 1px 6px rgba(0,0,0,0.07);
      padding: 12px 8px;
      flex: 1 1 0;
      min-width: 160px;
      max-width: 260px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .panel.image-panel {
      flex: 2 1 0;
      max-width: 600px;
      min-width: 260px;
    }
    .panel img {
      width: 338px;
      height: auto;
      max-width: 700px;
      border-radius: 8px;
      box-shadow: 0 1px 6px rgba(0,0,0,0.08);
      display: block;
      margin: 0px;
    }


    h2 {
      margin-top: 0;
      color: #2d3a4a;
      font-size: 1.1em;
      letter-spacing: 0.02em;
    }
    a {
      color: #1976d2;
      text-decoration: none;
      font-weight: 500;
      margin-bottom: 8px;
      font-size: 0.92em;
    }
    #controls {
      margin-bottom: 10px;
      width: 100%;
      display: flex;
      flex-direction: column;
      gap: 4px;
      align-items: flex-start;
    }
    button {
      background: #1976d2;
      color: #fff;
      border: none;
      border-radius: 5px;
      padding: 3px 10px;
      font-size: 0.95em;
      cursor: pointer;
      margin: 1px 0;
      transition: background 0.2s;
    }
    button:hover {
      background: #1256a3;
    }
    table {
      border-collapse: collapse;
      width: 100%;
      margin-top: 6px;
      background: #f8fafc;
      border-radius: 6px;
      overflow: hidden;
      font-size: 0.95em;
    }
    
    button:disabled {
      background: #e0e0e0 !important; /* Light gray */
      color: #888 !important;         /* Dim text */
      cursor: not-allowed;
      border: 0px solid #ccc;
    }
    
    td {
      border: 1px solid #e0e0e0;
      text-align: center;
      padding: 3px 1px;
    }
    tr:nth-child(odd) {
      background-color: #e3f2fd;
    }
    tr:nth-child(even) {
      background-color: #f1f8e9;
    }
    input[type="text"] {
      width: 100px;
      padding: 2px 3px;
      border: 1px solid #b0bec5;
      border-radius: 3px;
      margin-right: 3px;
      margin-left: 3px;
      font-size: 0.95em;
      text-align: center;
    }

    input[type="number"] {
      width: 60px;
      padding: 2px 3px;
      border: 1px solid #b0bec5;
      border-radius: 3px;
      margin-right: 3px;
      margin-left: 3px;
      font-size: 0.95em;
      text-align: center;
    }
    
    #outmess, #readings {
      font-size: 0.92em;
      color: #333;
      background: #f0f0f0;
      border-radius: 3px;
      padding: 1px 3px;
      margin: 1px 0;
    }
    @media (max-width: 900px) {
      .container {
        flex-direction: column;
        gap: 8px;
        padding: 8px 2px;
      }
      .panel {
        max-width: 100%;
      }
    }
      .bottom-nav {
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100vw;
      background: #1976d2;
      color: #fff;
      display: flex;
      justify-content: center;
      gap: 32px;
      padding: 10px 0 8px 0;
      z-index: 100;
    }
    .bottom-nav a {
      color: #fff;
      text-decoration: none;
      font-weight: 500;
      font-size: 1em;
      transition: color 0.2s;
    }
    .bottom-nav a:hover {
      color: #ffeb3b;
    }
      
    .nav-btn {
      background-color: #4CAF50;
      color: white;
      border: none;
      padding: 10px 20px;
      text-decoration: none;
      display: inline-block;
      font-size: 14px;
      margin: 4px 2px;
      cursor: pointer;
      border-radius: 4px;
      transition: background-color 0.3s;
    }

    .nav-btn:hover {
    background-color: #45a049;
    }
    
    .top-nav {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      background: #1976d2;
      color: #fff;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 15px;
      padding: 10px 15px 8px 15px;
      z-index: 100;
      box-sizing: border-box;
    }
    .nav-buttons {
      display: flex;
      gap: 10px;
      margin-left: auto;
      flex-shrink: 0;
    }
    .nav-buttons button {
      background: #fff;
      color: #1976d2;
      border: none;
      border-radius: 5px;
      padding: 8px 16px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.2s, color 0.2s;
    }
    .nav-buttons button:hover {
      background: #ffeb3b;
      color: #1976d2;
    }
    .top-nav h2 {
      margin: 0;
      margin-left: 20px;
      color: #e3e7eb;
      font-size: 1.1em;
      letter-spacing: 0.02em;
      flex-shrink: 1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .top-nav #urllabel {
      flex-shrink: 1;
      font-size: 0.9em;
      color: #fff;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 300px;
    }
    .top-nav .nav-btn {
      margin-left: auto;
      background: #fff;
      color: #1976d2;
      border: none;
      border-radius: 5px;
      padding: 5px 16px;
      font-size: 1em;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.2s, color 0.2s;
    }
    .top-nav .nav-btn:hover {
      background: #ffeb3b;
      color: #1976d2;
    }
    /* button color*/
   .top-nav .nav-btn {
    margin-left: auto;
    background: #1976d2;   /* Green background */
    color: #fff;           /* White text */
    border: none;
    border-radius: 5px;
    padding: 5px 16px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
  }
  .top-nav .nav-btn:hover {
    background: #388e3c;   /* Darker green on hover */
    color: #fff;
  }

  h2{
    margin-top: 0;
    margin-left: 20px;
    color: #e3e7eb;
    font-size: 1.1em;
    letter-spacing: 0.02em;
  }

  
/* Styles for the popup */
.popup {
  position: fixed;
  /*top: 350px;
  left: 500px;*/
  width: 165px;
  height: 115px;
  padding: 5px;
  font-size: 12px;
  border-radius: 5px;
  border: 1px solid rgb(32, 156, 79);
      /*transform: translate(-50%, -50%);*/
  background-color: #a19b9b; 
  /*z-index: 2;*/
} 

.sbut
{margin-top:20px;
margin-left:100px;
font-size: 12px;  
}

/* 2x2 Image Grid Styles */
.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 50px;
  width: 100%;
  max-width: 960px;
  margin: 5px auto 20px auto;
  padding: 150px;
  justify-content: center;
}
/* image sizes */
.grid-image {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4/2 !important;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: none !important;
  display: block;
  margin: 0px;
}

/* Image item container styles */
.image-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 50px;
  opacity: 0 !important;
  transition: opacity 1s ease-in-out;
  visibility: visible;
}

.image-item.show {
  opacity: 1 !important;
}

/* Text below images */
.image-text {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 20px !important;
  font-weight: 500;
  color: #333 !important;
  text-align: center;
  padding: 5px;
  background: #64a15f !important;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.grid-image:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .image-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    max-width: 40%;
    gap: 10px;
  }
  
  .grid-image {
    height: 150px;
  }
}

.image-text
{
  font-size: 20px !important;
  color: #333;
  background: #f0f0f0;
  border-radius: 3px;
  padding: 1px 3px;
  margin: 1px 0;
}

