html {
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: rgba(0,0,0,0.5);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.left-header {
  display: flex;
  align-items: center;
  gap: 25px;
}

.logo {
  width: 80px;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: rotate(5deg);
}

#logo {
  transition: transform 0.3s ease;
  position: relative;
}

.nether #logo:hover {
  content: url('images/icons/ghast2.jpg');
  transform: scale(1.1) rotate(5deg);
}

.overworld #logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.end #logo:hover {
  transform: scale(1.1) rotate(5deg);
}

nav {
  display: flex;
  gap: 15px;
}

button {
  font-family: inherit;
  padding: 10px;
  cursor: pointer;
  font-size: 14px;
}

nav button a {
  color: black;
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  font-family: inherit;
}

nav button:hover {
  transform: scale(1.1);
  background-color: #f0f0f0;
}

nav button a:hover {
  color: #333;
}

.settings button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.title {
  font-size: 28px;
  color: white;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: white;
  transition: width 0.3s ease;
}

.title:hover::after {
  width: 100%;
}

.settings {
  position: relative;
}

.menu {
  position: absolute;
  right: 0;
  top: 60px;
  background: white;
  padding: 10px;
  border-radius: 10px;

  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  flex-direction: column;
  gap: 10px;
}

.menu button:hover {
  background-color: #ddd;
  color: #333;
}

.menu.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.overworld {
  background: url('images/background/minecraft-day.jpg') center/cover;
}

.nether {
  background: url('images/background/minecraft-hell.jpg') center/cover;
}

.end {
  background: url('images/background/minecraft-ender-world.jpg') center/cover;
}

.overworld,
.nether,
.end {
  width: 100%;
  height: 100vh;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

main {
  flex: 1;
  min-height: 0;
  display: flex;
  padding: 10px;
  box-sizing: border-box;
}

.content-box {
  margin: 0;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 20px 26px;
  background: rgba(0, 0, 0, 0.18);
  color: #111111;
  text-align: left;
  transition: box-shadow 0.3s ease;
  box-sizing: border-box;
  border: 1px solid rgba(119, 119, 119, 0.14);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
}

.overworld .content-box {
  background: rgba(100, 100, 100, 0.438);
  color: #111111;
  border-color: rgba(0,0,0,0.12);
}

.nether .content-box {
  background: rgba(255, 125, 0, 0.24);
  color: #ffffff;
  border-color: rgba(255, 220, 180, 0.2);
}

.end .content-box {
  background: rgba(120, 70, 180, 0.24);
  color: #ffffff;
  border-color: rgba(220, 190, 255, 0.2);
}

.about-minecraft {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  box-sizing: border-box;
  color: #ffff;
}

.about-minecraft h2,
.about-minecraft h3 {
  margin-top: 0;
  margin-bottom: 13px;
  text-align: center;
  font-size: 14px;
  color: inherit;
}

.about-minecraft p {
  line-height: 1.5;
  font-size: 12px;
  margin: 0 0 10px;
  color: inherit;
}

.quiz-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 18px 0 18px;
}

.quiz-links button {
  min-width: 190px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.quiz-links button span {
  display: inline-block;
  opacity: 0.9;
  font-size: 12px;
  margin-top: 4px;
}

.overworld .quiz-links button {
  background: rgba(255, 255, 255, 0.34);
  border-color: rgba(0, 0, 0, 0.14);
}

.nether .quiz-links button {
  background: rgba(255, 140, 0, 0.36);
  border-color: rgba(255, 235, 210, 0.2);
}

.end .quiz-links button {
  background: rgba(135, 85, 200, 0.36);
  border-color: rgba(230, 210, 255, 0.2);
}

.quiz-links button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.about-minecraft ul {
  margin: 0 0 12px 20px;
  padding: 0;
  line-height: 1.5;
  font-size: 11px;
  color: inherit;
}

.about-minecraft .quote {
  text-align: center;
  font-style: italic;
  margin-top: 10px;
  color: inherit;
}

.content-box:hover {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#settingsBtn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

#settingsBtn:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

@keyframes cookieWobble {
  0% { transform: scale(1.1) rotate(0deg); }
  25% { transform: scale(1.1) rotate(-8deg); }
  50% { transform: scale(1.1) rotate(8deg); }
  75% { transform: scale(1.1) rotate(-4deg); }
  100% { transform: scale(1.1) rotate(0deg); }
}

#settingsBtn img.sound-wobble {
  animation: cookieWobble var(--wobble-duration, 0.6s) ease-in-out;
}

@media (max-width: 900px) {
  body {
    font-size: 14px;
  }

  header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px;
  }

  .left-header {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    text-align: center;
  }

  .logo {
    width: 64px;
  }

  nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  nav button {
    font-size: 12px;
    padding: 8px 10px;
  }

  .title {
    width: 100%;
    font-size: 22px;
    text-align: center;
  }

  .settings {
    align-self: center;
  }

  .settings button img {
    width: 38px;
  }

  .menu {
    right: 50%;
    transform: translate(-50%, -10px);
  }

  .menu.active {
    transform: translate(-50%, 0);
  }

  .content-box {
    width: 100%;
    margin: 0;
    padding: 16px 14px;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex: 1;
    min-height: 0;
  }

  .about-minecraft {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    box-sizing: border-box;
  }

  .about-minecraft h2,
  .about-minecraft h3 {
    font-size: 11px;
    margin-bottom: 10px;
  }

  .about-minecraft p {
    font-size: 10px;
  }

  .about-minecraft ul {
    font-size: 9px;
  }

  .quiz-links {
    gap: 8px;
    margin: 14px 0;
    flex-wrap: nowrap;
  }

  .quiz-links button {
    min-width: 0;
    width: auto;
    flex: 1 1 0;
    max-width: none;
    padding: 10px 8px;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.18);
    border-color: rgba(255, 255, 255, 0.12);
  }

  .quiz-links button span {
    font-size: 8px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 12px;
  }

  header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
  }

  .left-header {
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
  }

  nav {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .logo {
    width: 44px;
    flex: 0 0 auto;
  }

  nav button {
    font-size: 8px;
    padding: 5px 6px;
  }

  .title {
    display: none;
  }

  .settings button img {
    width: 28px;
  }

  .menu {
    top: 50px;
    padding: 8px;
  }

  .menu button {
    font-size: 10px;
    padding: 7px 9px;
  }

  .content-box {
    width: 100%;
    padding: 14px 12px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    display: flex;
    flex: 1;
    min-height: 0;
  }

  .about-minecraft {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    box-sizing: border-box;
  }

  .about-minecraft h2,
  .about-minecraft h3 {
    font-size: 10px;
  }

  .about-minecraft p,
  .about-minecraft ul,
  .about-minecraft .quote {
    font-size: 9px;
    line-height: 1.45;
  }

  .quiz-links button {
    font-size: 8px;
    padding: 8px 6px;
    background: rgba(0, 0, 0, 0.18);
    border-color: rgba(255, 255, 255, 0.12);
  }

  .quiz-links button span {
    font-size: 7px;
  }
}