/* Premium Animated Title/Team Slide — CSS */

:root {
  --bg1: #0e1035;
  --bg2: #2a0d5e;
  --text: #e6e6e6;
  --muted: #a0a6b3;
  --accent: #5cecff;
  --cyan: #39c7ff;
  --chip: #1b2048;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Helvetica Neue", sans-serif;
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  overflow: hidden;
}

.slide {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
}
.slide.fade-out { opacity: 0; transform: scale(0.98); transition: opacity 600ms ease, transform 600ms ease; }

/* Particle / circuit background */
.bg::before,
.bg::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
}
.bg::before {
  background-image:
    radial-gradient(#ffffff10 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.2;
  animation: drift 28s linear infinite;
}
.bg::after {
  background: repeating-linear-gradient(90deg, #6ee7ff08 0 2px, transparent 2px 160px);
  mask-image: radial-gradient(ellipse at center, rgba(255,255,255,0.25), transparent 60%);
  opacity: 0.15;
  animation: flicker 5s ease-in-out infinite;
}
@keyframes drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-60px,-60px,0); } }
@keyframes flicker { 0%,100%{ opacity:0.08 } 50%{ opacity:0.18 } }

.stage {
  position: relative;
  max-width: 1000px;
  padding: 40px 24px 60px;
  text-align: center;
}

/* CPU chip */
.cpu-chip {
  width: 140px; height: 140px; border-radius: 18px;
  margin: 0 auto 18px;
  background: linear-gradient(145deg, #15183a, var(--chip));
  box-shadow:
    0 8px 30px rgba(0,0,0,0.45),
    0 0 0 2px rgba(92,236,255,0.18) inset,
    0 0 24px rgba(92,236,255,0.35);
  position: relative;
  animation: pulseGlow 3.6s ease-in-out infinite;
}
.cpu-chip::before {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 26px;
  box-shadow: 0 0 40px rgba(92,236,255,0.35);
}
.chip-core {
  position: absolute; inset: 22px;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, #1e224d, #0f1338);
}
.chip-lines {
  position: absolute; inset: 6px;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 10px);
  border-radius: 16px;
  mask-image: linear-gradient(to bottom, transparent 0 12px, #000 12px calc(100% - 12px), transparent calc(100% - 12px));
}
@keyframes pulseGlow { 0%,100%{ filter: drop-shadow(0 0 0 rgba(92,236,255,0.0)); } 50%{ filter: drop-shadow(0 0 12px rgba(92,236,255,0.45)); } }

/* Orbiting icons */
.orbit { position: relative; width: 280px; height: 280px; margin: 0 auto; animation: rotate 24s linear infinite; }
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.orb {
  position: absolute; top: 50%; left: 50%;
  font-size: 22px; transform-origin: -90px -90px;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.45));
}
.orb1 { transform: translate(-50%, -50%) rotate(0deg) translate(110px); }
.orb2 { transform: translate(-50%, -50%) rotate(90deg) translate(110px); }
.orb3 { transform: translate(-50%, -50%) rotate(180deg) translate(110px); }
.orb4 { transform: translate(-50%, -50%) rotate(270deg) translate(110px); }

/* Title and subtitle with premium glow */
.title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: 1.2px;
  margin: 10px 0 6px;
  color: #eaf9ff;
  text-shadow: 0 0 8px rgba(92,236,255,0.25), 0 0 18px rgba(92,236,255,0.18);
  opacity: 0; transform: translateY(30px);
  animation: slideUp 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.subtitle {
  font-size: clamp(16px, 2.6vw, 22px);
  color: var(--muted);
  margin: 0 0 18px;
  opacity: 0; transform: translateY(18px);
  animation: fadeUp 900ms 300ms ease-out forwards;
}
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Team names */
.team { list-style: none; padding: 0; margin: 18px 0 24px; }
.team-name { opacity: 0; transform: translateY(8px); filter: brightness(0.9); }
.team-name.show { animation: nameReveal 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes nameReveal { 0% { opacity: 0; transform: translateY(12px); text-shadow: none; } 100% { opacity: 1; transform: translateY(0); text-shadow: 0 0 10px rgba(92,236,255,0.18); } }

/* Start button */
.start-btn {
  margin-top: 12px;
  padding: 12px 22px;
  font-size: 16px;
  color: #dfffff;
  background: rgba(24, 40, 58, 0.35);
  border: 1px solid rgba(92,236,255,0.35);
  border-radius: 12px;
  box-shadow: inset 0 0 18px rgba(92,236,255,0.12), 0 0 22px rgba(92,236,255,0.22);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transform: translateY(8px) scale(0.98);
  opacity: 0; pointer-events: none;
  transition: transform 220ms ease, box-shadow 220ms ease, opacity 500ms ease;
}
.start-btn.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.start-btn:hover { transform: translateY(0) scale(1.05); box-shadow: inset 0 0 24px rgba(92,236,255,0.16), 0 0 28px rgba(92,236,255,0.32); }
.start-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.footer {
  position: absolute; bottom: 18px; left: 0; right: 0;
  text-align: center; color: #cdd7ff;
  font-size: 12px; opacity: 0.8;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .orbit { width: 240px; height: 240px; }
  .cpu-chip { width: 120px; height: 120px; }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .bg::before, .bg::after, .orbit, .cpu-chip { animation: none !important; }
}