:root {
  /* Transparent opacity values for a clean, realistic glass effect */
  --lg-bg-color: rgba(255, 255, 255, 0.05);
  --lg-highlight: rgba(255, 255, 255, 0.25);
  --lg-text: #ffffff;
}

body {
  background: #0f2027;
  /* Fallback background for older browsers */
  background: -webkit-linear-gradient(to right, #0f2027, #203a43, #2c5364);
  /* Prefixed version for Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
  /* Standard syntax: works in all modern browsers (Chrome, Firefox, Edge, Safari) */
}

/* =========================================
   Custom Submarine Theme Loader Animation
   Used on the fullscreen #preloader shown while the page is loading.
   9 small squares (#sq1 - #sq9, added in the HTML) form a 3x3 grid and
   fade in/out on a staggered delay to create a pulsing loader effect.
   ========================================= */

.loader-container {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes loader_5191 {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.square {
  background: #ddd;
  width: 10px;
  height: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -5px;
  margin-left: -5px;
}

/* Each square below is positioned into one cell of a 3x3 grid via
   margin-top/margin-left offsets, and animates with an increasing delay
   (0ms, 75ms, 150ms...) so they fade in/out one after another */
#sq1 {
  margin-top: -25px;
  margin-left: -25px;
  animation: loader_5191 675ms ease-in-out 0s infinite alternate;
}

#sq2 {
  margin-top: -25px;
  animation: loader_5191 675ms ease-in-out 75ms infinite alternate;
}

#sq3 {
  margin-top: -25px;
  margin-left: 15px;
  animation: loader_5191 675ms ease-in-out 150ms infinite;
}

#sq4 {
  margin-left: -25px;
  animation: loader_5191 675ms ease-in-out 225ms infinite;
}

#sq5 {
  animation: loader_5191 675ms ease-in-out 300ms infinite;
}

#sq6 {
  margin-left: 15px;
  animation: loader_5191 675ms ease-in-out 375ms infinite;
}

#sq7 {
  margin-top: 15px;
  margin-left: -25px;
  animation: loader_5191 675ms ease-in-out 450ms infinite;
}

#sq8 {
  margin-top: 15px;
  animation: loader_5191 675ms ease-in-out 525ms infinite;
}

#sq9 {
  margin-top: 15px;
  margin-left: 15px;
  animation: loader_5191 675ms ease-in-out 600ms infinite;
}

/* =========================================
   Pure Liquid Glass Effect & Layers
   Reusable "frosted glass" component. In the HTML, wrap content like this:
     <div class="liquid-glass">
       <div class="glass-filter"></div>    (blur + SVG distortion, needs #lg-dist filter defined once per page)
       <div class="glass-overlay"></div>   (semi-transparent tint)
       <div class="glass-specular"></div>  (thin bright highlight around the edge)
       <div class="glass-content">...</div> (your actual visible content)
     </div>
   Used for the header nav bar, footer, and main content panels site-wide.
   ========================================= */

.liquid-glass {
  position: relative;
  display: flex;
  color: var(--lg-text);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.liquid-glass:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.liquid-glass .glass-filter {
  position: absolute;
  inset: 0;
  z-index: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  filter: url(#lg-dist);
  isolation: isolate;
}

.liquid-glass .glass-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--lg-bg-color);
}

.liquid-glass .glass-specular {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  overflow: hidden;
  box-shadow:
    inset 1px 1px 0 var(--lg-highlight),
    inset 0 0 4px var(--lg-highlight);
}

.liquid-glass .glass-content {
  position: relative;
  z-index: 3;
  padding: 1.5rem 2rem;
  width: 100%;
}

/* =========================================
   Circular Progress Bar Dynamic Styles
   ========================================= */

.circular-progress {
  position: relative;
  width: 120px;
  height: 120px;
}

.circular-progress svg {
  transform: rotate(-90deg);
  transform-origin: center;
}

.circular-progress .bg {
  fill: none;
  stroke: #092338;
  stroke-width: 10;
}

.circular-progress .progress {
  fill: none;
  stroke: url(#cyanGradient);
  stroke-width: 10;
  stroke-linecap: round !important;
  /* Ring starts fully empty (dasharray 377) so it doesn't flash at 90% before the JS animation runs */
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.circular-progress .value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.35rem;
  font-weight: 800;
  color: #22d3ee;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}
