/* RESET & FONT */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'GenshinFont', sans-serif;
  font-weight: bold;
}

@font-face {
  font-family: 'GenshinFont';
  src: url('../fonts/zh-cn.ttf') format('truetype');
}

/* LAYOUT */
body {
  background: #000;
  color: #fff;
  line-height: 1.6;
}
header {
  background: #000;
  padding: 10px 20px;
}
.dashboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo a {
  color: lightblue;
  font-size: 28px;
  text-decoration: none;
}
nav ul {
  list-style: none;
  display: flex;
}
nav ul li {
  margin: 0 10px;
}
nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 5px 10px;
  transition: background 0.3s;
}
nav ul li a.active,
nav ul li a:hover {
  background: violet;
  border-radius: 4px;
}
footer {
  background: #111;
  padding: 20px;
  text-align: center;
  color: #fff;
}

/* GAMES */
.game-section {
  padding: 40px 20px;
  text-align: center;
  background: #111;
  margin-bottom: 40px;
  border-bottom: 2px solid grey;
}
.game-section h2 {
  font-size: 32px;
  margin-bottom: 10px;
  color: orange;
}
.game-section p {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 20px;
  color: white;
}
button {
  background: orange;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  color: #000;
  cursor: pointer;
  transition: background 0.3s;
  border-radius: 4px;
}
button:hover {
  background: pink;
}
.game-container {
  margin-top: 20px;
}

/* TRIVIA */
#trivia-container { max-width: 800px; margin: 20px auto; text-align: left;  color: white;}
.choices { list-style: none; padding-left: 0; }
.choices li { margin-bottom: 5px; }
#trivia-result { font-size: 20px; margin-top: 20px; color: pink; }

/* MEMORY */
#memory-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 600px;
  margin: 20px auto;
}
.memory-card {
  background: grey;
  padding: 10px;
  cursor: pointer;
  border: 2px solid #222;
}
.memory-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* PUZZLE */
#puzzle-container {
  max-width: 600px;
  margin: 20px auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: #222;
}
.puzzle-tile {
  background-color: #444;
  border: 1px solid #222;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  background-size: 400% 300%;
}
.puzzle-tile.selected {
  outline: 3px solid orange;
}

/* SWITCH */
.toggle-section {
  text-align: center;
  margin-top: 30px;
}
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
.slider:before {
  content: "";
  position: absolute;
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #2196F3;
}
input:checked + .slider:before {
  transform: translateX(26px);
}

/* TROLL */
.troll-section {
  text-align: center;
  margin: 30px 0;
}
#trollButton {
  background-color: red;
  color: white;
  padding: 15px 30px;
  font-size: 18px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
#trollButton:hover {
  background-color: darkred;
}
#trollVideoContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
#trollVideoContainer.hidden {
  display: none;
}
#trollVideo {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
}

/* === KNOB FEATURE STYLES === */
.knob-door-section {
  padding: 40px;
  text-align: center;
  background-color: #111;
  color: orange;
}

.knob-door-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.knob-visual {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 6px solid orange;
  background: radial-gradient(circle at center, #333 40%, #666);
  cursor: grab;
  transition: transform 0.1s linear;
}

.door-panel {
  position: relative;
  width: 400px;
  height: 250px;
  overflow: hidden;
  border: 2px solid orange;
  border-radius: 10px;
  margin-top: 20px;
}

.secret-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.fog {
  position: absolute;
  width: 100%;
  height: 100%;
  background: url('images/fog.png') repeat center;
  background-size: cover;
  opacity: 0.35;
  z-index: 2;
  pointer-events: none;
}

.dark-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 1; /* Fully hidden by default */
  z-index: 3;
  transition: opacity 0.3s ease;
}
