﻿.game-page-edible .edible-layout {
  margin-top: 0.8rem;
  display: block;
}

.game-page-edible .game-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.game-page-edible .game-hero > p:not(.hero-warning-text) {
  max-width: 980px;
}

.hero-warning-text {
  margin: 0.68rem auto 0;
  margin-inline: auto;
  width: min(900px, 96%);
  border-radius: 14px;
  border: 1px solid rgba(43, 90, 60, 0.34);
  background: linear-gradient(180deg, rgba(244, 251, 238, 0.96), rgba(232, 245, 226, 0.94));
  color: #214633;
  box-shadow: 0 8px 16px rgba(26, 62, 38, 0.12);
  padding: 0.72rem 0.95rem;
  font-size: 1.02rem;
  line-height: 1.44;
  font-weight: 600;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  align-self: center;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 7px;
  text-decoration-thickness: 2px;
}

.edible-board {
  padding: 0.9rem;
}

.score-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  font-weight: 800;
  color: #1e4d32;
  background: rgba(245, 253, 242, 0.95);
  border: 1px solid rgba(46, 97, 65, 0.24);
  border-radius: 999px;
  padding: 0.44rem 0.88rem;
  margin: 0 auto 0.55rem;
  width: fit-content;
  min-width: 280px;
  font-size: 2rem;
}

.edible-choices {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 0.7rem;
  align-items: center;
}

.choice-btn {
  border: none;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  font-size: 1.12rem;
  min-height: 88px;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.choice-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.choice-btn.edible {
  background: linear-gradient(180deg, #2f9a56, #237040);
}

.choice-btn.poisonous {
  background: linear-gradient(180deg, #c74d4d, #9f3030);
}

.specimen-stage {
  border-radius: 16px;
  border: 2px solid rgba(42, 93, 61, 0.22);
  background: rgba(255, 255, 255, 0.72);
  min-height: 500px;
  display: grid;
  place-items: center;
  padding: 0.85rem;
}

#gameArea img {
  width: min(560px, 100%);
  max-height: 66vh;
  object-fit: contain;
  border-radius: 14px;
  border: 2px solid rgba(33, 72, 47, 0.14);
  box-shadow: 0 10px 24px rgba(20, 45, 27, 0.18);
}

.result-card {
  margin-top: 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(44, 92, 60, 0.2);
  background: rgba(248, 252, 247, 0.9);
  min-height: 68px;
  padding: 0.75rem 0.85rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #1f4030;
  text-align: center;
}

.result-card:empty {
  display: none;
}

#infoText.text-success {
  border-color: rgba(46, 138, 77, 0.45);
  background: rgba(223, 247, 230, 0.94);
  color: #1f7f4b;
  font-size: clamp(1.22rem, 2vw, 1.9rem);
  font-weight: 900;
  line-height: 1.35;
}

#infoText.text-danger {
  border-color: rgba(188, 68, 68, 0.45);
  background: rgba(252, 226, 226, 0.95);
  color: #8f1818;
}

#infoText.poison-highlight {
  font-size: clamp(1.2rem, 2vw, 1.85rem);
  font-weight: 900;
  line-height: 1.35;
}

#infoText.poison-highlight strong {
  color: #b51212;
  font-size: 1.06em;
}

#infoText.text-success strong {
  color: #147444;
  font-size: 1.06em;
}

#victoryImage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  pointer-events: none;
  animation: victoryGrow 1.05s ease-out forwards;
}

#victoryImage img {
  display: block;
  width: min(690px, 86vw);
  animation: pulseAndTilt 2.4s ease-in-out infinite;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
}

@keyframes victoryGrow {
  0% { transform: translate(-50%, -50%) scale(0.1); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1.22); opacity: 1; }
}

@keyframes pulseAndTilt {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(2.2deg); }
  75% { transform: rotate(-2.2deg); }
}

@keyframes fadeOutAndShrink {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1.22); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(0.28); }
}

@media (max-width: 1080px) {
  .edible-choices {
    grid-template-columns: 1fr;
  }

  .choice-btn {
    min-height: 62px;
    font-size: 1rem;
  }

  .specimen-stage {
    min-height: 360px;
  }

  #gameArea img {
    max-height: 50vh;
  }
}

@media (max-width: 620px) {
  .edible-board {
    padding: 0.66rem;
  }

  .hero-warning-text {
    font-size: 0.9rem;
    padding: 0.56rem 0.62rem;
    min-height: 72px;
  }

  .score-pill {
    font-size: 1.02rem;
    min-width: 220px;
  }

  .specimen-stage {
    min-height: 280px;
  }

  .result-card {
    font-size: 0.94rem;
    min-height: 52px;
  }
}
