    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    #mobile-blocker {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100dvw;
      height: 100dvh;
      background-color: #000;
      z-index: 9999;
      color: white;
      font-family: sans-serif;
      justify-content: center;
      align-items: center;
      text-align: center;
      padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
    
    #mobile-blocker.active {
      display: flex;
      flex-direction: column;
    }
    
    .mobile-content img.sad-sun {
      max-width: 150px;
      margin-bottom: 20px;
    }
    
    
    
    .mobile-blocker-content {
      padding: 2em;
    }
    
    @media (max-width: 600px), (max-height: 600px) {
      #mobile-blocker {
        display: block;
      }
    
      #app-container {
        display: none;
      }
    }
    

    html, body {
      height: 100dvh;
      width: 100%;
      max-width: 100dvw;
      font-family: Arial, sans-serif;
      overflow:hidden;
      margin: 0;
      padding: 0;
      background-color: black;
    
    }

    #app-container {
      display: flex;
      flex-direction: column;
      height: 100dvh;
    }

    /* --------------- Top 75% --------------- */

    #main-content {
      position: relative;
      flex: 0 0 75%;
      display: flex;
      flex-direction: column;
    }

    #polling-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    pointer-events: none;
  }

  #polling-overlay img {
    width: 180px;
    opacity: 0.8;
    filter: drop-shadow(0 0 20px gold);
  }

  /****************** NAVIGATION BAR ******************/
  
  #navbar {
        height: 40px;
        background-color: #1f2937;
        color: white;
        display: flex;
        align-items: center;
        padding: 0 20px;
    }

    .nav-title {
        font-weight: bold;
        font-size: 20px;
        margin-right: auto;
    }
    
    .nav-links a {
        color: white;
        text-decoration: none;
        margin-left: 20px;
        font-size: 16px;
        transition: color 0.3s ease;
    }
    
    .nav-links a:hover {
        color: #facc15;
    }
    
    /* Overlay */
    .overlay {
        position: fixed;
        top: 40px;
        left: 0;
        width: 100%;
        height: calc(100% - 40px);
        background-color: rgba(0,0,0,0.8);
        z-index: 1000;
        display: flex;
        justify-content: center;
        align-items: start;
        padding: 40px;
    }
    
    .overlay-content {
        background-color: #1f2937;
        color: white;
        padding: 30px;
        border-radius: 10px;
        max-width: 800px;
        width: 100%;
    }
    
    .closebtn {
        color: #f87171;
        float: right;
        font-size: 28px;
        font-weight: bold;
        cursor: pointer;
    }
    
    .hidden {
        display: none;
    }

    .clickable-icon img {
      transition: transform 0.2s ease, opacity 0.2s ease;
      cursor: pointer;
    }
    
    .clickable-icon img:hover {
      transform: scale(1.05);
      opacity: 0.85;
    }

    .clickable-icon img:hover {
      box-shadow: 0 0 6px #5ccaff;
      border-radius: 6px;
    }
    
    

    #wavelength-popup{
      display: none;
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 600px;
      max-width: 90%;
      background: #222;
      color: #ccc;
      padding: 20px;
      border-radius: 10px;
      z-index: 9999;
      box-shadow: 0 0 10px rgba(0,0,0,0.5);
    }

 /****************** SIDE/MENU BAR ******************/
    #content-row {
      flex: 1;
      display: flex;
    }

    #sidebar {
      width: 250px;
      background-color: #f4f4f4;
      padding: 10px;
      border-right: 1px solid #ccc;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background-color: #1f2329 !important;
        border-color: #333 !important;
        color: #ffffff;
        padding-left: 20px;

    }

      .upload-label {
  background-color: #222;
  border: 1px solid #444;
  padding: 8px 16px;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  animation: pulse-green 1s infinite;
  transition: box-shadow 0.1s ease-in-out;
}
.upload-label:hover {
  background-color: #333;
}

.upload-label.disabled {
  background-color: #444;
  color: #888;
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
  animation: none !important;  
  box-shadow: none !important; 
}

@keyframes pulse-orange {
  0% {
    box-shadow: 0 0 0 0 rgba(249, 168, 38, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(249, 168, 38, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(249, 168, 38, 0);
  }
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(57, 255, 20, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(57, 255, 20, 0);
  }
}

  .fitsFilesOverlay {
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  height: 50dvh;
  color: #0f0;
  z-index: 10;
  pointer-events: auto;
  border-radius: 8px;
  margin: 0;
  font-family: monospace;
  font-size: 0.9em;
  white-space: pre;             
  overflow-x: auto;             
}

    .fitsFilesOverlay::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    .fitsFilesOverlay::-webkit-scrollbar-thumb {
      background: #888;
      border-radius: 6px;
    }
  
    #fitsFileList{
      box-shadow: 0 0 12px rgba(249, 168, 38, 0.3);
    }

    #fitsButtonRow{
      margin-right: 10px;
    }
    
    .download-button {

        padding: 6px 12px;
        font-size: 14px;
        background-color: #f9a826;
        color: #000;
        border: none;
        border-radius: 5px;
        margin-right: 10px;

    }

    .download-button:hover {
        background-color: #ffc733;
    }

    
    button:disabled,
    .download-button:disabled {
        background-color: #cccccc !important;
        color: #666666 !important;
        cursor: not-allowed;
        border: 1px solid #aaa;
    }

    .submitBtn{
      animation: pulse-green 1s infinite;
      transition: box-shadow 0.1s ease-in-out;
    }
    
    input:disabled {
        background-color: #f0f0f0;
        color: #999999;
        border: 1px solid #ccc;
        cursor: not-allowed;
        opacity: 1; 
    }  

    .info {
        color: #f1f1f1;
        font-size: 13px;
        background-color: #1f2937;
        line-height: 1.5;

    }

    .pulse-glow {
      animation: pulse 2s infinite;
      border-radius: 50%;
      box-shadow: 0 0 0 rgba(255, 255, 255, 0.7);
    }
    
    @keyframes pulse {
      0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
      }
      70% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
      }
      100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
      }
    }
    
 
  /****************** MAIN SECTION ******************/
    #main-panels {
      flex: 1;
      display: flex;
      flex-direction: column;
      background-color: #1f2329 !important;
      justify-content: center;
      align-items: center;
    }

    #panel-wrapper {
      display: flex;
      flex: 1;
      gap: 10px;
      height: 65dvh;
      justify-content: center;
      align-items: center;

    }

        .column {
        flex: 1;
        border-radius: 8px;
        padding: 10px;
        justify-content: center;
  align-items: center;
    }

        .panel-label {
       padding: 6px 10px;
        border: 1px solid #ccc;
        border-bottom: none;
        border-radius: 8px 8px 0 0;
        background-color: #2e3440 !important;
        color: #f9a826;
        border-color: #3c3f46;
        font-size: 9px;
        letter-spacing: 1px;
    }

    .tab-btn-image-container {
  display: inline-flex;
  gap: 8px;
  margin-left: 20px;
  vertical-align: middle;
}

.tab-btn-image {
  background-color: #3c3f46;
  color: #f9a826;
  border: 1px solid #555;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.tab-btn-image:hover {
  background-color: #555;
}

.tab-btn-image.active {
  background-color: #f9a826;
  color: #1f2329;
}


    .panel {
        justify-content: center;
  align-items: center;
        color: #ffffff;
      box-sizing: border-box;
      /*height: 65vh;*/
      object-fit: contain;

    }


    .video-placeholder video {
        flex: 1;
        max-width: 100%;
        max-height: auto;
        object-fit: contain;
        display: block;
        margin: 0 auto;
        box-shadow: 0 0 12px rgba(249, 168, 38, 0.3);
        border-radius: 6px;
    }

        .picHolder{
        flex: 1;
        max-width: 100%;
        max-height: auto;
        object-fit: contain;
        display: block;
        margin: 0 auto;
        box-shadow: 0 0 12px rgba(249, 168, 38, 0.3);
        border-radius: 6px;
    }

    .picHolder{
        flex: 1;
        max-width: 100%;
        max-height: auto;
        object-fit: contain;
        display: block;
        margin: 0 auto;
        box-shadow: 0 0 12px rgba(249, 168, 38, 0.3);
        border-radius: 6px;
    }




    .tab-btn-container {
  display: inline-flex;
  gap: 8px;
  margin-left: 20px;
  vertical-align: middle;
}

.tab-btn {
  background-color: #3c3f46;
  color: #f9a826;
  border: 1px solid #555;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.tab-btn:hover {
  background-color: #555;
}

.tab-btn.active {
  background-color: #f9a826;
  color: #1f2329;
}




    .container {
      position: relative;
      
    }


    #headerImage {

      max-width: 100%;
        object-fit: contain;
        display: block;
        margin: 0 auto;
        box-shadow: 0 0 12px rgba(249, 168, 38, 0.3);
        border-radius: 6px;
    }


.headerOverlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  color: #0f0;
  z-index: 10;
  pointer-events: auto;
  border-radius: 8px;
  margin: 0;
  font-family: monospace;
  font-size: 0.9em;
  white-space: pre;             
  overflow-x: auto;             
}

    .headerOverlay::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    .headerOverlay::-webkit-scrollbar-thumb {
      background: #888;
      border-radius: 6px;
    }


    .video-placeholder2 video {
        flex: 1;
        max-width: 100%;
        max-height: auto;
        object-fit: contain;
        display: block;
        margin: 0 auto;
        box-shadow: 0 0 12px rgba(249, 168, 38, 0.3);
        border-radius: 6px;
    }

    #controls {
      margin-top: 10px;
      flex-shrink: 0;
      text-align: center;
      padding: 10px;
    }
    #controls button {
        padding: 6px 12px;
        font-size: 14px;
        background-color: #f9a826;
        color: #000;
        border: none;
        border-radius: 5px;
        transition: 0.3s;
        margin-right: 10px;
    }
    #controls button:hover {
        background-color: #ffc733;
    }

    /* --------------- Bottom 25% --------------- */
    
    #terminal {
      flex: 1;
      background-color: #000;
      color: #39ff14;
      font-family: monospace;
      overflow-y: auto;
      border-top: 2px solid #39ff14;
        height: 25dvh;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    #terminal-scroll-wrapper {
      flex: 1;
      overflow-y: auto;
      padding-right: 10px;
    }
    
    #terminal-scroll-wrapper::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }
    #terminal-scroll-wrapper::-webkit-scrollbar-thumb {
      background: #888;
      border-radius: 6px;
    }

    .blinking-cursor {
        animation: blink 1s steps(2, start) infinite;
        color: lime;
      }
      
      @keyframes blink {
        to {
          visibility: hidden;
        }
      }





