/* 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, #faf8f4 0%, #ded9d3 100%);
  color: #222;
  text-align: center;
  overflow-x: hidden;
}

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

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

h3, h4 {
  position: left;
  z-index: 100;
}

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

h2 {
  color: #111;
  font-size: 2.2em;
  margin-top: 20px;
  text-shadow: none;
}

h3 {
  color: #111;
  font-size: 1.8em;
  margin-top: 10px;
  text-shadow: none;
}

h4 {
  color: #111;
  font-size: 1.0em;
  margin-top: 20px;
  text-shadow: none;
}

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

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

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

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

.translate-popup {
  margin: 0;
  padding: 10px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  display: block;
  max-width: 250px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.translate-popup:hover,
.translate-popup:active {
  opacity: 1;
}

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

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

/* Universal Top Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.68) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  padding: 0.85rem 1.75rem;
  box-sizing: border-box;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}

/* Brand Title / Logo */
.brand-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-title2 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: black;
  text-decoration: none;
  text-transform: uppercase;
}

/* Nav Link List */
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: black;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-link:hover {
  color: grey;
}

.nav-link.active {
  color: blue;
  border-bottom: 2px solid #ffffff;
  padding-bottom: 2px;
}

/* Hamburger Toggle for Mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

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

/* Mobile Layout Breakpoint */
@media (max-width: 850px) {
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .navbar {
    padding: 1.25rem 1.5rem;
  }
  .brand-title, .brand-title2 {
    font-size: 1.4rem;
  }
  /* Mobile Dropdown Menu */
  .navbar.open .nav-links {
    display: flex;
    position: absolute;
    right: 1.5rem;
    top: 4.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }
  .navbar.open .nav-link {
    color: #fff;
  }
}

/* === BUTTONS === */
.btn {
  background-color: #333;
  color: #fff;
  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 rgba(0, 0, 0, 0.12);
}

.btn:hover {
  background-color: #555;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.16);
}

.btng {
  background-color: #333;
  color: #fff;
  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 rgba(0, 0, 0, 0.12);
}

.btng:hover {
  background-color: #555;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.16);
}

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

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

.gallery img {
  border: 4px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.08);
  transition: none;
  outline: none;
}

.gallery img:hover {
  transform: none;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.08);
}

@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: #f3f0eb;
  color: #222;
  margin: 5px;
  padding: 10px 20px;
  border-radius: 25px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
  font-weight: bold;
  letter-spacing: 1px;
}

/* === VIDEO & AUDIO === */
.video-container, .audio-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 20px auto;
  max-width: 1400px;
  z-index: 100;
  position: relative;
}

video {
  width: calc(33.33% - 10px);
  max-width: none;
  max-height: 600px;
  height: auto;
  border: 4px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  display: block;
  margin: 0;
}

video:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.14);
}

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

/* Fonts */
@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(243, 240, 235, 0.95);
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
}

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

.msg-bubble {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 15px;
  background: #f4f1ec;
  border-left: 4px solid #999;
  color: #222;
  word-wrap: break-word;
}

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

.chat-input-area {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-input-area input {
  background: #fff;
  border: 1px solid #ccc;
  color: #222;
  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 #ccc;
}