:root {
    
     --primary-bg: #000000;
     --primary-gain: #ef482b;
    --shadow-light: #7aadb0;
    --shadow-dark: #5d7e80;
    --accent-color: #005dc1;
    --text-primary: #eeeeee;
    --text-gain-cyan:  #8cc4c8;

      --border-size: 1px;
  --animation-speed: 7s;

              --bar-graph-primary-color: #8cc4c8;
            --bar-graph-secondary-color: #40888d;
            --bar-graph-background: #121212;
            --bar-graph-neumorphic-light: #1e1e1e;
            --bar-graph-neumorphic-dark: #0a0a0a;
            --bar-graph-text-color: #e0e0e0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    overflow-x: hidden;
line-height: 1.5;
}

 
.disabled-opacity {
    opacity: .5;
}

a:link {
  text-decoration: none !important;
  color:var(--text-primary);
}

a:visited {
  text-decoration: none !important;
  color:var(--text-primary);
}

a:hover {
  text-decoration: underline !important;
  color:var(--text-primary);
}

a:active {
  text-decoration: underline !important;
  color:var(--text-primary);
}

/* Neumorphic Styles */
.neumorphic {
    background: var(--primary-bg);
    border-radius: 20px;
    box-shadow: 9px 9px 16px var(--shadow-dark),
                -9px -9px 16px var(--shadow-light);
}

.neumorphic-inset {
    background: var(--primary-bg);
    border-radius: 20px;
    box-shadow: inset 3px 3px 5px var(--shadow-dark),
                inset -3px -3px 5px var(--shadow-light);
}

.text-gain{ 
    color: var(--text-gain-cyan);
    line-height: 1.2;
}
.text-gain li{ 
    color: var(--text-gain-cyan);
    line-height: 1.2;
}
 

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 3px 10px rgba(186, 186, 186, 0.491);
}

/* iPhone-style Toggle 120 44 */
.iphone-toggle {
    position: relative;
    display: inline-block;
    width: 174px; /* 184 */
    height: 32px;
}

.iphone-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    background: var(--primary-bg);
    border-radius: 22px;
  

    transition: .4s;
/* ADDED */
     font-size: 14px;
    font-weight: 500;
    color:#8cc4c8;
    padding:1px 3px;
        box-shadow: inset 2px 2px 4px var(--shadow-dark),
                inset -1px -1px 4px var(--shadow-light);


}

.float-image {
    position: absolute;
    right: 0;
    top: 50px;
    width: 30%;
    opacity: 0.3;
    z-index: 1;
}
 
 



.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 71px;
    left: 4px;
     
    bottom: 4px;
    background: var(--primary-bg);
    border-radius: 24px;
    box-shadow: 2px 2px 4px var(--shadow-dark),
                -1px -1px 4px var(--shadow-light);
    transition: .4s;
}
 

input:checked + .slider:before {
    transform: translateX(70px); /* 80 */
    width: 96px;
}

.mobile-label, .stationary-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 500;
}

.mobile-label { right: 15px; }
.stationary-label { left: 15px; }

/* Stationary Mode Viewfinder */
.stationary-view {
    position: relative;
    width: 100%;
    margin: 20px 0;
}

.mode-indicator{
 width:100%;
text-align: left;
}

.camera-feed {
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
}

.camera-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.status-overlay {
    position: absolute; 
    bottom: 0;
    right: 0;
   width: 100vw;
   
    background: rgba(0, 145, 255, 0.6);
    backdrop-filter: blur(3px); 
    padding: 20px;
    color: white;
    z-index:10;
}

.status-panel h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 700;
    padding:0 0 6px 0;
    border-bottom: 1px solid #ffffff75;
    
}

.status-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 14px;
}

.status-item .value {
    display: flex;
    
 
    font-weight: 900;
    font-size: 16px;
}


.table-item {
    
    margin: 8px 0 0px 0;
    font-size: 14px;
}

.table-item .value {
    font-weight: 900;
    font-size: 16px;
}

.sensor-icons {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    
}

.sensor-icon {
    font-size: 20px;
    opacity: 0.8;
    
}




.icon {
  opacity: 1;
  animation-iteration-count: infinite;
}

/* Random delays between 3-8s AND different cycle durations */
.icon:nth-child(1) { 
  animation-delay: 3s; 
  animation-name: flickerA; 
  animation-duration: 12s; /* 3s delay + 9s cycle */
}
.icon:nth-child(2) { 
  animation-delay: 1s; 
  animation-name: flickerB; 
  animation-duration: 10s; /* 6s delay + 4s cycle */
}
.icon:nth-child(3) { 
  animation-delay: 4s; 
  animation-name: flickerC; 
  animation-duration: 14s; /* 4s delay + 10s cycle */
}
.icon:nth-child(4) { 
  animation-delay: 7s; 
  animation-name: flickerD; 
  animation-duration: 11s; /* 7s delay + 4s cycle */
}
.icon:nth-child(5) { 
  animation-delay: 2s; 
  animation-name: flickerA; 
  animation-duration: 13s; /* 5s delay + 8s cycle */
}
.icon:nth-child(6) { 
  animation-delay: 8s; 
  animation-name: flickerB; 
  animation-duration: 9s;  /* 8s delay + 1s cycle */
}
.icon:nth-child(7) { 
  animation-delay: 3.5s; 
  animation-name: flickerC; 
  animation-duration: 15s; /* 3.5s delay + 11.5s cycle */
}
.icon:nth-child(8) { 
  animation-delay: 6.5s; 
  animation-name: flickerD; 
  animation-duration: 16s; /* 6.5s delay + 9.5s cycle */
}

/* Different flicker patterns with varied timing */
@keyframes flickerA {
  /* 12s total: 9s pause, 3s animation */
  0%, 75% { opacity: 1; }
  76% { opacity: 0.4; }
  78% { opacity: 0.9; }
  80% { opacity: 0.4; }
  82% { opacity: 0.8; }
  84% { opacity: 0.4; }
  86% { opacity: 0.7; }
  88% { opacity: 0.4; }
  90%, 100% { opacity: 1; }
}

@keyframes flickerB {
  /* 10s total: 7s pause, 3s animation */
  0%, 70% { opacity: 1; }
  71% { opacity: 0.7; }
  73% { opacity: 0.4; }
  75% { opacity: 0.9; }
  77% { opacity: 0.4; }
  79% { opacity: 0.6; }
  81% { opacity: 0.4; }
  83% { opacity: 0.8; }
  85%, 100% { opacity: 1; }
}

@keyframes flickerC {
  /* 14s total: 11s pause, 3s animation */
  0%, 78% { opacity: 1; }
  79% { opacity: 0.4; }
  81% { opacity: 0.8; }
  83% { opacity: 0.4; }
  85% { opacity: 0.9; }
  87% { opacity: 0.4; }
  89% { opacity: 0.6; }
  91% { opacity: 0.4; }
  93%, 100% { opacity: 1; }
}

@keyframes flickerD {
  /* 11s total: 8s pause, 3s animation */
  0%, 72% { opacity: 1; }
  73% { opacity: 0.4; }
  75% { opacity: 0.7; }
  77% { opacity: 0.4; }
  79% { opacity: 0.9; }
  81% { opacity: 0.4; }
  83% { opacity: 0.5; }
  85% { opacity: 0.8; }
  87%, 100% { opacity: 1; }
}


.counter-pulse {
    animation: counterPulse 1s ease-in-out;
}

@keyframes counterPulse {
    0% { 
        opacity: 0.2;
        transform: scale(0.95);
    }
    50% { 
        opacity: 1;
        transform: scale(1.05);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
    }
}













/* Lightbox Alert */
/* Lightbox Styles */

 
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}
 

.lightbox-content {
    background: #fefefe;
    padding: 30px 30px 24px 30px;
    border-radius: 20px;
    max-width: 390px;
    width: 89%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.221);
}
  





 





.rainbow-lightbox {

  position: relative;
  padding: 0.8em 1em; /* Adjust padding as needed */
  border: 0px solid #000;
  background: #ff4800;
  cursor: pointer;
  overflow: hidden; /* Important to contain the pseudo-element */
  border-radius: 20px; /* Optional: for rounded corners */
  margin: 0 20px 10px 20px;
   min-width: calc(50vw - 20px);
   
   
}

.rainbow-lightbox-lift {
  position: relative;
  z-index: 5000; /* Ensure text is above the border */
  padding: 20px 20px 18px 20px;
}


.rainbow-lightbox::before {
  content: "";
  position: absolute;
  top: calc(var(--border-size) * -1);
  left: calc(var(--border-size) * -1);
  right: calc(var(--border-size) * -1);
  bottom: calc(var(--border-size) * -1);
  background: conic-gradient(
    #fd004c,
    #fe9000,
    #fff020,
    #3edf4b,
    #3363ff,
    #b102b7,
    #fd004c /* Repeat the first color for a smooth loop */
  );
  z-index: 1; /* Place behind the button content */
  animation: rotateRainbow var(--animation-speed) linear infinite;
  border-radius: 18px; /* Match button's border-radius */
}

/* Inner element to create the "border" effect */
.rainbow-lightbox::after {
  content: "";
  position: absolute;
  top: var(--border-size);
  left: var(--border-size);
  right: var(--border-size);
  bottom: var(--border-size);
  background-color: #fdfdfdb4; /*  Inner button background color */
  backdrop-filter: blur(30px); 
  z-index: 2; /* Place above the gradient but below the text */
  border-radius: 18px; /* Match button's border-radius */
}

 





























.clearAlert {
    display:none;
}
.clearAlert.active {
    display: flex;
}




.alert-title h3 {
    color: var(--primary-gain);
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: 700;
 
    
}

.alert-message {
    line-height: 1.5;
    margin: 6px 0 15px 0;
    text-align: left;
    color:#000;
    white-space: pre-line;
}

.alert-one {
    line-height: 1.0;
     margin: 6px 0 0px 0;
    text-align: left;
      font-weight: 700;
    
}

.alert-time {
    font-size: 0.5em;
    color: #666;
    margin: 10px 0 -20px 0;
    font-style: italic;
}

.btn-close {
display: flex;
    justify-content: flex-end; /* Aligns child to right */
    align-items: flex-start;  /* Aligns child to top */
    width: 100%;
}

.btn-close:hover {
    opacity: 0.8;
    text-decoration: none;
}

.btn-acknowledge {
    background: #005dc1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 4px;
}

.btn-acknowledge:hover {
    opacity: 0.8;
    text-decoration: none;
}

.btn-primary {
    background:#005dc1 !important;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    margin: 4px 5px 2px 5px;
    
}

.btn-primary:link, .btn-primary:visited {
    color:#fff;
    text-decoration: none !important;
}

.btn-primary:hover {
    opacity: 0.8;
    text-decoration: none !important;
}


.btn-secondary {
    background: #01a906;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    margin: 4px 5px 2px 5px;
}

.btn-secondary:link, .btn-secondary:visited {
    color:#fff;
    text-decoration: none !important;
}
.btn-secondary:hover {
    opacity: 0.8;
    text-decoration: none !important;
}

/*

    .gain-tiles {
      display: flex;  
      width: 100%;  
      
    }
*/
/*
    .gain-tile {
     
    min-height: 7svh;
 
    font-weight: 500;
    color:#8cc4c8;
    padding:15px;
    margin:1px;
    background: #0000006e;
    z-index: 100;
    border-radius: 12px;
    box-shadow: inset 1px 1px 2px var(--shadow-dark);
    }
*/

 

    .gain-tile {
    flex: 1;
    min-height: 7svh;
    font-size: 14px;
    font-weight: 500;
    color:#8cc4c8;
    padding:15px;
    margin:2px;
    background: #00000091;
    border-radius: 22px;
    box-shadow: inset 1px 1px 2px var(--shadow-dark);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    backdrop-filter: blur(2px); 
}

    
    .gain-tile span{
       font-size: 19px;
    font-weight: 900;
    }

    .gain-left-line {
    border-left:2px #364a4bff solid;
    
    padding:20px 0 30px 20px;   
    background: linear-gradient(to right, #364a4b51 0%, transparent 50%);
    border-radius: 20px 0 0 20px;
    margin:20px 0 20px 0px;
    width: 100vw;
    }


    .global-star{
margin:-32px 0 0 0;
        float:right;
        color: var(--text-gain-cyan);
        font-size:12px;
    }

    .stationary-cont {
        
    height: 100vh; /* Start with full viewport height */
    overflow: hidden; /* Prevent content from affecting height */
    color:#ccc;
     
 /*   display:none; */
}


/* Menu System */
.side-menu {
    position: fixed;
    top: -1px;
    left: -330px;
    width: 300px;
    height: 100%;
    background: var(--primary-bg);
    z-index: 1500;
    transition: left 0.3s ease;
    box-shadow: 2px 2px 30px var(--shadow-dark);
    padding: 20px; 
     border-top: 1px #333 solid;
}

.menu-items{

    padding: 24px; 
    line-height: 3.5;
        list-style-type: none;
        text-decoration: none;
        color:#000;
}
.menu-items li{
 border-bottom: 1px #333 solid;
 
}

.side-menu.active {
    left: 0;
}
 
 

.menu-toggle  {
     font-size: 14px;
    font-weight: 500;
    color:#8cc4c8;
    padding:4px 15px;
    background: var(--primary-bg);
    border-radius: 22px;
    box-shadow: inset 2px 2px 4px var(--shadow-dark),
                inset -1px -1px 4px var(--shadow-light);
  
}


/* Main Content */
.main-content {
    background-color: #000;
    position: absolute; 
    margin-top: 60px;
    padding: 20px;
    z-index: 300 !important;
    
}

.view {
    display: none;
    
}

.view.active {
    display: block;
    background-color: #000;
    min-height: 100vh;
    
     
}

/* Landscape Mode for Stationary View */
@media (orientation: landscape) and (max-height: 600px) {
    .stationary-view {
        height: calc(100vh - 80px);
    }
    
    .camera-feed {
        height: 100%;
    }
}




.rainbow-button {

  position: relative;
  padding: 0.8em 1em;  
  border: 2px solid #000;
  background: #192627;
  cursor: pointer;
  overflow: hidden; /* Important to contain the pseudo-element */
  border-radius: 20px;  
  margin: 0 20px 10px 20px;
   min-width: calc(50vw - 20px);
   
   
}

.rainbow-button span {
  position: relative;
  z-index: 5; /* Ensure text is above the border */
  color: var(--text-gain-cyan); /* Text color */
  font-family: sans-serif;
  font-size: 14px;
 
}
#alert-list {
  position: relative;
  z-index: 5; /* Ensure text is above the border */
  color: var(--text-gain-cyan); /* Text color */
  font-size:14px;
  font-family: sans-serif;
 
}

.rainbow-button::before {
  content: "";
  position: absolute;
  top: calc(var(--border-size) * -1);
  left: calc(var(--border-size) * -1);
  right: calc(var(--border-size) * -1);
  bottom: calc(var(--border-size) * -1);
  background: conic-gradient(
    #fd004c,
    #fe9000,
    #fff020,
    #3edf4b,
    #3363ff,
    #b102b7,
    #fd004c /* Repeat the first color for a smooth loop */
  );
  z-index: 1; /* Place behind the button content */
  animation: rotateRainbow var(--animation-speed) linear infinite;
  border-radius: 18px; /* Match button's border-radius */
}

/* Inner element to create the "border" effect */
.rainbow-button::after {
  content: "";
  position: absolute;
  top: var(--border-size);
  left: var(--border-size);
  right: var(--border-size);
  bottom: var(--border-size);
  background-color: #000000be; /*  Inner button background color */
  backdrop-filter: blur(30px); 
  z-index: 2; /* Place above the gradient but below the text */
  border-radius: 18px; /* Match button's border-radius */
}

@keyframes rotateRainbow {
  to {
    transform: rotate(360deg);
  }
}

/* rainbow letters */
#rainbow-js .rainbow-letter {
  display: inline-block;
  font-size: 18px;
  color: white; /* default state */
  opacity: 1;
  background: none;
  transition: color 1.0s ease;
}

@keyframes rainbowSweep {
  0% {
    background-position: 200% 0;
    opacity: 1;
  }

  100% {
    background-position: -200% 0;
    opacity: 1;
  }
}




.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
   /* border-bottom: 1px solid #707070;
    border-top: 1px solid #707070; */
    background-color: #1c1c1c;
     
    border-radius: 10px;
    border: 1px solid #323232;
    margin: 0 0 8px 0;
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: left;
    width: 100%;
    cursor: pointer;
}

.status-enabled {
     
    color: #4CAF50;
    font-weight: bold;
    align-items: right;
    
}

.status-disabled {
   
    color: #f44336;
    font-weight: bold;
    align-items: right;
    
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    z-index:30;
}

.toggle-switch input {
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

.toggle-switch.disabled input {
    pointer-events: none;
}

.toggle-slider.disabled {
    pointer-events: none;
    opacity: 0.7; /* Optional: visual indicator that it's disabled */
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
     pointer-events: none;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #4CAF50;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

 
.satellite-loader {
     
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.satellite {
    font-size: 14px;
    padding:2px;
    opacity: 0.4;
    filter: grayscale(1) brightness(0.8);
    transform: scale(0.9);
    animation: satellitePulse 3.5s infinite;
}

.satellite:nth-child(1) { animation-delay: 0s; }
.satellite:nth-child(2) { animation-delay: 0.5s; }
.satellite:nth-child(3) { animation-delay: 1s; }
.satellite:nth-child(4) { animation-delay: 1.5s; }
.satellite:nth-child(5) { animation-delay: 2s; }
.satellite:nth-child(6) { animation-delay: 2.5s; }
.satellite:nth-child(7) { animation-delay: 3s; }

@keyframes satellitePulse {
    0%, 100% {
        opacity: 0.4;
        filter: grayscale(1) brightness(0.8);
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        filter: grayscale(0) brightness(1.2) drop-shadow(0 0 6px #5d7e80);
        transform: scale(1.1);
    }
}

.no-scroll {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
}

.no-alerts {font-size:14px;}

/* Extra small devices (phones, 576px and down) */
@media (max-width: 360px) {
  /* Styles for very small phones */
  .no-alerts {font-size:10px;}
}
 
 
       .bar-graph-title {
            color: var(--bar-graph-text-color);
          
            font-size: 12px !important;
            margin-bottom: 0px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .bar-graph-sub-title {
            font-size: 10px;
            color: var(--bar-graph-secondary-color);
            margin: 0px 0px -4px 0px;
        }

        .bar-graph-trend-indicator {
            width: 0;
            height: 0;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
        }

        .bar-graph-trend-up {
            border-bottom: 8px solid #2dc364;
        }

        .bar-graph-trend-down {
            border-top: 8px solid #ce3434;
        }

        .bar-graph-content {
            width:100%;
            display: flex;
            flex-direction: column;
            height: 30px;
        }

        .bar-graph-weekly-trend {
            height: 30px;
            width: 100%;
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            position: relative;
        }

        .bar-graph-bar-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            height: 30px;
            flex: 1;
            justify-content: flex-end;
            position: relative;
        }

        .bar-graph-bar {
            width: 4px;
            border-radius: 1px 1px 0 0;
            transition: all 0.3s ease;
            min-height: 5px;
        }

        .bar-graph-bar:hover {
            opacity: 0.8;
            transform: scaleY(1.05);
        }

        .bar-graph-month-label {
            font-size: 10.5px; /* 1.5x larger than original 7px */
            color: white;
            position: absolute;
            bottom: 0;
            text-shadow: 
                -1px -1px 0 #000,
                1px -1px 0 #000,
                -1px 1px 0 #000,
                1px 1px 0 #000;
            font-weight: bold;
            z-index: 10;
            pointer-events: none;
        }
 