body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
background: linear-gradient(135deg, #c0d7df 0%, #dbe6f6 50%, #a0b4c8 100%);
  font-family: Arial, sans-serif;
  position: relative; /* Hozzáadva a relatív pozícionálás */
}
.calculator {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #e0b8c7;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(19, 17, 17, 0.1);
  width: 300px; /* Számológép szélessége */
}
.display {
  width: 100%;
  height: 60px;
  background-color: #ebe1e6;
  color: #1b1111;
  text-align: right;
  padding: 10px;
  font-size: 24px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-weight: bold;
}
.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 oszlopos rács */
  gap: 10px;
  width: 100%;
}
.button {
  padding: 20px;
  background-color: #e745c4;
  border: none;
  border-radius: 5px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-weight: bold; /* Félkövér szöveg */
  text-align: center;
}
.button:hover {
  background-color: #ddd;
}
.button.operator {
  background-color: #961d90;
  color: #fff;
}
.button.operator:hover,
.button.clear:hover {
  background-color: #e6dce4;
}

/* Aritmetikai műveletek a jobb szélen */
.buttons .operator {
  grid-column: 4; /* Az operátor gombok a 4. oszlopba kerülnek */
}

/* A hosszú törlés gomb (C) */
.button.clear {
  grid-column: span 4; /* A törlés gomb 4 oszlopot foglal el */
  background-color: #44093a;
  color: #fff;
}

.back-button {
  background-color: #5e1354; /* Gomb háttérszíne */
  color: black; /* Gomb szövegének színe */
  border: none; /* Nincs keret */
  padding: 10px 20px; /* Belső margó */
  text-align: center; /* Szöveg középre igazítása */
  text-decoration: none; /* Nincs aláhúzás */
  display: inline-block; /* Inline blokk elem */
  font-size: 16px; /* Betűméret */
  margin: 10px 2px; /* Külső margó */
  cursor: pointer; /* Mutató kurzor */
  border-radius: 5px; /* Lekerekített sarkok */
  transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Áttűnés a háttérszín és árnyék változásakor */
  font-weight: bold; /* Félkövér szöveg */
  position: relative; /* Relatív pozíció a fénycsíkhoz */
  overflow: hidden; /* Elrejtjük a túlcsorduló tartalmat */
}

.back-button-container {
  position: absolute;
  bottom: 20px; /* Az oldal aljától való távolság */
  left: 50%; /* Középre igazítás */
  transform: translateX(-50%); /* Középre igazítás */
}

.back-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -200%; /* Kezdetben rejtve */
  width: 200%;
  height: 20px; /* Vékony csík */
  background: rgba(255, 255, 255, 0.8); /* Fényes csík színe */
  transform: rotate(45deg);
  transition: all 0.5s ease;
}

.back-button:hover::before {
  left: 100%; /* Mozgás hover esetén */
  transition: all 0.5s ease;
}

.back-button:hover {
  transform: scale(1.05); /* Nagyítás hover esetén */
  background-color: #b5a9a9; /* Háttérszín változás hover esetén */
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8); /* Csillogó hatás */
}

.back-button:focus {
  background-color: #b5a9a9; /* Háttérszín változás focus esetén */
  box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8); /* Csillogó hatás */
}

.history {
  margin-bottom: 10px;
  background-color: #f0f0f0;
  padding: 10px;
  border-radius: 5px;
  height: 40px; /* Fix magasság */
  font-size: 16px;
  color: #333;
  width: 100%; /* Történet szélessége */
  text-align: right; /* Jobbra igazított szöveg */
  overflow: hidden; /* Elrejtjük a túlcsorduló tartalmat */
  white-space: nowrap; /* Egy sorban tartjuk a szöveget */
}
