/* Dino Mini-Game (CHATGAIYA RUN) Styles */

.dino-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background-color: #f7f9fa;
  position: relative;
  overflow: hidden;
}

.dino-header {
  padding: 8px 12px;
  background-color: #2f3542;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-pixel);
  font-size: 13px;
}

.dino-hud {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dino-score-label {
  color: #ffa502;
}

.dino-canvas-wrapper {
  flex: 1;
  position: relative;
  background: #ffffff;
  border: 2px solid #57606f;
  margin: 8px;
  overflow: hidden;
}

#dino-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.dino-milestone-popup {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  border: 2px solid #ff4757;
  color: #ffffff;
  padding: 10px 20px;
  font-family: var(--font-retro);
  font-size: 20px;
  text-align: center;
  z-index: 50;
  pointer-events: none;
  animation: milestone-fade 2.5s forwards;
}

@keyframes milestone-fade {
  0% { opacity: 0; transform: translate(-50%, -10px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}

.dino-controls-bar {
  padding: 6px 12px;
  background-color: #dcdde1;
  border-top: 1px solid #718093;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: #2f3542;
}

.dino-desktop-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.dino-mobile-controls-bar {
  display: none;
  width: 100%;
  gap: 8px;
  align-items: center;
}

.dino-btn-touch {
  flex: 1;
  padding: 10px 12px;
  font-family: var(--font-pixel);
  font-size: 14px;
  font-weight: bold;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dino-btn-jump {
  flex: 2;
  background: linear-gradient(180deg, #2ed573, #239648) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  border-color: #a3ffc7 !important;
  box-shadow: 0 0 10px rgba(46, 213, 115, 0.4);
}

.dino-btn-pause {
  background: #f1f2f6;
  color: #2f3542;
}

.dino-btn-restart {
  background: #fff8e1;
  color: #d35400;
  border-color: #ffa502;
}

.dino-overlay-screen {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  font-family: var(--font-pixel);
  text-align: center;
  z-index: 60;
  padding: 16px;
}

.dino-gameover-title {
  font-size: 26px;
  color: #ff4757;
}

.dino-start-title {
  font-size: 22px;
  color: #2ed573;
}

/* Mobile & Touchscreen Dino Layout */
@media (max-width: 820px), (max-height: 560px), (pointer: coarse) {
  .dino-desktop-controls {
    display: none !important;
  }

  .dino-mobile-controls-bar {
    display: flex !important;
  }

  .dino-canvas-wrapper {
    margin: 4px;
  }

  .dino-controls-bar {
    padding: 6px;
  }
}

