@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300&family=Lato:wght@400&family=Lustria&family=Noto+Color+Emoji&family=Noto+Serif+Display&display=swap');

:root {
  --dark-tile: #f1f1f1;
  --light-tile: #ffffff;
  --text-color: #000000;
  --backdrop: #fffB;
  --king: #4388e0;
  --queen: #C63E6A;
  --rook: #9c21b1;
  --bishop: #D3493D;
  --knight: #387F73;
  --pawn: #FAEC59;
}

@media (prefers-color-scheme: dark) {
  :root {
    --dark-tile: #1f1f1f;
    --light-tile: #000000;
    --text-color: #eeeeee;
    --backdrop: #000B;
  }
}

* {
  margin: 0;
  padding: 0;
}
.code {
  font-family: 'Fira Code', monospace;
}
.greek {
  font-family: 'Noto Serif Display', serif;
}
.emoji {
  font-family: 'Noto Color Emoji', sans-serif;
}

body {
  background-color: var(--dark-tile);
  color: var(--text-color);
  opacity: 1;
  background-image:  repeating-linear-gradient(45deg, var(--light-tile) 25%, transparent 25%, transparent 75%, var(--light-tile) 75%, var(--light-tile)), repeating-linear-gradient(45deg, var(--light-tile) 25%, var(--dark-tile) 25%, var(--dark-tile) 75%, var(--light-tile) 75%, var(--light-tile));
  background-position: 0 0, 50px 50px;
  background-size: 100px 100px;
}
main {
  flex: 1;
}
h1 {
  font-weight: normal;
}
h2 {
  font-weight: normal;
}
h3 {
  font-family: 'Lato', sans-serif;
}
p {
  font-family: 'Lato', sans-serif;
}


#topMenu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: var(--backdrop); /* Slightly transparent so content shows through */
  color: var(--text-color);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  z-index: 1000;
  transform: translateY(0);
  transition: transform 0.3s ease-in-out;
  backdrop-filter: saturate(180%) blur(6px); /* nice frosted glass effect */
}

#topMenu.hidden {
  transform: translateY(-100%);
}

.menu-items {
  display: flex;
  flex: none;
  gap: 0.5rem;
  animation: scrollLeft 20s linear infinite;
  width: max-content;
  will-change: transform;
}
.menu-items > div {
  flex-shrink: 0;           /* Prevent item from shrinking */
  white-space: nowrap;      /* Prevent text wrap */
  padding: 0 1rem;          /* Optional: inner spacing */
}

.menu-container {
  flex: 1;
  overflow: hidden;
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Adjust depending on content width */
}

#toggleHideBtn {
  background: transparent;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  font-size: 1rem;
}

#showArrow {
  position: fixed;
  top: 0;
  right: 2%;
  transform: translateX(-50%);
  background: var(--backdrop);
  color: var(--text-color);
  padding: 0.25rem 0.5rem;
  border-radius: 0 0 5px 5px;
  cursor: pointer;
  display: none;
  z-index: 1001;
  user-select: none;
  transition: opacity 0.3s ease-in-out;
  backdrop-filter: saturate(180%) blur(6px);
}

#showArrow.visible {
  display: block;
  opacity: 1;
}

#showArrow.hidden {
  opacity: 0;
  pointer-events: none;
}
