body {
  margin: 0;
  padding: 0;
  font-family: 'Minecraft', sans-serif;
  background: black;
  color: white;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('images/bg.png') center/cover no-repeat;
  background-color: white;
  background-blend-mode: darken;
  filter: blur(10px) brightness(0.6);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

body.bg-visible::before {
  opacity: 1;
}

body.bg-hidden::before {
  opacity: 0;
}

#page-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  flex-direction: column;
  z-index: 1;
}

@media (min-height: 501px) and (min-width: 601px) {
  body,
  #page-content {
    min-height: 100vh;
  }
}

@media (max-height: 500px), (max-width: 600px) {
  #page-content {
    align-items: flex-start;
    justify-content: flex-start;
    min-height: auto;
  }
}

.container {
  width: 100%;
  max-width: 640px;
  padding: 0 20px;
  box-sizing: border-box;
}

.box {
  position: relative;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  z-index: 2;
}

.box h1, .box h2 {
  margin-top: 0;
}

ul {
  list-style: none;
  padding-left: 0;
  text-align: left;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
}

li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 8px 0;
  font-size: 1.2em;
  line-height: 1.3;
}

.entry-arrow {
  flex-shrink: 0;
  pointer-events: none;
  line-height: 1.3;
}

.entry-text {
  flex: 1;
  word-break: break-word;
  line-height: 1.3;
  position: relative;
  top: -3.5px;
}

a {
  color: white;
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s ease, transform 0.3s ease;
}

a:hover {
  color: orange;
  transform: scale(1.05);
  text-decoration: none;
}

.back-btn {
  display: inline-block;
  margin-bottom: 10px;
  color: white;
  text-decoration: none;
}

h1, h2 {
  margin-bottom: 20px;
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}

.member {
  border: 1px solid white;
  padding: 10px;
  min-width: 120px;
  text-align: center;
  flex: 1 1 150px;
}

.box, .box p, .box a {
  font-size: 1.2em;
}

.server-display {
  color: white;
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s ease, transform 0.3s ease;
  flex: 1;
  word-break: break-word;
  line-height: 1.3;
  position: relative;
  top: -2px;
  font-size: 1.2em;
}
.server-display:hover {
  color: orange;
  transform: scale(1.05);
  text-decoration: none;
}

.search-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto 20px;
  width: 100%;
  gap: 8px;
  height: 42px;
  transition: transform 0.2s ease;
  box-sizing: border-box;
}

.search-wrapper:hover,
.search-wrapper:focus-within {
  transform: scale(1.03);
}

.search-wrapper i {
  height: 100%;
  aspect-ratio: 1 / 1;
  border: 2px solid #8a8a8a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  color: #8a8a8a;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.search-wrapper input {
  height: 100%;
  flex: 1;
  background-color: transparent;
  color: white;
  border: 2px solid #8a8a8a;
  padding: 0 10px;
  font-family: 'Minecraft', sans-serif;
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.search-wrapper:hover i,
.search-wrapper:focus-within i,
.search-wrapper:hover input,
.search-wrapper:focus-within input {
  border-color: white;
  color: white;
}


#pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

button.pagination-btn {
  background: transparent;
  color: white;
  border: 2px solid white;
  padding: 6px 12px;
  font-family: 'Minecraft', sans-serif;
  font-size: 1em;
  cursor: pointer;
  transition: transform 0.2s ease;
}

button.pagination-btn:hover {
  transform: scale(1.1);
}

button.pagination-btn.active {
  background-color: white;
  color: black;
}

.blog-post-content img,
#post-content img {
  max-width: 100%;
  display: block;
  margin: 20px auto;
  border: 2px solid white;
}

#loader {
  opacity: 0;
  transition: opacity 0.4s ease;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Minecraft', sans-serif;
  flex-direction: column;
  z-index: 9999;
}

#loader.visible {
  opacity: 1;
}

.loading-content {
  text-align: center;
}

#loading-message {
  font-size: 1.2em;
  margin-bottom: 10px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes loaderFadeIn {
  to {
    opacity: 1;
  }
}

.loading-bar {
  width: 200px;
  height: 10px;
  background-color: transparent;
  border: 2px solid white;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.loading-bar-fill {
  display: flex;
  gap: 2px;
  height: 100%;
  animation: pixel-fill 1.6s steps(10) infinite;
}

.loading-bar-fill span {
  width: 10px;
  height: 100%;
  background-color: white;
}

@keyframes pixel-fill {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

#loading-progress {
  margin-top: 8px;
  font-size: 0.9em;
}


#page-content {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.4s ease 0.25s, transform 0.4s ease 0.25s;
}

#page-content.fade-in {
  opacity: 1;
  transform: scale(1);
}

#page-content.fade-out {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.wiki-page {
  height: 100vh;
  width: 100vw;
  padding: 0;
  display: flex;
  flex-direction: column;
}

#wiki-layout {
  display: flex;
  flex: 1;
  height: 100%;
  overflow: hidden;
  flex-direction: column;
}

@media (min-width: 768px) {
  #wiki-layout {
    flex-direction: row;
  }
}

#wiki-browser {
  flex: 0 0 20%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

#wiki-preview,
#wiki-content {
  flex: 1;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

@media (max-width: 767px) {
  #wiki-browser {
    flex: 0 0 auto;
    max-height: 200px;
    width: 100%;
  }

  #wiki-preview,
  #wiki-content {
    width: 100%;
    height: auto;
  }
}
