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

body, html {
  height: 100%;
  font-family: 'Comic Sans', sans-serif;
  text-align: center;
  scroll-behavior: smooth;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.05), transparent 70%);
  z-index: 9999;
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.1) 1px,
    transparent 2px,
    transparent 4px
  );
  animation: vhsLinesMove 0.2s linear infinite;
  opacity: 0.5;
}
@keyframes vhsLinesMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 4px;
  }
}

.content.dark-mode {
  background-color: #121212;
  color: #ffffff;
}

/* Layout container */
.container {
  min-height: 100%;
  display: flex;
  align-items: stretch;
}

/* Sidebar */
.sidebar {
  height: auto;
  align-self: stretch;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 280px;
  z-index: 5;
  background-color: #5f5f5f;
  color: white;
  text-align: center;
  box-shadow: 10px 0 16px -4px #5f5f5f;
  transition: width 0.3s ease, transform 0.3s ease;
  border: 1px solid black;
  overflow: hidden;
}

.sidebar.hidden {
  transform: translateX(-100%);
  width: 0;
  border: none;
  overflow: hidden;
}

.sidebar * {
  text-align: center !important;
  align-items: center;
  overflow: hidden;
}

.sidebar h2 {
  margin-bottom: 20px;
  text-align: center;
  font-size: 15px;
}

#toggleSidebarBtn {
  position: fixed;
  top: 0;
  left: 16px;
  z-index: 100;
  background-color: #5f5f5f;
  box-shadow: 10px 0 16px -4px #5f5f5f;
  color: white;
  border: 1px solid black;
  border-radius: 20px;
  padding: 5px 16px;
  font-family: 'Comic Sans', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#toggleSidebarBtn:hover {
  background-color: #7f7f7f;
  transform: scale(1.05);
}

#toggleSidebarBtn:active {
  transform: scale(0.95);
}

/* Items */
.items {
  background-color: #4f4f4f;
  box-shadow: 0 0 10px 2px #4f4f4f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 0;
  border-radius: 30px;
  border: 1px solid black;
  width: 240px;
}

/* Navigation links */
.nav-link {
  text-decoration: none;
  background: none;
  padding: 12px 16px;
  border-radius: 30px;
  transition: background 0.3s;
  cursor: pointer;
  font-size: 14px;
  color: white;
}

.nav-link:hover {
  background-color: #7f7f7f;
}

/* Main content area */
.main {
  min-height: 100vh;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  width: auto;
  padding: 8px;
  box-shadow: 0 4px 16px -4px #7f7f7f;
  background-color: #7f7f7f;
  color: white;
  z-index: 102;
  border: 1px solid black;
}

.header-stuff,
.footer-stuff {
  margin-left: 280px;
  transition: margin-left 0.2s ease;
}

body.sidebar-hidden .header-stuff,
body.sidebar-hidden .footer-stuff {
  margin-left: 0;
}

/* Content */
.content {
  max-width: 1000px;
  margin: auto;
  flex: 1;
  z-index: 101;
  padding: 30px;
  word-wrap: break-word;
  background-color: white;
  box-shadow: 0 -4px 16px -4px;
}

/* Footer */
.footer {
  position: relative;
  display: block;
  left: 0;
  box-shadow: 0 -4px 16px -4px #7f7f7f;
  background-color: #7f7f7f;
  color: white;
  bottom: 0;
  width: auto;
  padding: 50px;
  z-index: 1;
  border: 1px solid black;
}

.footer .social-links {
  margin-top: 10px;
}

.footer .social-links a {
  color: #ccc;
  margin: 0 10px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer .social-links a:hover {
  color: white;
}

/* Dropdowns */
.dropdown,
.dropdown-h {
  width: 92.5%;
  position: inherit;
  display: inline-block;
}

.dropdown-content {
  max-height: 0;
  justify-content: space-evenly;
  overflow: hidden;
  display: block;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.dropdown-content.show {
  max-height: 999999px;
  opacity: 1;
}

.dropdown-content a {
  flex-direction: column;
  padding-left: inherit;
  display: flex;
}

.dropdown-btn,
.dropdown-btn-h {
  justify-self: center;
  justify-content: center;
  display: flex;
  width: 92.5%;
  text-decoration: none;
  background: none;
  padding: 16px 16px;
  border-radius: 30px;
  transition: background 0.3s;
  cursor: pointer;
  font-family: 'Comic Sans', sans-serif;
  font-size: 14px;
  border: none;
}

.show {
  display: block;
}

/* Background */
@keyframes zoomRotate {
  0% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.05) rotate(1deg);
  }
  50% {
    transform: scale(1.10) rotate(0deg);
  }
  75% {
    transform: scale(1.05) rotate(-1deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.background {
  animation: zoomRotate 40s infinite;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/Enigmatic-Website/MEDIA/Default.ico');
  background-color: transparent;
  background-blend-mode: multiply; /* or overlay, darken, etc */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: blur(10px);
  z-index: -1;
}
.background.dark-mode {
  background-color: darkslategray;
}


/* Scroll to top button */
#myBtn {
  position: fixed;
  bottom: 20px;
  right: 30px;
  z-index: 100;
  background-color: #5f5f5f;
  box-shadow: 10px 0 16px -4px #5f5f5f;
  color: white;
  border: 1px solid black;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#myBtn.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#myBtn:hover {
  background-color: #7f7f7f;
}

/* Nested sidebar dropdown colors */
.sidebar .dropdown-content {
  background-color: #5f5f5f;
  border-radius: 30px;
}

.sidebar .dropdown-content .dropdown-content {
  background-color: #707070;
  border-radius: 30px;
}

.sidebar .dropdown-content .dropdown-content .dropdown-content {
  background-color: #828282;
  border-radius: 30px;
}

.sidebar .dropdown-content .dropdown-content .dropdown-content .dropdown-content {
  background-color: #949494;
  border-radius: 30px;
}

@media (max-width: 768px) {
  .header-stuff,
  .footer-stuff {
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: center;
    width: 100%;
  }

  .header,
  .footer {
    text-align: center;
    padding: 16px;
  }

  .content {
    padding: 16px;
    width: 100%;
  }
}
