/* Official GTA VI loading screen — replicated from rockstargames.com/VI */

@keyframes gta-loader-pulse {
  0%, 22%, 92%, 100% { background-color: #29292e; }
  42% { background-color: #efaa9c; }
}

@keyframes gta-loader-shimmer {
  0% { top: -40%; left: -40%; }
  92%, 100% { top: 80%; left: 105%; }
}

@keyframes gta-loader-fadeout {
  from { opacity: 1; visibility: visible; }
  to { opacity: 0; visibility: hidden; }
}

.gta-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111117;
  transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1),
              visibility 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.gta-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gta-loader.is-exit {
  animation: gta-loader-fadeout 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.gta-loader-inner {
  position: relative;
  width: 120px;
  height: 120px;
}

.gta-loader-logo {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
  background-color: #29292e;
  -webkit-mask-image: url('assets/icons/loader-logo.svg');
  mask-image: url('assets/icons/loader-logo.svg');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  animation: gta-loader-pulse 2.15s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite both;
}

.gta-loader-logo::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -40%;
  width: 25%;
  height: 60%;
  background: linear-gradient(232deg, rgba(255, 223, 158, 0.9) 20%, rgba(239, 170, 156, 0.95) 70%);
  filter: blur(5px);
  transform: skew(-45deg, 45deg);
  z-index: -1;
  animation: gta-loader-shimmer 2.15s cubic-bezier(0.77, 0, 0.175, 1) infinite both;
}

.gta-loader-shadow {
  position: absolute;
  inset: 0;
  background: url('assets/icons/loader-logo.svg') center / contain no-repeat;
  filter: drop-shadow(0 0 12px rgba(239, 170, 156, 0.45));
  z-index: 1;
  pointer-events: none;
}

body.is-loading {
  overflow: hidden;
}
