/* 🎮 Alap beállítások csak a játékon belülre */
.apple-catcher-container {
  font-family: Arial, sans-serif;
  text-align: center;
  height: 90%;
}

.game-wrapper {
  background: white;
  border-radius: 20px;
  padding: 10px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  height: 100%;
}

.title-box {
  margin-bottom: 20px;
}

.title-box h1,
.apple-catcher-container h2 {
  font-size: 32px;
  margin: 0 0 20px 0;
  font-weight: bold;
  color: #333;
  text-wrap: balance;
}

/* 🧩 Modal fejléc (játékcím + bezáró gomb) */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}

.modal-header h2 {
  font-size: 20px;
  margin: 0;
  color: #333;
  flex: 1;
  text-align: left;
}

/* 🎨 Canvas alapstílus */
canvas#gameCanvas {
  width: 100%;
  max-width: 480px;
  height: auto;
  aspect-ratio: 2 / 2.5;
  display: block;
  margin: 0 auto;
  border: 2px solid #333;
  border-radius: 12px;
  box-sizing: border-box;
}

/* 🎮 Gombok */
button {
  margin-top: 20px;
  padding: 12px 24px;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  background-color: #333;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #555;
}

.hidden {
  display: none;
}

/* 🪟 Modal alapstílusok */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 20px;
  box-sizing: border-box;
}

.modal.modal-open {
  display: block;
}

.modal-content {
  background: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 16px;
  max-width: 400px;
  width: 90%;
  position: relative;
}

/* ❌ Bezáró gomb */
.close-button {
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #888;
  background: none;
  border: none;
}

.close-button:hover {
  color: #000;
}

/* 📱 Mobil teljes képernyős mód */
@media (max-width: 480px) {
  .title-box h1,
  .apple-catcher-container h2 {
    font-size: 22px;
  }

  canvas#gameCanvas {
    width: 100vw;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 2 / 2.5;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
  }

  .modal-content {
    background: transparent;
    margin: 0;
    padding: 0;
    border-radius: 0;
    max-width: none;
    width: 100%;
    height: 100%;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    position: relative;
    border: none;
  }

  .modal-header {
    /*position: absolute;*/
    /*top: 0;*/
    /*left: 0;*/
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    padding: 12px 16px;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .modal-header h2 {
    font-size: 18px;
    color: #fff;
    margin: 0;
    flex: 1;
    text-align: left;
  }

  .close-button {
    font-size: 24px;
    color: white;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 50%;
    /*position: relative;*/
  }

  .close-button:hover {
    background: rgba(0, 0, 0, 0.6);
  }
}
