/* ========== ALAP ========== */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow: hidden;
}
  
/* 
  ========== LOGIN OLDAL ==========
  
  A .login-page class: 
    - Gradient fentről bal sarokból (0% 0%) 
    - Jobb alsó sarokba (100% 100%) animál
*/
body.login-page {
  /* Háromszínű gradient (top-left -> bottom-right) */
  background: linear-gradient(to top left, #BB54A7, #879BDB, #F1C89B );
  
  /* Legyen nagyobb a háttér, hogy legyen hely a csúszásra */
  background-size: 200% 200%;
  background-position: 100% 100%;
  position: relative;
}

body.login-page.animated {
  animation: loginShift 1.5s ease forwards;
}
  
/* A gradient mozgatás kulcskockái (login) */
@keyframes loginShift {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}
  
/* ========== ÁTLÁTSZÓ FEKETE RÉTEG ========== */
body.login-page::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: -1;
}
  
/* ========== FADE IN / FADE OUT ========== */
.enter-anim {
  animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
  
.exit-anim {
  animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
  
/* 
  ========== KÁRTYA ÉS EGYÉB STÍLUSOK ========== 
  (ahogy korábban voltak) 
*/
  
/* Fontos: .card.mb-5 (ponttal), hogy valóban a card <div> kapja meg */
.card.mb-5 {
  border-radius: 15px;
}
  
.form-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 20px;
}
  
.form-label {
  text-align: left;
  margin-bottom: 5px;
  font-size: 16px;
  font-weight: bold;
}
  
.form-control {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
  
img {
  max-width: 30%;
  height: auto;
}
  
.row {
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
  
.my-close-btn {
  display: block;
  width: 30px;
  height: 30px;
  background-image: url("../img/x.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 50%;
  cursor: pointer;
}

.my-close-btn:hover {
  filter: brightness(1.5);
}
  
/* A "csillogó" glow a card-body körül */
.card-body::before {
  transition: opacity 0.3s ease-in-out;
  content: "";
  position: absolute;
  top: -30px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 10px;
  background: linear-gradient(90deg, #4A52BD, #9539B8, #E95091, #EE6D72, #F0845E, #4A52BD);
  background-size: 300%;
  filter: blur(20px);
  opacity: 0.5;
  z-index: -1;
  animation: rotate-colors 6s linear infinite;
  pointer-events: none;
}

@keyframes rotate-colors {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}
  
/* Login gomb "glow" */
#loginbutton::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #4A52BD, #9539B8, #E95091, #EE6D72, #F0845E, #4A52BD);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: -1;
  animation: glowing 6s linear infinite;
}

@keyframes glowing {
  0%   { background-position: 0% 50%; }
  100% { background-position: -200% 50%; }
}

#loginbutton {
  border: none;
  outline: none;
  color: #FFF;
  background-color: #007bff;
  cursor: pointer;
  position: relative;
  z-index: 1;
  font-size: 16px;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
  overflow: hidden;
}

#loginbutton:hover::before {
  opacity: 1;
}

/* Ha a gomb fölött van az egér, a card-body glow-t elhalványítjuk */
.card-body:has(#loginbutton:hover)::before {
  opacity: 0;
}

#loginbutton:active {
  background-color: #0056b3;
}
  
/* "Regisztrálok" link */
#registerwithemail {
  color: rgb(255, 255, 255);
  text-decoration: none;
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
}

#registerwithemail:hover {
  color: #315ED1;
}

#registerwithemail::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background-color: #315ED1;
  transition: width 0.5s ease;
}

#registerwithemail:hover::before {
  width: 100%;
}

:root {
  /* Animációs paraméterek */
  --flip-delay1: 1s;  /* Mennyi ideig várjon mielőtt az első forgást elkezdi? */
  --flip-time1: 0.3s; /* -90° -> 0° forgás hossza */
  --flip-time2: 1.5s; /* 0° -> 0° (szünet) hossza */
  --flip-time3: 0.3s; /* 0° -> 180° forgás hossza */
}
  
/* A 3D „tér” konténer: 186×186 px */
.flip-container {
  width: 186px;
  height: 186px;
  margin: 0 auto;
  perspective: 1000px; /* 3D „mélység” a forgatáshoz */
}
  
/* Maga a forgó kártya (tartalmazza az elő- és hátlapot) */
.flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  /* **Legyen rögtön -90 fokban**: */
  transform: rotateY(-90deg);
  
  /* A többi animáció: */
  animation:
    frontArrival var(--flip-time1) ease-in-out var(--flip-delay1) forwards,
    hold         var(--flip-time2) linear      calc(var(--flip-time1) + var(--flip-delay1)) forwards,
    backFlip     var(--flip-time3) ease-in-out calc(var(--flip-time1) + var(--flip-time2) + var(--flip-delay1)) forwards;
}
  
/* Közös stílus a kártya két oldalának */
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden; 
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #252528; 
  border-radius: 10px;       
}
  
/* Első (front) oldal - alaphelyzetben 0° */
.front {
  transform: rotateY(0deg);
}
  
/* Második (back) oldal - 180° */
.back {
  transform: rotateY(180deg);
}
  
/* Itt állíthatod az emoji méretét (🔐) */
.emoji {
  font-size: 100px; /* pl. legyen nagyobb */
}
  
/* A logó méretezése */
.back img {
  max-width: 100%;
  height: auto;
}
  
/* Animációk */
/* (1) -90° => 0° */
@keyframes frontArrival {
  0% {
    transform: rotateY(-90deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}
  
/* (2) 0° => 0° (szünet) */
@keyframes hold {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(0deg);
  }
}
  
/* (3) 0° => 180° (logo oldal jelenik meg) */
@keyframes backFlip {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(180deg);
  }
}