/* Opening / loading screen, GTA-style: full-screen artwork slides in with a neon wipe,
   drifts slowly, and a loader sits in the corner. Réveillon City palette only. */
#start-screen {
  --e-pink: #FF00A8; --e-magenta: #E6007D; --e-sunset: #FF8A3D; --e-gold: #FFD166; --e-purple: #6A00FF; --e-night: #0B0F2B;
  position: absolute; z-index: 25; overflow: hidden; isolation: isolate;
  color: #fff4fb; background: var(--e-night);
  font-family: 'Bahnschrift', 'Segoe UI', system-ui, sans-serif;
  transition: opacity .5s ease, visibility .5s;
}
/* Artwork stack: the active slide sits on top; the previous one stays underneath while the new one wipes in. */
.entry-slides { position: absolute; inset: 0; z-index: -2; overflow: hidden;
  background: radial-gradient(ellipse at 70% 30%, #6A00FF66, transparent 55%), radial-gradient(ellipse at 20% 80%, #FF00A84d, transparent 60%), var(--e-night); }
.entry-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform-origin: 50% 45%; will-change: transform, clip-path; }
.entry-slide.is-active, .entry-slide.is-leaving { opacity: 1; }
.entry-slide.is-leaving { z-index: 1; animation: entry-drift 9s linear both; }
.entry-slide.is-active { z-index: 2; animation: entry-wipe-in 1.15s cubic-bezier(.7,0,.2,1) both, entry-drift 9s linear .2s both; }
.entry-slide.is-active.drift-left { animation-name: entry-wipe-in, entry-drift-left; }
/* Neon blade that leads each wipe. */
.entry-wipe { position: absolute; top: -10%; bottom: -10%; width: 14%; z-index: 3; left: 100%; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, #FF00A8cc 35%, #FFD166 50%, #6A00FFcc 65%, transparent); filter: blur(6px); transform: skewX(-12deg); mix-blend-mode: screen; }
.entry-wipe.run { animation: entry-blade 1.15s cubic-bezier(.7,0,.2,1) both; }
.entry-shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(0deg, #0B0F2Bf2 0%, #0B0F2B99 16%, transparent 38%),
    linear-gradient(180deg, #0B0F2Bb3 0%, transparent 22%),
    radial-gradient(ellipse at 100% 100%, #E6007D33, transparent 45%); }
.art-unavailable .entry-slide { display: none; }

/* Logo: centred over the artwork for the whole slideshow, sized to the screen, with a soft
   dark halo so it reads on any image and a slow neon breath. */
.entry-logo { position: absolute; left: 50%; top: 44%; z-index: 1; width: clamp(260px, 36vw, 540px); max-height: 46vh; aspect-ratio: 3 / 2; margin: 0;
  transform: translate(-50%, -50%); pointer-events: none;
  animation: entry-logo-in 1.2s ease-out backwards, entry-logo-glow 4.5s ease-in-out 1.2s infinite; filter: drop-shadow(0 10px 30px #000a) drop-shadow(0 0 18px #FF00A84d); }
.entry-logo::before { content: ''; position: absolute; inset: -12% -18%; z-index: -1; border-radius: 50%;
  background: radial-gradient(ellipse at center, #0B0F2Bb3 0%, #0B0F2B66 40%, transparent 70%); }
.entry-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* Caption and slide progress (bottom-left), like the loading tips. */
.entry-caption { position: absolute; left: clamp(20px, 4vw, 64px); bottom: 64px; max-width: min(560px, 62vw); margin: 0; opacity: 0; transform: translateY(10px);
  transition: opacity .6s ease, transform .6s ease; text-shadow: 0 2px 12px #000c; }
.entry-caption.show { opacity: 1; transform: none; }
.entry-caption b { display: block; font: 700 clamp(22px, 2.6vw, 38px)/1.05 Impact, Haettenschweiler, 'Arial Narrow Bold', 'Bahnschrift', sans-serif; letter-spacing: 1.2px;
  background: linear-gradient(90deg, #FFD166, #FF8A3D 45%, #FF00A8); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 6px #000a); }
.entry-caption span { display: block; margin-top: 6px; font-size: clamp(13px, 1.1vw, 16px); color: #ffe9f6; }
.entry-dots { position: absolute; left: clamp(20px, 4vw, 64px); bottom: 40px; display: flex; gap: 6px; }
.entry-dots i { width: 34px; height: 3px; border-radius: 2px; background: #ffffff33; overflow: hidden; position: relative; }
.entry-dots i.done { background: #FF00A8aa; }
.entry-dots i.on::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #FF00A8, #FFD166); transform-origin: left; animation: entry-dot var(--slide-ms, 6500ms) linear both; }

/* Loader (bottom-right) and the bottom progress line. */
.entry-content { position: absolute; right: clamp(20px, 4vw, 64px); bottom: 36px; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.entry-loading { min-height: 54px; }
.entry-status { display: flex; align-items: center; justify-content: flex-end; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; text-shadow: 0 2px 10px #000a; }
.entry-status p { margin: 0; }
.entry-spinner { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(from 0deg, transparent 0 15%, #6A00FF 35%, #FF00A8 65%, #FFD166 95%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 52%, #000 56%); mask: radial-gradient(circle, transparent 52%, #000 56%); animation: entry-spin .9s linear infinite; }
#start-screen #loading-text { margin: 6px 0 0; min-height: 18px; color: #ffd9ef; opacity: 1; font-size: 13px; font-weight: 400; letter-spacing: .2px; text-shadow: 0 1px 8px #000b; }
#start-screen #loading-wrap { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; width: auto; margin: 0; background: #ffffff1a; border-radius: 0; overflow: hidden; }
#start-screen #loading-bar { width: 0; height: 100%; background: linear-gradient(90deg, #6A00FF, #FF00A8 55%, #FF8A3D 85%, #FFD166); box-shadow: 0 0 14px #FF00A8; transition: width .45s ease-out; }
#start-actions { display: flex; flex-direction: column; gap: 10px; width: min(320px, calc(100vw - 40px)); animation: entry-reveal .5s ease-out both; }
.entry-action { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border: 0; border-radius: 6px;
  cursor: pointer; font: 700 15px 'Bahnschrift', 'Segoe UI', sans-serif; letter-spacing: 3px; text-align: left; transition: transform .2s, box-shadow .2s, filter .2s; }
.entry-action svg { width: 20px; height: 20px; flex-shrink: 0; }
.entry-action.entry-primary { color: #fff; background: linear-gradient(100deg, #6A00FF, #FF00A8 55%, #FF8A3D); box-shadow: 0 4px 0 #8a0050, 0 10px 30px #FF00A866;
  animation: entry-reveal .5s ease-out backwards, entry-pulse 2.4s ease-in-out .6s infinite; }
.entry-action.entry-primary:hover, .entry-action.entry-primary:focus-visible { transform: translateY(-2px); filter: brightness(1.12); box-shadow: 0 6px 0 #8a0050, 0 14px 38px #FF00A899; }
#start-screen.motion-paused *, #start-screen.motion-paused *::after { animation-play-state: paused !important; }
#start-screen.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
#fatal { z-index: 100; }

@keyframes entry-wipe-in { from { clip-path: polygon(108% 0, 120% 0, 112% 100%, 100% 100%); transform: scale(1.1) translateX(2.5%); } to { clip-path: polygon(-12% 0, 120% 0, 112% 100%, -20% 100%); transform: scale(1.06) translateX(0); } }
@keyframes entry-drift { from { transform: scale(1.06) translate3d(0, 0, 0); } to { transform: scale(1.14) translate3d(-1.8%, -.8%, 0); } }
@keyframes entry-drift-left { from { transform: scale(1.06) translate3d(0, 0, 0); } to { transform: scale(1.14) translate3d(1.8%, .6%, 0); } }
@keyframes entry-blade { 0% { left: 100%; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: -20%; opacity: 0; } }
@keyframes entry-logo-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.94); filter: blur(6px) drop-shadow(0 0 0 #0000); } }
@keyframes entry-logo-glow { 50% { filter: drop-shadow(0 10px 30px #000a) drop-shadow(0 0 30px #FF00A888); } }
@keyframes entry-reveal { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: translateY(0); } }
@keyframes entry-spin { to { transform: rotate(360deg); } }
@keyframes entry-dot { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes entry-pulse { 50% { box-shadow: 0 4px 0 #8a0050, 0 10px 44px #FF00A8aa; } }

@media (max-width: 760px) {
  .entry-logo { width: min(340px, 78vw); top: 36%; }
  .entry-caption { left: 16px; right: 16px; bottom: 150px; max-width: none; }
  .entry-dots { left: 16px; bottom: 128px; }
  .entry-content { left: 16px; right: 16px; bottom: 28px; align-items: stretch; text-align: left; }
  .entry-status { justify-content: flex-start; font-size: 17px; }
  #start-actions { width: auto; }
}
@media (max-height: 460px) {
  .entry-caption { bottom: 52px; } .entry-caption span { display: none; } .entry-dots { bottom: 30px; }
  .entry-logo { width: min(300px, 40vw); top: 40%; }
}
/* Reduced motion: plain crossfades, no zoom, wipe or pulse. */
@media (prefers-reduced-motion: reduce) {
  #start-screen *, #start-screen *::after { animation: none !important; transition: none !important; }
  .entry-slide { transition: opacity .01s !important; }
  #start-screen { transition: none; }
}
