
body{
    background-color: #000 !important;
}

/*ios fullscreen*/
.xxx-game-iframe-iphone-se{
    height: 226px !important;
}

.xxx-ios-fullscreen-message{
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100vw;
    /* dvh tracks the *dynamic* viewport (excludes Safari bottom bar when it
       auto-hides on scroll); vh fallback covers old browsers. */
    height: 100vh;
    height: 100dvh;
    display: none;
    background-color: rgba(0,0,0,0.5);
    
    z-index: 10000;    
    
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -ms-touch-action: none;
    touch-action: none;    
}

.xxx-ios-fullscreen-scroll{
    width: 100vw;
    height: 120vh;
    position: absolute;
    z-index: 10001;
    top: 0;
    left: 0;
    display: none;
    
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -ms-touch-action: none;
    touch-action: none;     
}

.xxx-ios-fullscreen-swipe{
    width: 30%;
    height: 30%;
    
    background-image: url(../sprites/swipe.png);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    
    position: absolute;
    top: 50%;
    left: 50%;
    
    -ms-transform :  translate( -50%, -50%) !important;
    -webkit-transform :  translate( -50%, -50%) !important;
    transform :  translate( -50%, -50%) !important;    
    
    animation: xxx-animation-ios-swipe 1.5s ease infinite;
    
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -ms-touch-action: none;
    touch-action: none;    
}


@keyframes xxx-animation-ios-swipe {
  0%, 100% {
    top: 40%;
  }
  50% {
    top: 60%;
  }
}
/* ── iOS "Add to Home Screen" prompt ─────────────────────────────────────── */
/* Shown automatically when the user is on iOS Safari and NOT running in
   standalone mode. Only appears after initial paint + a 1.5s delay to not
   fight auth/tutorial overlays. Dismissal is remembered for 7 days. */
#ios-install-prompt {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(12px + env(safe-area-inset-left, 0px));
  padding-right: calc(12px + env(safe-area-inset-right, 0px));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0s linear 0.22s;
  pointer-events: none;
}
#ios-install-prompt.ios-install--in {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.22s ease, visibility 0s;
  pointer-events: auto;
}
#ios-install-prompt.ios-install--out { opacity: 0; }

.ios-install-card {
  background: linear-gradient(180deg, #151528 0%, #0b0b1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 14px 16px 14px;
  max-width: 760px;
  width: 100%;
  max-height: 100%;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.ios-install-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  z-index: 2;
}
.ios-install-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.ios-install-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  text-align: center;
  padding-right: 28px;
}

.ios-install-options {
  display: flex;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}

.ios-install-option {
  flex: 1 1 0;
  min-width: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ios-install-option--primary {
  border-color: rgba(0, 191, 165, 0.35);
  background: linear-gradient(180deg, rgba(0, 191, 165, 0.08) 0%, rgba(0, 191, 165, 0.02) 100%);
}
.ios-install-option-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.55);
}
.ios-install-option--primary .ios-install-option-label {
  color: #00bfa5;
}
.ios-install-option-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.ios-install-option-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.35;
  flex: 1 1 auto;
}

.ios-install-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  flex: 1 1 auto;
}
.ios-install-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 9px;
  padding: 6px 9px;
  line-height: 1.25;
}
.ios-install-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(180deg, #00bfa5 0%, #008e7a 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ios-install-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.3;
  margin-top: 2px;
}

.ios-install-dismiss {
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, #00bfa5 0%, #008e7a 100%);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25), 0 6px 16px rgba(0, 191, 165, 0.25);
  transition: filter 0.15s;
  margin-top: auto;
}
.ios-install-dismiss:hover { filter: brightness(1.08); }
.ios-install-dismiss:active { transform: translateY(1px); }

/* Narrow / portrait fallback — stack the two options vertically. */
@media (max-width: 560px), (orientation: portrait) {
  .ios-install-card {
    max-width: 420px;
    padding: 16px;
  }
  .ios-install-options {
    flex-direction: column;
  }
  .ios-install-option {
    padding: 10px 12px;
  }
}
