@import url("https://fonts.googleapis.com/css2?family=Pirata+One&display=swap");

.pirata-one-regular {
  font-family: "Pirata One", system-ui;
  font-weight: 400;
  font-style: normal;
}

body {
  font-family: "Pirata One", system-ui;
  margin: 0;
  height: 100vh;
  /* Háttérkép beállítások */
  background-image: url("img/background.png");
  background-repeat: no-repeat;
  background-size: cover; /* mindig teljes szélesség */
  background-position: bottom; /* aljához igazítva */
  background-attachment: fixed; /* ne mozogjon */
}

/* Halványítás trükk: átlátszó réteg a kép fölött */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5); /* 50% fehér átlátszó réteg */
  pointer-events: none; /* ne zavarja a kattintást */
}

p {
  font-size: 1.5em;
}

li {
  font-size: 1.5em;
}

/*Bootstrap felülírások*/
.container {
  position: relative;
  z-index: 1; /* tartalom a halványítás fölött */
  padding: 2rem;
  color: #000;
}

.btn {
  box-shadow: 5px 5px 6px 0px rgba(0, 0, 0, 0.31);
}

/*Saját stílusok*/
.kar-card {
  background-color: rgba(255, 255, 255, 0.8); /* fehér, 50% átlátszó */
  box-shadow: 5px 5px 6px 0px rgba(0, 0, 0, 0.31);
}

.kar-img {
  border-style: solid;
  border-width: 5px;
  border-color: whitesmoke;
  box-shadow: 5px 5px 6px 0px rgba(0, 0, 0, 0.31);
  max-width: 400px;
  height: auto;
}

.shake:hover {
  animation: shake 0.5s;
}
@keyframes shake {
  0% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-5px, 0);
  }
  40% {
    transform: translate(5px, 0);
  }
  60% {
    transform: translate(-5px, 0);
  }
  80% {
    transform: translate(5px, 0);
  }
  100% {
    transform: translate(0, 0);
  }
}

.bounce:hover {
  animation: bounce 0.6s;
}
@keyframes bounce {
  0% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
  50% {
    transform: translateY(0);
  }
  70% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
  }
}

.big-input {
  font-size: 5em; /* nagy betűméret */
  padding: 0em 0.5em; /* nagyobb belső margó */
  width: 150px;
  text-align: center;
  box-shadow: 5px 5px 6px 0px rgba(0, 0, 0, 0.31);
}

.help-icon {
  position: fixed; /* mindig a képernyőhöz igazodik */
  bottom: 20px; /* 20px távolság az aljától */
  right: 20px; /* 20px távolság a jobb szélétől */
  width: 50px; /* ikon mérete */
  height: auto;
  cursor: pointer; /* mutató kéz ikon, ha kattintható */
  z-index: 9999; /* biztosan a tartalom fölött legyen */
}

.piano {
  display: flex;
  position: relative;
  width: 700px;
  margin: 50px auto;
}

.key {
  border: 1px solid #000;
  height: 200px;
  flex: 1;
  background: white;
  cursor: pointer;
  text-align: center;
  line-height: 200px;
  font-weight: bold;
  transition: background 0.2s, transform 0.1s;
}

.key.black {
  background: black;
  width: 40px;
  height: 120px;
  position: absolute;
  top: 0;
  z-index: 2;
  color: white;
  line-height: 120px;
}

/* Aktív állapot */
.key.active {
  background: lightblue !important;
  transform: translateY(4px);
}

/* Pozicionálás a fekete billentyűkhöz */
.key[data-note="C_"] {
  left: 80px;
}
.key[data-note="D_"] {
  left: 180px;
}
.key[data-note="F_"] {
  left: 380px;
}
.key[data-note="G_"] {
  left: 480px;
}
.key[data-note="A_"] {
  left: 580px;
}

.input-correct {
  background-color: lightgreen;
}

.input-wrong {
  background-color: lightcoral;
}

.square {
  width: 150px;
  height: 150px;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px;
  position: relative;
}
.square img {
  max-width: 100%;
  max-height: 100%;
  display: none;
}
.square img.active {
  display: block;
}
.arrow {
  cursor: pointer;
  font-size: 24px;
  user-select: none;
}

.kar-img-big {
  border-style: solid;
  border-width: 5px;
  border-color: whitesmoke;
  box-shadow: 5px 5px 6px 0px rgba(0, 0, 0, 0.31);
  max-width: 800px;
  height: auto;
  display: block;
}

.sparkle-wrapper {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.sparkle-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  width: 40px;
  height: 40px; /* nagyobb méret */
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  opacity: 0;
  animation: sparkleFlash 2s infinite;
}

@keyframes sparkleFlash {
  0% {
    transform: scale(0.5) rotate(0deg);
    opacity: 0;
  }
  40% {
    transform: scale(1.5) rotate(45deg);
    opacity: 1;
  }
  100% {
    transform: scale(0.5) rotate(90deg);
    opacity: 0;
  }
}

/* Shine overlay */
.shine-overlay {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.6) 50%,
    transparent 100%
  );
  animation: shineMove 3s infinite;
  pointer-events: none;
}

@keyframes shineMove {
  0% {
    left: -100%;
  }
  100% {
    left: 120%;
  }
}

.shake-end {
  position: relative;
  overflow: hidden;
  animation: pulseEnd 2.5s infinite;
}

/* Shine csík a gombon */
.shake-end::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.6),
    transparent
  );
  animation: buttonShineEnd 4s infinite;
}

@keyframes pulseEnd {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 255, 255, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.9);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 255, 255, 0.7);
  }
}

@keyframes buttonShineEnd {
  0% {
    left: -75%;
  }
  100% {
    left: 125%;
  }
}
