/* Globale Box-Sizing-Regel */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Einbindung der KafkaDisplay-Schrift */
@font-face {
  font-family: 'KafkaDisplay';
  src: url('../fonts/kafkadisplay-bold-webfont.woff2') format('woff2'),
       url('../fonts/kafkadisplay-bold-webfont.woff') format('woff'),
       url('../fonts/KafkaDisplay-Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

/* Basis-Stile und Scroll-Snap */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body {
  font-family: Helvetica, Arial, Calibri, sans-serif;
  transition: background-color 1s ease, color 1s ease;
  background-color: #EBA843;
  color: #464E6C;
  /* Eigene Scrollfunktion deaktivieren, da der Snap-Container scrollt */
  overflow-y: hidden;
  will-change: background-color, color;
}

/* Snap-Container */
.snap-container {
  width: 100vw;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.snap-section {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 1rem;
}

/* Landing Page */
.landing {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.landing-wrapper {
  max-width: 600px;
  display: inline-block;
  text-align: left;
}
.title {
  font-family: 'KafkaDisplay', sans-serif;
  font-size: 4rem;
  line-height: 1.2;
  margin-bottom: 2rem;
}
.contact-info {
  font-size: 2rem;
  text-align: left;
  max-width: 400px;
  margin: 0;
}

/* Galerie Items */
.gallery-item {
  padding: 2rem;
  flex-direction: column;
}
.gallery-item img {
  max-width: 90vw;
  max-height: 70vh;
  border: 15px solid white;
  object-fit: cover;
  scroll-snap-stop: always;
  border-radius: 10px;
}

/* Navigation */
.nav-indicator {
  position: fixed;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1000;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.nav-indicator:hover {
  opacity: 1;
}
.nav-down {
  bottom: 30px;
  left: 50%;
  transform: translateX(calc(-45% - 15px));
  border: 0;
  border-radius: 50%;
  padding: 10px;
}
.nav-down::after {
  content: '▼';
  display: block;
  text-align: center;
  font-size: 48px;
}
.nav-up {
  bottom: 30px;
  left: 50%;
  transform: translateX(calc(-45% - 15px));
  border: 0;
  border-radius: 50%;
  padding: 10px;
}
.nav-up::after {
  content: '▲';
  display: block;
  text-align: center;
  font-size: 48px;
}

/* Fixierte Shortcut-Buttons */
.home-button,
.cards-button,
.gallery-button {
  position: fixed;
  top: 20px;
  cursor: pointer;
  z-index: 9999;
  pointer-events: auto;
  border: 2px solid white;
}
.home-button {
  left: 20px;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  border-radius: 50%;
}
.cards-button {
  left: 60px;
  width: 20px;
  height: 20px;
  background-color: currentColor;
}
.gallery-button {
  left: 100px;
  width: 17px;
  height: 17px;
  background-color: currentColor;
  transform: rotate(45deg);
}

/* ScoreBoard */
#scoreBoard {
  position: fixed;
  top: 20px;
  left: 140px;
  font-size: 20px;
  color: #EBA843;
  z-index: 3000;
  display: none;
}
@media (max-width: 600px) {
  #scoreBoard {
    left: 10px;
    right: 10px;
    top: 10px;
    text-align: center;
    font-size: 16px;
  }
}

/* Kartenseite */
.snap-section.card-page {
  display: block;
  padding: 0;
}
header {
  width: 100%;
  background-color: #fef08a;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
header h1, header p {
  text-align: center;
}
@media (min-width: 768px) {
  .layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    column-gap: 2rem;
    align-items: start;
  }
  .cards-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: flex-end;
  }
  .card {
    width: calc(50% - 1rem);
    min-width: 5cm;
  }
  .card:last-child {
    width: 100%;
  }
}
@media (max-width: 768px) {
  .cards-wrapper {
    margin-top: 2rem;
  }
  .card {
    margin-bottom: 3rem;
    min-width: 5cm;
  }
}
.card {
  padding: 1.5rem;
  border: 2px solid;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: background-color 1s ease, color 1s ease;
}
@media (max-width: 600px) {
  .snap-section.card-page header {
    margin-top: 60px;
  }
}

/* Game-Bereich */
#gameContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  z-index: 2000;
}
#myCanvas {
  display: block;
  background: #464E6C;
}
#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  color: #EBA843;
  font-size: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  padding: 20px;
  text-align: center;
}

/* Footer */
.page-footer {
  margin-top: 3em;
  text-align: center;
  font-size: 0.9rem;
  color: gray;
}

/* Scrollbar-Styling */
/* Für WebKit-Browser */
.snap-container::-webkit-scrollbar {
  width: 10px;
}
.snap-container::-webkit-scrollbar-track {
  background: transparent;
}
.snap-container::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 5px;
  transition: background-color 0.5s ease;
}
.snap-container.scrolling::-webkit-scrollbar-thumb {
  background: rgba(70,78,108, 0.5);
}
/* Für Firefox */
.snap-container {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.snap-container.scrolling {
  scrollbar-color: rgba(70,78,108, 0.5) transparent;
}
