/* === BIONIC FART GREEN THEME (Adaptive Navbar + Footer Fix) === */

/* Universal box-sizing */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  padding-bottom: 240px; /* space for footer */
  font-family: Inconsolata, monospace;
  background: radial-gradient(circle at center, #00ff00 0%, #004400 100%);
  color: #0b0b0b;
  text-align: center;
  overflow-x: hidden;
}

/* Content stacking */
header, section, .video-container, .audio-container, .fun-list {
  z-index: 100;
  position: relative;
}

h1, p {
  position: relative;
  z-index: 100;
}

/* === HEADER === */
h1 {
  color: #101010;
  font-size: 2.8em;
  margin-top: 10px;
  text-shadow: none;
}

p {
  font-size: 1.2em;
  color: #111;
  margin-bottom: 20px;
}

/* === TRANSLATE === */
.translate-wrapper {
  position: fixed;
  top: 120px;
  right: 15px;
  z-index: 1500;
  text-align: right;
}

#google_translate_element {
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

.translate-popup:not(.hidden) #google_translate_element {
  visibility: visible;
  height: auto;
}

.translate-popup {
  margin-top: 10px;
  padding: 10px;
  background-color: #111;
  border: 3px solid #9eff00;
  border-radius: 8px;
  box-shadow: 0 0 15px #7fff00;
  display: inline-block;
  max-width: 250px;
}

.translate-popup.hidden {
  display: none;
}

.translate-popup .goog-te-gadget-simple {
  background-color: rgba(0, 170, 0, 0.25) !important;
  border: 1px solid #faff00 !important;
  border-radius: 5px;
  padding: 5px;
}

/* === NAVBAR === */
.navbar {
  background-color: green;
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: opacity 0.4s ease;
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.navbar-logo {
  flex-shrink: 0;
}


/* 1. Hide the container off-screen by default */
.menu-container {
  position: fixed;
  top: 60px; /* Adjust to match your navbar height */
  right: -100%; /* Start completely off-screen to the right */
  width: 250px;
  height: calc(100vh - 60px);
  background: #111;
  border-left: 2px solid #9eff00;
  transition: right 0.3s ease-in-out;
  z-index: 999;
  overflow-y: auto;
}


/* 2. When the 'active' class is added via JS, slide it in */
.menu-container.active {
  right: 0;
}


/* 3. Style the buttons inside to be visible and stacked */
.menu {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 10px;
}

.menu .btn {
  width: 100%;
  text-align: left;
  padding: 12px;
  background: #222;
  color: #9eff00;
  border: 1px solid #333;
  cursor: pointer;
}

.menu .btn:hover {
  background: #9eff00;
  color: #000;
}

/* Hamburger button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  z-index: 1001;
}

.menu-toggle .bar {
  display: block;
  width: 30px;
  height: 4px;
  margin: 5px auto;
  background-color: #9eff00;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

/* === BUTTONS === */
.btn {
  background-color: #111;
  color: #9eff00;
  padding: 10px 20px;
  margin: 10px;
  border-radius: 5px;
  cursor: pointer;
  border: none;
  font-family: Inconsolata, monospace;
  font-size: 16px;
  text-align: center;
  display: inline-block;
  transition: background-color 0.3s, transform 0.2s ease-in-out;
  box-shadow: 0 0 10px #7fff00;
}

.btn:hover {
  background-color: #faff00;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 0 20px #faff00;
}

.btng {
  background-color: #111;
  color: #9eff00;
  padding: 20px 30px;
  margin: 10px;
  border-radius: 5px;
  cursor: pointer;
  border: none;
  font-family: Inconsolata, monospace;
  font-size: 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s, transform 0.2s ease-in-out;
  box-shadow: 0 0 10px #7fff00;
}

.btng:hover {
  background-color: #faff00;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 0 20px #faff00;
}

.btng:active {
  transform: translateY(1px);
}

.btn:active {
  transform: translateY(1px);
}

/* === GALLERY === */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 20px auto;
  max-width: 1400px;
}

.gallery img {
  border: 4px solid #1aff00;
  border-radius: 10px;
  box-shadow: 0 0 25px #1aff00;
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px #faff00;
}

/* Responsive gallery sizes - RESTORED TO ORIGINAL */
@media (max-width: 600px) { .gallery img { width: 40%; } }
@media (min-width: 601px) and (max-width: 1024px) { .gallery img { width: 30%; } }
@media (min-width: 1025px) { .gallery img { width: 22%; } }

/* === FUN LIST === */
.fun-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.fun-list li {
  display: inline-block;
  background-color: #111;
  color: #9eff00;
  margin: 5px;
  padding: 10px 20px;
  border-radius: 25px;
  box-shadow: 0 0 10px #70ff00;
  font-weight: bold;
  letter-spacing: 1px;
}

/* -------------------------------------------------------------------------- */
/* === VIDEO & AUDIO - UPDATED FOR THREE PER ROW === */
.video-container, .audio-container {
  display: flex; /* Back to flex */
  flex-wrap: wrap; /* Allows wrapping to new rows */
  justify-content: center; /* Centers items in a row */
  gap: 15px; /* Adds space between videos */
  margin: 20px auto;
  max-width: 1400px;
  z-index: 100;
  position: relative;
  /* text-align: center; Removed as flex handles centering */
}

video {
  /* Set video width to slightly less than 33.33% for three per row */
  width: calc(33.33% - 10px); 
  max-width: none; /* Removing max-width ensures the calculation is honored */
	max-height: 600px;
  height: auto; 
  border: 4px solid #1aff00;
  border-radius: 10px;
  box-shadow: 0 0 25px #1aff00;
  transition: transform 0.3s, box-shadow 0.3s;
  
  display: block; 
  margin: 0; /* Remove auto margin to let flex gap manage spacing */
}

video:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px #faff00;
}

audio {
  max-width: 300px;
  width: 100%;
  margin: 5px;
}
/* -------------------------------------------------------------------------- */

/* === FOOTER === */
footer {
  background-color: greenyellow;
  color: white;
  padding: 10px 5px;
  text-align: center;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  font-size: 16px;
  z-index: 990;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

footer.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

footer a {
  color: black;
  text-decoration: none;
  margin: 0 8px;
}

footer a:hover {
  text-decoration: underline;
}

/* === REFINED RESPONSIVE NAVBAR === */
@media screen and (max-width: 6000px) {
  .navbar-content {
    padding: 0 15px;
  }

  /* Keep the toggle button visible */
  .menu-toggle {
    display: block;
    box-shadow: 0 0 10px #7fff00;
    border: 2px solid #7fff00;
    border-radius: 5px;
  }

  /* Reset the container to the slide-out style */
  .menu-container {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden off-screen */
    width: 280px;
    height: 100vh;
    background-color: rgba(0, 15, 0, 0.98); /* Darker green-black */
    border-left: 2px solid #9eff00;
    display: flex; /* Ensure inner menu displays */
    flex-direction: column;
    z-index: 2000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1; /* Reset the opacity from your previous code */
    max-height: none; /* Reset the max-height from your previous code */
  }

  /* Slide in when active */
  .menu-container.active {
    right: 0;
    opacity: 1;
  }

  .menu {
    margin-top: 80px; /* Space for the logo/top */
    padding: 20px;
    gap: 15px;
  }

  .btn {
    width: 100%; /* Full width buttons inside the sidebar */
    margin: 0;
    text-align: center;
  }
}


/* === VIDEO RESPONSIVE SIZES to match GALLERY IMG === */
/* All specific width overrides for video are REMOVED (or made full-width) to ensure the 50% rule is honored */
/* The main video: width: calc(50% - 10px); rule handles the two-per-row layout for larger screens. */
/* Removed previous media queries that enforced 40%, 30%, 22% */


/* === ICON OVERRIDES === */
#gassyLinkIcon, #mediglareIcon, #gassyhubIcon {
  transition: none !important;
  transform: none !important;
}

#gassyLinkIcon {
  width: 256px;
  height: 256px;
  max-width: 256px !important;
}

#gassyhubIcon {
  width: 256px;
  height: 256px;
  max-width: 256px !important;
}

#mediglareIcon {
  height: 256px;
  max-width: 768px !important;
}


/* stuff for gassyhub */
#gassyhub {
  transition: none !important;
  transform: none !important;
}

#gassyhub {
  width: auto;
  height: auto;
  max-width: 1200px !important;
}


/* special font */
@font-face {
  font-family: Inconsolata;
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("files/fonts/inconsolata/inconsolata_n4.8e0be9241e16b6e6311249bed21adcbee343bcd1.woff2") format("woff2"),
       url("files/fonts/inconsolata/inconsolata_n4.c913b3219f7cc7a03a6565e54733068641b83be2.woff") format("woff");
}
@font-face {
  font-family: Inconsolata;
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("files/fonts/inconsolata/inconsolata_n7.42ffb2ea5578e6e88edd291e392dab233d946720.woff2") format("woff2"),
       url("files/fonts/inconsolata/inconsolata_n7.f8fd13bf56b4d5d5891a97e9dc61ee446a880def.woff") format("woff");
}
:root {
  --main-font-stack: Inconsolata, monospace;
  --main-font-weight: 400;
  --main-font-style: normal;
}

/* === CHAT REFINEMENT === */
.chat-container {
  max-width: 800px;
  margin: 20px auto;
  background-color: rgba(0, 40, 0, 0.9);
  border: 3px solid #9eff00;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 0 20px #7fff00;
}

#chat-window {
  height: 400px;
  overflow-y: auto;
  background: #111;
  border-radius: 5px;
  padding: 10px;
  margin-bottom: 15px;
  text-align: left;
  border: 1px solid #444;
}

/* Chat Messages */
.msg-bubble {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 15px;
  background: #222;
  border-left: 4px solid #9eff00;
  color: #fff;
  word-wrap: break-word;
}

.msg-user {
  color: #9eff00;
  font-weight: bold;
  margin-right: 8px;
}

/* Input Styling */
.chat-input-area {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-input-area input {
  background: #111;
  border: 2px solid #9eff00;
  color: #9eff00;
  padding: 10px;
  border-radius: 5px;
  font-family: Inconsolata, monospace;
}

#user-name { flex: 1; min-width: 100px; }
#user-msg { flex: 3; min-width: 200px; }

.msg-media {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    margin-top: 8px;
    border: 1px solid #333;
}
