.fridge-page * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.fridge-page {
  background-color: #0f0f11;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

.fridge-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: visible;
}

.fridge-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 848 / 832;
  background: url(../assets/fridge.webp) center / 100% 100% no-repeat;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.9),
    inset 0 0 30px rgba(255, 255, 255, 0.08);
  isolation: isolate;
}

#fridge-overlay {
  padding: 0;
  align-items: stretch;
  justify-content: safe center;
  scrollbar-width: none;
}

#fridge-overlay::-webkit-scrollbar {
  display: none;
}

.fridge-scene .fridge-close-button {
  position: absolute;
  bottom: 2%;
  left: 50%;
  z-index: 40;
  margin: 0;
  transform: translateX(-50%);
  max-width: 90%;
  padding: clamp(8px, 1.5vw, 12px) clamp(12px, 3vw, 24px);
  font-size: clamp(0.7rem, 1.5vw, 1rem);
}

.fridge-scene::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 30% 15%,
    rgba(255, 235, 180, 0.08) 0%,
    rgba(0, 0, 0, 0) 60%
  );
  pointer-events: none;
  z-index: 20;
}

.game-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 4px;
  transition:
    transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    filter 0.3s ease,
    box-shadow 0.3s ease;
  z-index: 10;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.7)) contrast(1.15)
    brightness(1.05) saturate(1.1);
}

.beer {
  background-image: url("../assets/wilda.webp");
}

.beer::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 10%;
  width: 80%;
  height: 8px;
  background: rgba(0, 0, 0, 0.8);
  filter: blur(4px);
  z-index: -1;
  border-radius: 50%;
}

.beer-1 {
  left: 21.79%;
  top: 27.3%;
  width: 4.5%;
  height: 8.5%;
}
.beer-2 {
  left: 31.8%;
  top: 27.29%;
  width: 4.2%;
  height: 8%;
}
.beer-3 {
  left: 41.13%;
  top: 27.58%;
  width: 4.4%;
  height: 8.2%;
}

.energy-drink {
  background-image: url("../assets/elektra.webp");
}

.energy-drink::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 5%;
  width: 90%;
  height: 6px;
  background: rgba(0, 0, 0, 0.9);
  filter: blur(4px);
  z-index: -1;
  border-radius: 50%;
}

.energy-1 {
  left: 14.31%;
  top: 46.77%;
  width: 5.2%;
  height: 10.3%;
}
.energy-2 {
  left: 23.48%;
  top: 44.93%;
  width: 4.9%;
  height: 9.9%;
}
.energy-3 {
  left: 31.52%;
  top: 46.34%;
  width: 5.1%;
  height: 10.1%;
}

.beer:hover {
  transform: translateY(-8px) scale(1.08);
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.6)) contrast(1.2)
    brightness(1.15) saturate(1.1);
  box-shadow: 0 15px 25px rgba(212, 175, 55, 0.4);
  z-index: 15;
}

.energy-drink:hover {
  transform: translateY(-8px) scale(1.08);
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.6)) contrast(1.25)
    brightness(1.2) saturate(1.15);
  box-shadow: 0 15px 25px rgba(0, 255, 127, 0.35);
  z-index: 15;
}

.game-item::after {
  content: attr(data-name);
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  background: rgba(20, 20, 23, 0.95);
  color: #ffffff;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 6px;
  white-space: nowrap;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.game-item:hover::after {
  transform: translateX(-50%) scale(1);
}

.painel-controle {
  position: absolute;
  right: 10%;
  top: 30%;
  width: 25%;
  min-width: 140px;
  max-width: 220px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: rgba(34, 34, 34, 0.95);
  padding: 15px;
  border: 2px solid #555;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.9);
  color: white;
  backdrop-filter: blur(5px);
}

@media (max-width: 900px) {
  .fridge-container {
    height: 100%;
    min-height: 0;
    flex: 0 0 100%;
  }

  .fridge-scene {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
    aspect-ratio: auto;
    background-size: 100% 100%;
  }

  .painel-controle {
    position: relative;
    inset: auto;
    width: min(100%, 320px);
    min-width: 0;
    max-width: none;
    max-height: none;
    margin-top: 10px;
    margin-right: 0;
    padding: clamp(6px, 2vw, 10px);
    gap: clamp(5px, 1.5vw, 10px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .painel-controle h2 {
    font-size: clamp(11px, 3.5vw, 15px);
    white-space: nowrap;
    grid-column: 1 / -1;
    margin: 0 !important;
  }

  .painel-controle .btn-teste {
    padding: 6px 4px;
    font-size: clamp(8px, 2.7vw, 11px);
    gap: 3px;
  }
}

@media (max-height: 600px) {
  .painel-controle h2 {
    font-size: clamp(9px, 2vw, 12px);
  }

  .painel-controle .btn-teste {
    padding: 5px 3px;
    font-size: clamp(8px, 1.6vw, 10px);
  }
}

@media (max-width: 900px) and (max-height: 600px) {
  .painel-controle {
    margin-top: 6px;
    gap: 4px;
    padding: 5px;
  }

  .painel-controle h2 {
    font-size: 10px;
  }

  .painel-controle .btn-teste {
    padding: 4px 2px;
    font-size: 8px;
  }
}

.painel-controle h2 {
  font-size: clamp(14px, 2vw, 18px);
  margin-bottom: 5px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.btn-teste {
  color: white;
  border: 2px solid #fff;
  padding: 8px 10px;
  font-family: inherit;
  font-size: clamp(10px, 1.5vw, 14px);
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s ease;
  background-color: #002288;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
}

.btn-teste:hover:not(:disabled) {
  background-color: #0044ff;
  transform: scale(1.02);
  box-shadow: 0 4px 10px rgba(0, 68, 255, 0.4);
}

.btn-teste:disabled {
  background-color: #333;
  border-color: #555;
  color: #888;
  cursor: not-allowed;
}

.descricao-efeito {
  font-size: clamp(9px, 1.2vw, 11px);
  font-weight: normal;
  text-transform: none;
  text-align: center;
  color: #ccc;
}

.btn-voltar {
  background-color: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.7);
  padding: 12px 40px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.btn-voltar:hover {
  background-color: white;
  color: #0f0f11;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 255, 255, 0.2);
}
