/* ===== Hop Coconut Shy (Easter egg game) =====
   Kept separate from styles.css so the game is fully isolated.
   Trigger: the domino beer cans ("Have you tried these?"). Their container
   sets pointer-events:none in styles.css, so re-enable it on the cans. */

.domino-can {
  pointer-events: auto;
  cursor: pointer;
}

.domino-can img {
  transition: transform 0.2s ease;
}

.domino-can:hover img {
  transform: scale(1.05);
}

/* Pause the can animation while the game is open */
body.hop-shy-open {
  overflow: hidden;
}

body.hop-shy-open .domino-can {
  animation-play-state: paused !important;
}

/* First-visit "tap a can" tooltip */
.hop-shy-tooltip {
  position: fixed;
  bottom: 200px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2700;
  background: #1a1a2e;
  color: var(--cream, #faecde);
  border: 1px solid var(--goldenrod, #e8ab3a);
  border-radius: 20px;
  padding: 10px 18px;
  font-family: "tt-commons-pro", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hop-shy-tooltip.show {
  opacity: 1;
}

/* Modal overlay */
.hop-shy-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
}

.hop-shy-modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.hop-shy-modal-inner {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: linear-gradient(180deg, #173118 0%, #0c1e0d 100%);
  border: 1px solid rgba(232, 171, 58, 0.35);
  border-radius: 12px;
  padding: 18px 18px 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.hop-shy-close {
  position: absolute;
  top: 6px;
  right: 10px;
  z-index: 2;
  background: none;
  border: none;
  color: var(--white, #fff);
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}

.hop-shy-close:hover {
  color: var(--goldenrod, #e8ab3a);
}

.hop-shy-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-right: 44px;
  margin-bottom: 10px;
  font-family: "tt-commons-pro", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hop-shy-score {
  color: var(--goldenrod, #e8ab3a);
}

.hop-shy-throws {
  color: var(--cream, #faecde);
}

.hop-shy-title {
  text-align: center;
  font-family: "alternate-gothic-condensed-a", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--goldenrod, #e8ab3a);
  margin-bottom: 6px;
  line-height: 1;
}

#hop-shy-canvas {
  display: block;
  width: 100%;
  border-radius: 8px;
  touch-action: none;
  cursor: crosshair;
}

/* floating bonus text over the 3D scene */
.hop-shy-floater {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  font-family: "tt-commons-pro", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--goldenrod, #e8ab3a);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  animation: hopShyRise 1.3s ease-out forwards;
}

@keyframes hopShyRise {
  0% { opacity: 0; margin-top: 18px; }
  15% { opacity: 1; }
  100% { opacity: 0; margin-top: -40px; }
}

.hop-shy-footer p {
  margin: 10px 0 0;
  text-align: center;
  font-family: "tt-commons-pro", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(250, 236, 222, 0.75);
}

/* End-of-round overlay */
.hop-shy-end {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: rgba(12, 30, 13, 0.92);
  border-radius: 12px;
}

.hop-shy-end[hidden] {
  display: none;
}

.hop-shy-end h2 {
  font-family: "alternate-gothic-condensed-a", sans-serif;
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--goldenrod, #e8ab3a);
  margin: 0;
}

.hop-shy-end p {
  font-family: "gelica", serif;
  font-size: 1.2rem;
  color: var(--white, #fff);
  margin: 0 0 8px;
}

.hop-shy-end-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.hop-shy-btn {
  background: var(--goldenrod, #e8ab3a);
  color: #1a1a2e;
  border: 1px solid var(--goldenrod, #e8ab3a);
  padding: 12px 24px;
  font-family: "tt-commons-pro", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.hop-shy-btn:hover {
  filter: brightness(1.12);
}

.hop-shy-btn-alt {
  background: transparent;
  color: var(--goldenrod, #e8ab3a);
}

.hop-shy-btn-alt:hover {
  background: rgba(232, 171, 58, 0.15);
  filter: none;
}

.hop-shy-share-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.hop-shy-share-panel[hidden] {
  display: none;
}

.hop-shy-share-panel button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream, #faecde);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  padding: 8px 16px;
  font-family: "tt-commons-pro", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.hop-shy-share-panel button:hover {
  border-color: var(--goldenrod, #e8ab3a);
  color: var(--goldenrod, #e8ab3a);
}

@media (max-width: 600px) {
  .hop-shy-modal.open {
    padding: 8px;
  }

  .hop-shy-modal-inner {
    padding: 12px 12px 10px;
  }

  .hop-shy-end h2 {
    font-size: 2.4rem;
  }
}
