@font-face {
  font-family: "EternalsFont";
  src: url("../Fonts/Centauri/Centauri.otf") format("truetype");
}
@font-face {
  font-family: "Centauri";
  src: url("../Fonts/elements-eternals-futuristic-space-display-typeface-GK6TQUD-2019-09-23/Eternal.ttf")
    format("truetype");
}
@font-face {
  font-family: "MBF";
  src: url("../Fonts/font/MBFSpace.ttf") format("truetype");
}

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  background: url("../Images\ &\ Videos/Gallery.png") no-repeat center center
    fixed;
  background-size: cover;
  font-family: "EternalsFont", sans-serif;
  z-index: 1;
}

.menu-bar {
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  pointer-events: none;
}

.menu-list {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.menu-list li {
  margin: 0 30px;
}

.menu-button {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  padding: 10px;
  transition: color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.menu-button a {
  color: #fff;
  text-decoration: none;
  position: relative;
  z-index: 1;
  font-family: "MBF";
  font-size: 23px;
}

.menu-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: all 0.5s ease;
  z-index: 0;
}

.menu-button:hover::before {
  left: 100%;
}

.menu-button:hover {
  color: #f0f0f0;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.7), 0 0 20px rgba(0, 255, 255, 0.5),
    0 0 40px rgba(0, 255, 255, 0.4);
}

.menu-button a:hover {
  color: #00ffff;
}

/* Loader */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 2s ease;
}

#loader video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hide main content initially */
.hidden-content {
  opacity: 0;
  visibility: hidden;
  transition: opacity 2s ease;
}

/* Fade in when ready */
.show-content {
  opacity: 1;
  visibility: visible;
  transition: opacity 2s ease;
}

.menu-button {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.show-content .menu-button {
  opacity: 1;
  transform: translateY(0);
}

/* Background image */
.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../Images\ &\ Videos/Gallery.png");
  background-size: cover;
  background-position: center;
  z-index: -1;
}

/* Futuristic Toggle Switch Styles */
.animation-control {
  position: fixed; /* Ensures it stays in place */
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column; /* Stack items vertically */
  align-items: center; /* Center items horizontally */
  gap: 2px; /* Reduced gap for closer text */
  z-index: 1001;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 45px; /* Smaller width */
  height: 22px; /* Smaller height */
  margin-bottom: 3px; /* Space between toggle and text */
}

.toggle-switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333;
  border-radius: 22px; /* Adjusted border-radius for smaller size */
  transition: 0.4s;
  box-shadow: 0 0 4px rgba(0, 255, 255, 0.3); /* Smaller glow */
  border: 1px solid #00ffff;
}

.slider:before {
  content: "";
  height: 18px; /* Smaller thumb */
  width: 18px; /* Smaller thumb */
  position: absolute;
  left: 2px; /* Adjusted left position */
  bottom: 2px; /* Adjusted bottom position */
  background-color: #fff;
  border-radius: 50%;
  transition: 0.4s;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.7); /* Smaller glow for thumb */
}

input:checked + .slider {
  background-color: #00ffff;
  box-shadow: 0 0 8px #00ffff, 0 0 15px #00ffff; /* Adjusted glow when on */
}

input:checked + .slider:before {
  transform: translateX(23px); /* Adjusted transform for smaller size */
  background-color: #fff;
}

/* Animation Text Styles */
.animation-text-container {
  position: relative;
  width: 120px; /* Adjusted fixed width for smaller text */
  height: 20px; /* Adjusted fixed height for smaller text */
  overflow: hidden;
  text-align: center;
}

.animation-text {
  font-family: "Orbitron", sans-serif; /* A more futuristic-looking font */
  font-size: 14px; /* Smaller font size */
  color: #fff;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.5); /* Smaller text glow */
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
  white-space: nowrap;
}

.animation-text.on {
  color: #00ffff;
  text-shadow: 0 0 6px #00ffff, 0 0 10px #00ffff; /* Adjusted glow for "On" */
  opacity: 0;
  transform: translateY(100%);
}

.animation-text.off {
  color: #ccc;
  text-shadow: 0 0 4px rgba(200, 200, 200, 0.5); /* Adjusted glow for "Off" */
  opacity: 1;
  transform: translateY(0);
}

/* When checkbox is checked, show 'on' text and hide 'off' text */
input:checked ~ .animation-text-container .animation-text.on {
  opacity: 1;
  transform: translateY(0);
}

input:checked ~ .animation-text-container .animation-text.off {
  opacity: 0;
  transform: translateY(-100%);
}

:root {
  /* New palette based on the astronaut image */
  --bg-color: #0a0f1e; /* Deep space blue/black from new image */
  --primary-accent: #00f5d4; /* Glowing Teal/Cyan from visor */
  --secondary-accent: #4a90e2; /* Brighter cosmic blue for secondary highlights */
  --tertiary-accent: #b0c4de; /* Light steel blue / silver for subtle details */
  --text-color: #e8efff; /* Lighter text for better contrast on dark bg */
  --card-bg: rgba(16, 24, 44, 0.75); /* Dark blue, slightly transparent card */
  --border-color: rgba(50, 70, 110, 0.6);
  --font-display: "Syne", sans-serif;
  --font-mono: "Roboto Mono", monospace;
  --primary-accent-rgb: 0, 245, 212; /* RGB for --primary-accent */
  --secondary-accent-rgb: 74, 144, 226; /* RGB for --secondary-accent */
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Custom Scrollbar Styling */
body::-webkit-scrollbar {
  width: 10px;
}
body::-webkit-scrollbar-track {
  background: rgba(10, 15, 30, 0.5); /* Dark track */
  border-radius: 10px;
}
body::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    var(--primary-accent),
    var(--secondary-accent)
  );
  border-radius: 10px;
  border: 2px solid var(--bg-color); /* Creates a 'floating' look */
}
body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    var(--secondary-accent),
    var(--primary-accent)
  );
}

.page-header {
  padding-top: 120px;
  text-align: center;
  margin-bottom: 3rem;
}

.gallery-main-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  color: var(--text-color);
  letter-spacing: -1.5px;
  position: relative;
  display: inline-block;
  padding: 0.5rem 0;
  /* Glow effect for the title, matching the visor */
  text-shadow: 0 0 10px rgba(var(--primary-accent-rgb), 0.4),
    0 0 20px rgba(var(--primary-accent-rgb), 0.3),
    0 0 30px rgba(var(--secondary-accent-rgb), 0.2);
}
.gallery-main-title::before,
.gallery-main-title::after {
  content: "";
  position: absolute;
  height: 4px;
  /* Gradient lines with new accent colors */
  background: linear-gradient(
    90deg,
    var(--primary-accent),
    var(--secondary-accent),
    var(--primary-accent)
  );
  width: 0;
  animation: expandLineTitle 1.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards
    0.5s;
  border-radius: 2px;
}
.gallery-main-title::before {
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
}
.gallery-main-title::after {
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
}
@keyframes expandLineTitle {
  to {
    width: 90%;
  }
}

.gallery-grid-container {
  padding: 0 5vw 2vh 5vw; /* Reduced bottom padding to accommodate footer-spacer */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 220px;
  grid-auto-flow: dense;
  gap: 25px;
}

.gallery-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); /* Darker shadow for more depth */
  opacity: 0;
  transform: translateY(40px);
  transition: transform 0.65s cubic-bezier(0.165, 0.84, 0.44, 1),
    opacity 0.65s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease,
    border-color 0.3s ease;
  will-change: transform, opacity;
}
.gallery-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.item-wide {
  grid-column: span 2;
}
.item-tall {
  grid-row: span 2;
}
.item-large {
  grid-column: span 2;
  grid-row: span 2;
}

@media (max-width: 900px) {
  .item-large {
    grid-column: span 2;
    grid-row: span 1;
  }
  .item-tall {
    grid-row: span 2;
  }
}
@media (max-width: 768px) {
  .item-wide,
  .item-tall,
  .item-large {
    grid-column: span 1;
    grid-row: span 1;
  }
  .gallery-grid-container {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-auto-rows: 180px;
  }
}
@media (max-width: 480px) {
  .gallery-grid-container {
    grid-template-columns: repeat(
      auto-fill,
      minmax(calc(50% - 12.5px), 1fr)
    ); /* Aim for 2 columns */
    grid-auto-rows: calc(
      (100vw - (5vw * 2) - 25px) / 2
    ); /* Maintain aspect ratio for 2 columns */
    /* If still too small, fallback: */
    /* grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); */
    /* grid-auto-rows: 140px; */
  }
}

.gallery-item:hover {
  transform: scale(1.04) translateY(-5px);
  border-color: var(--primary-accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(var(--primary-accent-rgb), 0.6),
    /* Stronger glow */ 0 0 35px rgba(var(--secondary-accent-rgb), 0.3);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1),
    filter 0.6s ease;
}
.gallery-item:hover img {
  transform: scale(1.15);
  filter: saturate(1.1) brightness(1.05) contrast(1.05); /* Added contrast */
}

.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(5, 10, 20, 0.98) 0%,
    rgba(5, 10, 20, 0.85) 60%,
    rgba(5, 10, 20, 0) 100%
  ); /* Darker, more prominent overlay */
  color: white;
  padding: 1.2rem;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.gallery-item:hover .overlay {
  opacity: 1;
  transform: translateY(0);
}

.overlay-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--primary-accent); /* Changed to primary for visor glow */
  text-shadow: 0 0 8px rgba(var(--primary-accent-rgb), 0.7);
}
.overlay-description {
  font-size: 0.85rem;
  color: var(--text-color);
  opacity: 0.9;
}

/* Footer Spacer to create a more defined end */
.footer-spacer {
  height: 8vh; /* Adjust as needed */
  background: linear-gradient(
    to top,
    rgba(var(--bg-color-rgb, 10, 15, 30), 0.5),
    transparent
  );
  margin-top: -1px; /* Overlap slightly with grid if needed or remove */
}
:root {
  --bg-color-rgb: 10, 15, 30;
} /* RGB for background for gradient */

/* Lightbox styles adapted for new theme */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(var(--bg-color-rgb), 0.95);
  backdrop-filter: blur(10px) saturate(130%); /* Enhanced blur */
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}
.lightbox.active {
  display: flex;
  opacity: 1;
}
.lightbox-content-wrapper {
  position: relative;
  max-width: 85vw;
  max-height: 85vh;
  animation: fadeInScaleUp 0.4s ease-out;
  padding: 25px; /* More padding */
  background-color: rgba(16, 24, 44, 0.8); /* Darker blue */
  border-radius: 12px; /* Softer radius */
  border: 1px solid rgba(var(--primary-accent-rgb), 0.3); /* Accent border */
  box-shadow: 0 0 40px rgba(var(--primary-accent-rgb), 0.25);
}
/* Keyframes and img styles for lightbox are fine */
@keyframes fadeInScaleUp {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.lightbox-content-wrapper img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(85vw - 50px); /* Adjusted for padding */
  max-height: calc(85vh - 110px); /* Adjusted for padding and caption */
  border-radius: 6px;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  color: var(--text-color);
  font-size: 1.8rem;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
  user-select: none;
  background-color: rgba(
    var(--card-bg-rgb, 16, 24, 44),
    0.8
  ); /* Use card bg for controls */
  border-radius: 50%;
  width: 44px;
  height: 44px; /* Slightly larger */
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(var(--primary-accent-rgb), 0.2);
}
:root {
  --card-bg-rgb: 16, 24, 44;
} /* RGB for card bg */

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--bg-color);
  background-color: var(--primary-accent);
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(var(--primary-accent-rgb), 0.5);
}
.lightbox-close {
  top: -20px;
  right: -20px;
} /* Adjusted position */
.lightbox-prev {
  left: -60px;
  top: 50%;
  transform: translateY(-50%);
} /* Further out */
.lightbox-next {
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
} /* Further out */

.lightbox-caption {
  text-align: center;
  color: var(--text-color);
  padding-top: 1rem;
  font-size: 0.95rem; /* Slightly larger caption */
  font-family: var(--font-mono);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
