/* ================================================================
   Web Order Ltd — UFO Escape game styles
   Relies on the custom properties defined in style.css.
   ================================================================ */

.ufo-game {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-dark);
  border: 1px solid var(--border-dark);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), 0 0 60px var(--accent-glow);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.ufo-game__canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: pointer;
  outline: none;
}

.ufo-game__hud {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  pointer-events: none;
  z-index: 2;
}

.ufo-game__score {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-white);
  text-shadow: 0 0 12px var(--accent-glow);
}

.ufo-game__best {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}

.ufo-game__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: radial-gradient(circle at 50% 40%, rgba(10, 10, 15, 0.55), rgba(7, 7, 9, 0.88));
  backdrop-filter: blur(2px);
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}

.ufo-game__overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ufo-game__title {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-white);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ufo-game__hint {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-light);
  max-width: 32ch;
}

.ufo-game__btn {
  margin-top: 4px;
  padding: 12px 34px;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bg-dark);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 8px 30px var(--accent-glow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.ufo-game__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--accent-glow);
}

.ufo-game__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ufo-game__btn--ghost {
  color: var(--accent);
  background: transparent;
  border: 1px solid rgba(0, 229, 255, 0.4);
  box-shadow: none;
}

.ufo-game__btn--ghost:hover {
  color: var(--text-white);
  border-color: var(--accent);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.ufo-game__btn.is-hidden {
  display: none;
}

.ufo-game__demo {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-family: var(--font);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-light);
  background: rgba(10, 10, 15, 0.55);
  border: 1px solid var(--border-dark);
  border-radius: 100px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: opacity 0.4s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.ufo-game__demo::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: ufo-demo-pulse 1.4s ease-in-out infinite;
}

.ufo-game__demo:hover {
  color: var(--text-white);
  border-color: rgba(0, 229, 255, 0.4);
}

.ufo-game__demo.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes ufo-demo-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (max-width: 768px) {
  .ufo-game {
    max-width: 360px;
    margin: 0 auto;
  }
}
