/* ============================================================================
   ANIMATHINGS — SHARED MOBILE LANDSCAPE & FULLSCREEN GATE
   - Activates ONLY on smartphone viewports (never tablets or desktops).
   - Provides a clean, on-brand rotate-to-landscape & 1-tap fullscreen lock
     overlay for widescreen games, plus a subtle fullscreen pill in landscape.
   ============================================================================ */

.mobile-landscape-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(circle at 50% 30%, #2b2019 0%, #171210 68%, #0c0908 100%);
  color: #fffaf0;
  font-family: "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
  text-align: center;
  overflow-y: auto;
}

.mobile-landscape-gate.visible {
  display: flex;
}

.mlg-card {
  width: 100%;
  max-width: 340px;
  margin: auto;
  padding: 24px 20px 22px;
  border-radius: 24px;
  background: linear-gradient(165deg, #fffaf0 0%, #f9e8c8 100%);
  color: #2b1a0e;
  border: 3.5px solid #e08642;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.65), 0 0 0 2px rgba(255, 240, 200, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mlg-art {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  overflow: hidden;
  border: 3.5px solid #f4bc51;
  box-shadow: 0 8px 20px rgba(64, 32, 12, 0.28);
  background: #1b333c;
  flex-shrink: 0;
}

.mlg-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mlg-phone-anim {
  position: relative;
  width: 68px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0;
}

.mlg-phone-shape {
  width: 28px;
  height: 46px;
  border-radius: 7px;
  border: 3px solid #2b1a0e;
  background: linear-gradient(180deg, #ffdf9a 0%, #f5a45d 100%);
  position: relative;
  box-shadow: 0 3px 10px rgba(64, 32, 12, 0.22);
  animation: mlgRotatePhone 2.2s ease-in-out infinite;
}

.mlg-phone-shape::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 2.5px;
  border-radius: 99px;
  background: #2b1a0e;
  opacity: 0.65;
}

.mlg-phone-shape::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2b1a0e;
  opacity: 0.55;
}

@keyframes mlgRotatePhone {
  0%, 18% { transform: rotate(0deg); }
  45%, 78% { transform: rotate(-90deg); }
  96%, 100% { transform: rotate(0deg); }
}

.mlg-badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(249, 169, 117, 0.34);
  border: 1.5px solid rgba(223, 130, 67, 0.55);
  color: #7c3810;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mlg-title {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.15;
  color: #2b1a0e;
}

.mlg-sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.42;
  color: #5d3e28;
}

.mlg-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 4px;
}

.mlg-btn-primary {
  width: 100%;
  border: 2.5px solid #4a2d1b;
  border-radius: 14px;
  padding: 13px 16px;
  background: linear-gradient(180deg, #ffd17a 0%, #f59c42 100%);
  color: #2b1a0e;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 #4a2d1b, 0 8px 18px rgba(96, 46, 16, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s ease;
}

.mlg-btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #4a2d1b;
}

.mlg-btn-back {
  width: 100%;
  border: 1.5px solid rgba(196, 108, 48, 0.45);
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(255, 252, 246, 0.85);
  color: #4a2d1b;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mlg-hint {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: #7c563a;
  min-height: 16px;
}

/* Never show the phone rotate gate on desktop or tablets */
@media (min-width: 601px) and (min-height: 541px) {
  .mobile-landscape-gate {
    display: none !important;
  }
}
