body {
  margin: 0;
  background: #1e2a38; /* sfondo generale */
  color: #f3f0f7; /* testo principale */
  font-family: "Segoe UI", sans-serif;
}

.calendar-header form select {
  background: #2d3f52;
  color: #f3f0f7;
  border: 1px solid #bfcad3;
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 4px;
  margin-right: 10px;
}

.calendar-wrapper {
  display: block;
  width: 100%;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: #1e2a38;
  border-bottom: 1px solid #2d3f52;
  flex-wrap: nowrap;
}

.calendar-header-bar {
  width: 100%;
  display: block;
  background: #2d3f52; /* barra superiore */
  box-sizing: border-box;
  z-index: 10;
  position: relative;
}

.calendar-month-title {
  font-size: 20px;
  font-weight: bold;
  color: #f3f0f7;
}

.calendar-month-selector select {
  background: #2d3f52;
  color: #f3f0f7;
  border: 1px solid #bfcad3;
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 4px;
  appearance: none;
  cursor: pointer;
  max-width: 200px;
  white-space: nowrap;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 10px;
  row-gap: 25px;
  padding: 20px;
  background: #1e2a38; /* sfondo dietro le colonne */
}

.calendar-column {
  border: 1px solid #2d3f52;
  padding: 10px;
  background: #2d3f52; /* colonne principali */
  min-height: 150px;
  box-sizing: border-box;
}

.calendar-column.empty {
  background: #2d3f52;
  opacity: 0.1;
}

.calendar-day-label {
  font-family: "Bahnschrift", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 6px;
  color: #bfcad3;
}

.game-box,
a.game-box {
  display: block;
  background: #1e2a38; /* schede giochi */
  margin-bottom: 6px;
  padding: 4px;
  border-radius: 6px;
  transition: transform 0.2s ease, background 0.2s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

a.game-box:hover {
  transform: scale(1.15);
  background: #2d3f52; /* hover schede */
  z-index: 10;
}

.game-box-inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.game-cover {
  width: 50%;
  height: auto;
  border-radius: 4px;
  display: block;
}

.game-title {
  font-size: 12px;
  margin: 2px 0;
  font-weight: 500;
  color: #f3f0f7;
}

.game-platforms {
  font-size: 11px;
  color: #bfcad3;
}

.game-genre {
  font-size: 10px;
  color: #bfcad3;
}

.game-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.game-hype {
  font-size: 11px;
  color: #d6d3e7;
  margin-top: 2px;
}

.more-toggle {
  color: #d6d3e7;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  margin: 6px 0;
}

.more-games {
  margin-top: 6px;
}

.wishlist-container {
  margin-top: 4px;
  text-align: center;
}

.wishlist-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  filter: grayscale(100%) brightness(1.6);
  transition: transform 0.2s ease, filter 0.3s ease;
}

.wishlist-confirm {
  background: #4caf50;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.wishlist-confirm.show {
  opacity: 1;
}

.game-meta-bottom {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    margin-top: 8px;
}

.game-meta-bottom.only-wishlist {
  justify-content: center;
  gap: 8px;
}

.game-rating-small {
    font-size: 14px;
    font-weight: bold;
    color: #ccc;
}

.rating-wrapper,
.wishlist-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.rating-label,
.wishlist-label {
  font-size: 12px;
  font-weight: 600;
  color: #f3f0f7;
  margin-bottom: 2px;
  line-height: 1;
}

.game-rating {
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  margin-top: 0px;
  line-height: 1;
  margin-top: 5px;
}

.wishlist-toggle {
  color: #7a8a99;
  transition: color 0.3s ease;
  cursor: pointer;
  font-size: 22px;
  margin-top: 0px;
  margin-bottom: 2px;
  line-height: 1;
}

.wishlist-toggle:hover,
.wishlist-toggle.active {
  color: #ff4d6d; /* rosso al passaggio del mouse */
}

.wishlist-icon.active {
  filter: none;
}

.platform-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: inline-block;
    margin-right: 3px;
    vertical-align: middle;
    filter: invert(1) brightness(2);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.modal-content {
  background: #1e1e1e;
  color: #fff;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
}

.modal-content h2 {
  margin-top: 0;
  font-size: 1.5em;
  margin-bottom: 10px;
}

.modal-content input[type="text"],
.modal-content input[type="password"] {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 6px;
  border: 1px solid #666;
  background: #222;
  color: #fff;
}
.modal-content button[type="submit"] {
  background: #4caf50;
  border: none;
  padding: 10px 15px;
  color: white;
  cursor: pointer;
  border-radius: 6px;
  margin-top: 10px;
}


.modal-content p {
  margin-bottom: 20px;
  font-size: 1em;
}

.modal-buttons {
  display: flex;
  justify-content: space-around;
  gap: 10px;
  margin-bottom: 20px;
}

.modal-btn {
  background: #4caf50;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s;
}

.modal-btn:hover {
  background: #45a049;
}

.modal-btn.secondary {
  background: #555;
}

.modal-btn.secondary:hover {
  background: #666;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
}

.wishlist-dropdown {
  position: absolute;
  background: #222;
  border: 1px solid #444;
  padding: 6px 0;
  border-radius: 6px;
  z-index: 100;
  width: 200px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  margin-top: 5px;
}

.wishlist-option {
  padding: 8px 12px;
  cursor: pointer;
  color: #fff;
}

.wishlist-option:hover {
  background-color: #333;
}

.wishlist-tutorial {
  padding: 10px;
  font-size: 0.85em;
  border-top: 1px solid #444;
  margin-top: 6px;
  color: #ccc;
}

.tutorial-line {
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .calendar-grid {
    grid-template-columns: 1fr !important;
  }

  .game-box-inner {
    flex-direction: column;
    align-items: center;
  }

  .game-cover {
    width: 100%;
    max-width: 220px;
    height: auto;
  }

  .game-info {
    align-items: center;
    text-align: center;
  }

  .game-meta-bottom {
    flex-direction: column;
    gap: 10px;
  }

  .wishlist-confirm {
    font-size: 11px;
    padding: 5px 10px;
  }
}
