/* Timingplanet Link Hub — Space Theme */
:root{
  --bg0:#040412;
  --bg1:#070818;
  --ink:#eaf0ff;
  --muted:rgba(234,240,255,.72);
  --glass:rgba(10,12,34,.58);
  --glass2:rgba(10,12,34,.36);
  --stroke:rgba(255,255,255,.14);
  --stroke2:rgba(255,255,255,.08);
  --shadow: 0 20px 50px rgba(0,0,0,.55);
  --glow: 0 0 24px rgba(140,180,255,.18), 0 0 60px rgba(180,120,255,.12);
  --r:22px;
}

*{box-sizing:border-box}
html,body{
  height: 100%;
  min-height: 100%;
  position: relative;
  margin:0;
  color:var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  /* Deep space: calm, dark, minimal */
  background-color: #000008;
  background:
    radial-gradient(1200px 900px at 28% 18%, rgba(80,120,255,.10), transparent 62%),
    radial-gradient(900px 720px at 72% 24%, rgba(150,110,255,.08), transparent 62%),
    radial-gradient(1100px 900px at 50% 96%, rgba(90,255,230,.04), transparent 68%),
    linear-gradient(180deg, #060616 0%, #050513 36%, #03030f 72%, #000008 100%);
  overflow-x:hidden;
}


/* ---------- Mobile polish ---------- */
@media (max-width: 520px){
  :root{
    --r: 22px;
  }

  .wrap{
    padding: 18px 14px 28px;
  }

  .card{
    width: min(96vw, 520px);
  }

  .top{
    padding: 18px 16px 8px;
    gap: 12px;
    align-items: center;
  }

  .avatar{
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

  .title{
    font-size: 26px;
    letter-spacing: .22em;
  }

  .subRow{
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
  }

  .controls{
    padding: 0 16px 14px;
    gap: 10px;
  }

  /* Make controls feel less squished: 2-column grid + full-width rows where needed */
  .controls{
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .controls .vol{
    grid-column: 1 / -1;
    width: 100%;
  }
  #copyDiscordBtn{
    grid-column: 1 / -1;
  }

  .ctrl{
    justify-content: center;
    padding: 12px 12px;
    border-radius: 16px;
    min-height: 46px; /* better touch target */
  }

  .vol{
    padding: 10px 12px;
    border-radius: 16px;
  }
  .vol input[type=range]{
    width: 100%;
  }

  .links{
    padding: 12px 12px 16px;
    gap: 12px;
  }

  .link{
    padding: 16px 14px;
    border-radius: 20px;
  }

  .linkTitle{
    font-size: 18px;
  }

  .linkSub{
    font-size: 13px;
  }

  .openIcon{
    width: 38px;
    height: 38px;
  }

  .footer{
    padding: 10px 12px 14px;
    gap: 10px;
  }

  .badge{
    font-size: 12px;
    padding: 7px 10px;
  }

  /* Reduce heavy blur on tiny screens (helps clarity/perf) */
  .card{
    backdrop-filter: blur(16px);
  }
}


/* Accessibility */
.skip{
  position:absolute; left:-999px; top:-999px;
  background:#000; color:#fff; padding:10px 12px; border-radius:12px;
}
.skip:focus{left:14px; top:14px; z-index:50}

#stars,
/* Viewport canvases (prevents cut-off on tall viewports) */
#stars, #fx{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  pointer-events:none;
  z-index:0;
}
#fx{ z-index:0; }
#atmo{ position:fixed; inset:0; z-index:1; pointer-events:none; transform: translateZ(0); }
.deepGlow{
  position:absolute;
  inset:-30%;
  opacity:.62;
  background:
    radial-gradient(900px 700px at 24% 34%, rgba(140,180,255,.12) 0%, rgba(140,180,255,0) 72%),
    radial-gradient(820px 660px at 78% 44%, rgba(190,120,255,.10) 0%, rgba(190,120,255,0) 74%),
    radial-gradient(1100px 900px at 50% 84%, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 78%);
  filter: none;
  mix-blend-mode: normal;
  transform: translateZ(0);
  pointer-events:none;
  /* Prevent gradient tiling seams */
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}


.grain{
  position:absolute; inset:0;
  opacity:.12;
  background-repeat: no-repeat;
  background-size: cover;
  mix-blend-mode: normal;
  pointer-events:none;
}

  to{transform: translate(3%, 2%) scale(1.08) rotate(2deg)}
}
  to{transform: translate(-2%, 2%) scale(1.09) rotate(-2deg)}
}
  to{transform: translate(0%, -2%) scale(1.08) rotate(6deg)}
}

  10%{transform:translate(-2%,3%)}
  20%{transform:translate(-4%,-2%)}
  30%{transform:translate(3%,4%)}
  40%{transform:translate(5%,-3%)}
  50%{transform:translate(-3%,2%)}
  60%{transform:translate(-5%,0%)}
  70%{transform:translate(2%,-4%)}
  80%{transform:translate(4%,1%)}
  90%{transform:translate(1%,4%)}
  100%{transform:translate(0,0)}
}


.vignette{
  position:absolute; inset:0;
  background: radial-gradient(1200px 700px at 50% 30%, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
  opacity:.8;
  /* Prevent gradient tiling seams on some screens */
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.wrap{
  position:relative;
  z-index:2;
  min-height:100vh;
  min-height:100svh;
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding: clamp(18px, 3vw, 40px);
}

.card{
  width:min(560px, 92vw);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(12,14,40,.62), rgba(10,12,34,.44));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow), var(--glow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow:hidden;
  transform-style: preserve-3d;
  position:relative;
}

.card::before{
  content:"";
  position:absolute; inset:-2px;
  background:
    radial-gradient(800px 200px at 10% 0%, rgba(140,180,255,.22), transparent 55%),
    radial-gradient(700px 240px at 90% 10%, rgba(190,120,255,.18), transparent 55%),
    linear-gradient(90deg, rgba(255,255,255,.10), transparent 40%, rgba(255,255,255,.06));
  opacity:.7;
  pointer-events:none;
  transform: translateZ(-2px);
}

.top{
  display:flex;
  gap: 16px;
  align-items:center;
  padding: 20px 20px 12px;
}

.avatar{
  width: 64px; height:64px;
  border-radius: 20px;
  position:relative;
  flex: 0 0 auto;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--stroke2);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  overflow:hidden;
}
.planet{
  position:absolute; inset:10px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.9), rgba(255,255,255,.10) 35%, transparent 60%),
    radial-gradient(circle at 60% 70%, rgba(80,220,255,.35), transparent 55%),
    radial-gradient(circle at 40% 60%, rgba(190,120,255,.35), transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(120,160,255,.35), rgba(30,40,90,.25));
  box-shadow: 0 0 30px rgba(140,180,255,.22);
  animation: planetFloat 5.5s ease-in-out infinite alternate;
}
@keyframes planetFloat{
  from{ transform: translateY(-1px) rotate(-2deg) }
  to{ transform: translateY(3px) rotate(2deg) }
}
.ring{
  position:absolute;
  left: -6px; right: -6px;
  top: 36px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.22);
  transform: rotate(-18deg);
  filter: drop-shadow(0 0 10px rgba(190,120,255,.18));
  opacity:.75;
}
.spark{
  position:absolute;
  width: 70px; height: 70px;
  left: -10px; top: -10px;
  border-radius: 999px;
  background: conic-gradient(from 220deg, rgba(255,255,255,0), rgba(255,255,255,.18), rgba(255,255,255,0));
  animation: sweep 3.2s linear infinite;
  mix-blend-mode: screen;
  /* Avoid 'rotating square' artifacts on some browsers by masking the element to a circle */
  -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 0 55%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 0 55%, transparent 78%);
}
@keyframes sweep{
  to{ transform: rotate(360deg) }
}

.titleBlock{min-width:0}
.title{
  margin:0;
  font-size: 22px;
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height:1.1;
}
  55%{transform: translateX(120%)}
  100%{transform: translateX(120%)}
}

.tagline{
  margin: 8px 0 0;
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}
.pill{
  border:1px solid var(--stroke2);
  background: rgba(255,255,255,.04);
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12) inset;
}
.pill.subtle{opacity:.88}
.dot{
  width:7px; height:7px; border-radius:99px;
  background: rgba(120,255,200,.85);
  box-shadow: 0 0 10px rgba(120,255,200,.35);
}

.controls{
  display:flex;
  gap: 10px;
  padding: 0 20px 16px;
  flex-wrap: wrap;
}

.vol{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.03);
}
.volIco{opacity:.8; font-size: 13px}
.vol input[type=range]{
  width: 130px;
  -webkit-appearance: none;
  appearance: none;
  height: 16px;
  border-radius: 999px;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.28) inset,
    0 0 18px rgba(160,180,255,.18);
  outline: none;
  cursor: pointer;
}

/* WebKit */
.vol input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width: 16px;
  height: 16px;
  margin-top: -4px; /* center thumb on 8px track */
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%,
    rgba(255,255,255,.95), rgba(210,225,255,.7) 45%, rgba(150,170,255,.4) 75%);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow:
    0 6px 18px rgba(0,0,0,.35),
    0 0 16px rgba(170,200,255,.45);
}
.vol input[type=range]::-webkit-slider-runnable-track{
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg,
      rgba(156,180,255,.95) 0%,
      rgba(196,140,255,.95) var(--pct, 35%),
      rgba(255,255,255,.18) var(--pct, 35%),
      rgba(255,255,255,.18) 100%);
}

/* Firefox */
.vol input[type=range]::-moz-range-track{
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  box-shadow: 0 0 0 1px rgba(0,0,0,.28) inset;
}
.vol input[type=range]::-moz-range-progress{
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(156,180,255,.95), rgba(196,140,255,.95));
}
.vol input[type=range]::-moz-range-thumb{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%,
    rgba(255,255,255,.95), rgba(210,225,255,.7) 45%, rgba(150,170,255,.4) 75%);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow:
    0 6px 18px rgba(0,0,0,.35),
    0 0 16px rgba(170,200,255,.45);
}

/* Focus ring */
.vol input[type=range]:focus-visible{
  outline: 2px solid rgba(170,200,255,.55);
  outline-offset: 4px;
}

.ctrl{
  appearance:none;
  border: 1px solid var(--stroke2);
  color: var(--ink);
  background: rgba(255,255,255,.05);
  border-radius: 14px;
  padding: 10px 12px;
  display:inline-flex;
  align-items:center;
  gap: 10px;
  cursor:pointer;
  position:relative;
  overflow:hidden;
  transform: translateZ(0);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
  user-select:none;
}
.ctrl:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.07);
}
.ctrl:active{transform: translateY(0px) scale(.98)}
.ctrlIcon{opacity:.92}
.ctrlText{font-weight:600; letter-spacing:.02em}
.ctrlGlow{
  position:absolute; inset:-40px;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
    rgba(140,180,255,.22), transparent 55%);
  opacity:0;
  transition: opacity .2s ease;
  pointer-events:none;
}
.ctrl:hover .ctrlGlow{opacity:1}

.ctrl.ghost{
  background: rgba(255,255,255,.03);
}

.divider{
  height:1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  margin: 0 16px;
  opacity:.7;
}

.links{
  padding: 18px 16px 10px;
  display:flex;
  flex-direction: column;
  gap: 12px;
}

.link{
  text-decoration:none;
  color: var(--ink);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background:
    radial-gradient(1400px 200px at 20% 0%, rgba(255,255,255,.08), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  padding: 14px 14px;
  display:flex;
  align-items:center;
  gap: 12px;
  position:relative;
  overflow:hidden;
  transform: translateZ(0);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: 0 12px 28px rgba(0,0,0,.32);
}

.link::before{
  content:"";
  position:absolute; inset:-2px;
  background: linear-gradient(90deg, rgba(140,180,255,.0), rgba(140,180,255,.16), rgba(190,120,255,.14), rgba(80,220,255,.10), rgba(140,180,255,.0));
  opacity:.0;
  transform: translateX(-20%);
  transition: opacity .18s ease;
  pointer-events:none;
}

.link:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 18px 40px rgba(0,0,0,.42), 0 0 30px rgba(140,180,255,.12);
  background:
    radial-gradient(1200px 220px at 40% 10%, rgba(255,255,255,.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
}
.link:hover::before{opacity:1}
.link:active{transform: translateY(0px) scale(.995)}

.ico{
  width: 44px; height: 44px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.14);
  position:relative;
  overflow:hidden;
}

.ico::after{
  content:"";
  position:absolute; inset:-20px;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.22), transparent 55%);
  opacity:.0;
  transition: opacity .2s ease;
  pointer-events:none;
  filter: blur(2px);
}
.link:hover .ico::after{opacity:.65}

.txt{display:flex; flex-direction:column; min-width:0}
.name{font-weight:700; letter-spacing:.01em}
.sub{
  margin-top:2px;
  color: var(--muted);
  font-size: 12.5px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chev{
  margin-left:auto;
  opacity:.7;
  font-weight:700;
  transform: translateY(-1px);
}
.shine{
  position:absolute; inset:-60px;
  background: radial-gradient(circle at var(--mx, 30%) var(--my, 20%), rgba(255,255,255,.18), transparent 55%);
  opacity:0;
  transition: opacity .2s ease;
  pointer-events:none;
}
.link:hover .shine{opacity:1}

/* Accent vibes per platform */
.link.yt{ --accent: rgba(255,90,90,.25); }
.link.gj{ --accent: rgba(120,255,200,.18); }
.link.tw{ --accent: rgba(190,120,255,.20); }
.link.tt{ --accent: rgba(80,220,255,.18); }
.link.dc{ --accent: rgba(140,180,255,.20); }

.link::after{
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(900px 260px at 0% 0%, var(--accent, rgba(255,255,255,.10)), transparent 60%);
  opacity:.85;
  pointer-events:none;
}

.footer{
  padding: 12px 16px 18px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.tiny{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
.badge{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.03);
  padding: 6px 10px;
  border-radius: 999px;
}
.badge.subtle{opacity:.85}

.mini{
  appearance:none;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.03);
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 12px;
  cursor:pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.mini:hover{transform: translateY(-1px); background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.20)}
.mini:active{transform: translateY(0) scale(.98)}


  50%{ transform: scale(1.25); opacity:1; }
  100%{ transform: scale(1); opacity:.85; }
}

/* Warp mode */
body.warp #atmo body.warp .card{ box-shadow: var(--shadow), 0 0 34px rgba(140,180,255,.22), 0 0 90px rgba(190,120,255,.18) }
body.warp .dot{ background: rgba(255,230,140,.92); box-shadow: 0 0 12px rgba(255,230,140,.40); }


/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important;}
  #stars,#fx{display:none}
  body{background: linear-gradient(180deg, var(--bg1), var(--bg0))}
}

.soundHint{
  margin: 2px 20px 8px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
  color: rgba(234,240,255,.78);
  font-size: 12.5px;
  letter-spacing: .02em;
}
@media (max-width: 520px){
  .soundHint{ margin: 2px 16px 8px; border-radius: 16px; }
}


/* ---------- Stronger mobile layout ---------- */
@media (max-width: 640px){
  :root{ --r: 20px; }

  .wrap{ padding: calc(14px + env(safe-area-inset-top, 0px)) 12px calc(24px + env(safe-area-inset-bottom, 0px)); }

  .card{ width: min(94vw, 560px); border-radius: 22px; }
  .top{ padding: 16px 14px 8px; gap: 10px; }
  .avatar{ width: 58px; height: 58px; border-radius: 16px; }

  .title{ font-size: 24px; letter-spacing: .18em; }

  .subRow{ flex-wrap: wrap; gap: 8px; margin-top: 6px; }

  .controls{ 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    padding: 0 14px 12px; 
  }
  .ctrl{ justify-content: center; padding: 12px; min-height: 44px; border-radius: 16px; }
  .vol{ grid-column: 1 / -1; width: 100%; padding: 10px 12px; border-radius: 16px; }
  .vol input[type=range]{ width: 100%; }

  #copyDiscordBtn{ grid-column: 1 / -1; }

  .links{ padding: 10px 10px 14px; gap: 12px; }
  .link{ padding: 16px 14px; border-radius: 18px; }
  .linkTitle{ font-size: 17.5px; }
  .linkSub{ font-size: 13px; }
  .openIcon{ width: 36px; height: 36px; }

  .footer{ padding: 10px 12px 12px; gap: 10px; }
  .badge{ font-size: 12px; padding: 6px 9px; }

  /* Slightly lower blur for readability on small screens */
  .card{ backdrop-filter: blur(14px); }
}

@media (max-width: 390px){
  .title{ font-size: 22px; letter-spacing: .16em; }
  .controls{ grid-template-columns: 1fr; }
}

.ico svg,
.ico img{
  width: 22px;
  height: 22px;
  display:block;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.35));
}

.ico::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 25%, var(--accent), transparent 62%);
  opacity:.9;
  filter: blur(10px);
  pointer-events:none;
}

.chev{
  width: 34px; height: 34px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.12);
  opacity:.9;
}
.chev svg{ width: 18px; height: 18px; display:block; }
.link:hover .chev{ background: rgba(255,255,255,.06); }

.iconImg{
  width: 24px;
  height: 24px;
  display:block;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.35));
  transform: translateZ(0);
}

/* Keyboard focus polish */
a:focus-visible, button:focus-visible, input:focus-visible{
  outline: 2px solid rgba(180,220,255,.65);
  outline-offset: 3px;
}

.iconImg{ image-rendering: auto; }


/* ---------- Title shimmer FX (no sweep line) ---------- */
.shimmer{
  display:inline-block;
  position:relative;
  letter-spacing: inherit;

  /* Smooth drifting gradient */
  background: linear-gradient(90deg,
    rgba(235,245,255,.96) 0%,
    rgba(170,190,255,.92) 22%,
    rgba(190,140,255,.90) 48%,
    rgba(120,240,255,.90) 72%,
    rgba(245,250,255,.96) 100%);
  background-size: 340% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip:text;
  color: transparent;

  /* Calm “breathing” glow */
  text-shadow:
    0 0 16px rgba(140,180,255,.18),
    0 0 36px rgba(190,120,255,.10);
  animation: shimmerFlow 10s ease-in-out infinite alternate, shimmerGlow 4.8s ease-in-out infinite;
}

/* Soft aura */
.shimmer::after{
  content: attr(data-text);
  position:absolute;
  inset:0;
  color: rgba(170,210,255,.22);
  filter: blur(10px);
  opacity: .85;
  pointer-events:none;
}

/* Tiny chromatic edge for sci‑fi feel (subtle) */
.shimmer::before{
  content: attr(data-text);
  position:absolute;
  inset:0;
  color: rgba(190,120,255,.12);
  transform: translate(0.8px, 0.5px);
  pointer-events:none;
  opacity: .7;
}

@keyframes shimmerFlow{
  0%{ background-position: 0% 50%; }
  100%{ background-position: 100% 50%; }
}
@keyframes shimmerGlow{
  0%,100%{
    text-shadow:
      0 0 14px rgba(140,180,255,.16),
      0 0 32px rgba(190,120,255,.09);
  }
  50%{
    text-shadow:
      0 0 22px rgba(140,180,255,.24),
      0 0 48px rgba(190,120,255,.14);
  }
}

/* Desktop hover: slightly more energy */
@media (hover:hover){
  .title:hover .shimmer{ animation-duration: 6.5s, 3.8s; }
}


/* ---------- Hyperdrive Glitch (toggles with body.warp) ---------- */
@keyframes uiJitter {
  0%   { transform: translate3d(0,0,0); }
  8%   { transform: translate3d(-0.6px, 0.3px, 0); }
  12%  { transform: translate3d(0.8px, -0.4px, 0); }
  18%  { transform: translate3d(-1.0px, 0.6px, 0); }
  24%  { transform: translate3d(0.4px, 0.2px, 0); }
  40%  { transform: translate3d(0.2px, -0.6px, 0); }
  55%  { transform: translate3d(-0.8px, 0.4px, 0); }
  70%  { transform: translate3d(0.6px, -0.2px, 0); }
  86%  { transform: translate3d(-0.2px, 0.2px, 0); }
  100% { transform: translate3d(0,0,0); }
}
@keyframes chromaFlicker {
  0%, 100% { filter: saturate(1.0) contrast(1.0) hue-rotate(0deg); }
  35%      { filter: saturate(1.25) contrast(1.05) hue-rotate(6deg); }
  55%      { filter: saturate(1.15) contrast(1.08) hue-rotate(-7deg); }
}
@keyframes glitchSlices {
  0%   { clip-path: inset(0 0 92% 0); transform: translate3d(-1px,0,0); opacity:.55; }
  10%  { clip-path: inset(12% 0 78% 0); transform: translate3d(1px,0,0); opacity:.6; }
  22%  { clip-path: inset(44% 0 44% 0); transform: translate3d(-2px,0,0); opacity:.55; }
  36%  { clip-path: inset(70% 0 18% 0); transform: translate3d(2px,0,0); opacity:.5; }
  55%  { clip-path: inset(20% 0 66% 0); transform: translate3d(-1px,0,0); opacity:.6; }
  72%  { clip-path: inset(58% 0 30% 0); transform: translate3d(1px,0,0); opacity:.55; }
  100% { clip-path: inset(0 0 92% 0); transform: translate3d(0,0,0); opacity:.55; }
}

/* Keep it readable: only glitch UI elements (not the full background) */
body.warp .card{
  animation: uiJitter 0.6s steps(2, end) infinite, chromaFlicker 1.8s ease-in-out infinite;
  will-change: transform, filter;
}
body.warp .link{
  animation: uiJitter 0.55s steps(2, end) infinite;
  will-change: transform;
}
body.warp .badge, 
body.warp .mini,
body.warp .ctrl{
  animation: uiJitter 0.7s steps(2, end) infinite;
}

/* Title glitch (subtle chromatic ghost + sliced flicker) */
.title{
  position: relative;
}
.title::before,
.title::after{
  content: attr(data-text);
  position:absolute;
  inset: 0;
  pointer-events:none;
  opacity: 0;
}
body.warp .title::before{
  opacity: .55;
  color: rgba(110,200,255,.95);
  transform: translate3d(-1px,0,0);
  mix-blend-mode: screen;
  animation: glitchSlices 1.1s steps(2,end) infinite;
}
body.warp .title::after{
  opacity: .50;
  color: rgba(210,120,255,.95);
  transform: translate3d(1px,0,0);
  mix-blend-mode: screen;
  animation: glitchSlices 1.35s steps(2,end) infinite reverse;
}

/* Tiny chroma edge on text during warp */
body.warp .title,
body.warp .linkTitle{
  text-shadow: -1px 0 rgba(110,200,255,.35), 1px 0 rgba(210,120,255,.35);
}

/* Reduce motion users: keep Hyperdrive visuals but disable jitter */
@media (prefers-reduced-motion: reduce){
  body.warp .card,
  body.warp .link,
  body.warp .badge,
  body.warp .mini,
  body.warp .ctrl,
  body.warp .title::before,
  body.warp .title::after{
    animation: none !important;
  }
}


/* ---------- EliteJump: hyperspace jump burst (one-shot) ---------- */
#jumpFX{
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 2; /* above canvases + atmo layers, below UI */
  opacity: 0;
  transform: translateZ(0);
}

/* Tunnel + streaky scanlines + lens flare-ish center */
#jumpFX::before{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(800px 520px at 50% 45%, rgba(210,240,255,.16), rgba(0,0,0,0) 68%),
    radial-gradient(1200px 900px at 50% 45%, rgba(120,170,255,.10), rgba(0,0,0,0) 72%),
    conic-gradient(from 180deg at 50% 45%, rgba(255,255,255,.00), rgba(255,255,255,.06), rgba(255,255,255,.00)),
    repeating-linear-gradient(180deg, rgba(255,255,255,.00) 0px, rgba(255,255,255,.00) 7px, rgba(255,255,255,.030) 8px);
  mix-blend-mode: screen;
  filter: saturate(130%) contrast(115%);
  opacity: 0;
  transform: scale(1.02);
}

/* Chromatic smear + edge vignette */
#jumpFX::after{
  content:"";
  position:absolute; inset:0;
  background:
    radial-gradient(900px 640px at 50% 45%, rgba(160,110,255,.10), rgba(0,0,0,0) 70%),
    radial-gradient(900px 640px at 52% 47%, rgba(90,220,255,.10), rgba(0,0,0,0) 70%),
    radial-gradient(1100px 820px at 50% 55%, rgba(0,0,0,0) 56%, rgba(0,0,0,.28) 100%);
  opacity: 0;
  mix-blend-mode: screen;
}

/* One-shot: engage jump */
@keyframes jumpBurst {
  0%   { opacity: 0; transform: translateZ(0) scale(0.98); }
  8%   { opacity: 1; transform: translateZ(0) scale(1.02); }
  22%  { opacity: .9; transform: translateZ(0) scale(1.06); }
  60%  { opacity: .55; transform: translateZ(0) scale(1.14); }
  100% { opacity: 0; transform: translateZ(0) scale(1.20); }
}
@keyframes tunnelPulse {
  0%   { opacity: 0; transform: scale(1.0) rotate(0deg); }
  10%  { opacity: .95; transform: scale(1.05) rotate(0.5deg); }
  30%  { opacity: .85; transform: scale(1.12) rotate(-0.6deg); }
  70%  { opacity: .45; transform: scale(1.22) rotate(0.8deg); }
  100% { opacity: 0; transform: scale(1.30) rotate(1.2deg); }
}
@keyframes chromaSmear {
  0%   { opacity: 0; transform: translate3d(0,0,0) scale(1.0); }
  12%  { opacity: .75; transform: translate3d(-6px, 1px, 0) scale(1.06); }
  28%  { opacity: .55; transform: translate3d(5px, -1px, 0) scale(1.12); }
  60%  { opacity: .35; transform: translate3d(-2px, 1px, 0) scale(1.20); }
  100% { opacity: 0; transform: translate3d(0,0,0) scale(1.26); }
}

/* Drive it with body.jump (short, intense), then fall back to body.warp (mild glitch) */
body.jump #jumpFX{
  animation: jumpBurst 1.15s ease-out 1;
  opacity: 1;
}
body.jump #jumpFX::before{
  animation: tunnelPulse 1.15s ease-out 1;
}
body.jump #jumpFX::after{
  animation: chromaSmear 1.15s ease-out 1;
}

/* UI distortion during the jump (short) */
body.jump .card{
  filter: saturate(1.25) contrast(1.08) blur(.4px);
  transform: translate3d(0,0,0) scale(1.01) skewX(-0.35deg);
}
body.jump .link{
  transform: translate3d(0,0,0) skewX(0.35deg);
}

/* Make warp look "like a drive" (mild persistent bug-out) */
body.warp .card{
  transform: translate3d(0,0,0);
}

/* Reduce motion users */
@media (prefers-reduced-motion: reduce){
  body.jump #jumpFX,
  body.jump #jumpFX::before,
  body.jump #jumpFX::after{
    animation: none !important;
    opacity: 0 !important;
  }
  body.jump .card,
  body.jump .link{
    filter: none !important;
    transform: none !important;
  }
}
