/* Smooth: "Join our Discord" popup at the end of the first-time tutorial (js/smooth-tutorial-discord.js).
   Over the intro (login view, z 80); the old invite popup stays under the dimmed, blurred backdrop. Everything is under #tut-discord. */
#tut-discord{position:fixed;inset:0;z-index:95;display:grid;place-items:center;padding:12px;box-sizing:border-box;
  background:rgba(5,8,26,.72);-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);opacity:0;transition:opacity .25s ease;
  font:15px/1.45 "MG VAG","Trebuchet MS",Arial,sans-serif;color:#fff}
#tut-discord.is-shown{opacity:1}
#tut-discord *{box-sizing:border-box}
#tut-discord .tdc-card{position:relative;width:min(560px,100%);max-height:calc(100vh - 24px);overflow:auto;overscroll-behavior:contain;border-radius:22px;
  background:radial-gradient(120% 80% at 100% 0%,rgba(88,101,242,.28),transparent 60%),linear-gradient(180deg,#1b2d4a 0%,#131f36 60%,#0e182b 100%);
  border:1.5px solid rgba(124,138,255,.55);box-shadow:0 24px 60px rgba(0,0,0,.6),0 0 0 6px rgba(88,101,242,.12),inset 0 1px 0 rgba(255,255,255,.08);
  transform:translateY(14px) scale(.97);transition:transform .35s cubic-bezier(.2,1.2,.4,1)}
#tut-discord.is-shown .tdc-card{transform:none}

/* hero: the game's icon with the Discord badge and a few sparkles */
#tut-discord .tdc-hero{position:relative;height:150px;display:grid;place-items:center;
  background:radial-gradient(60% 90% at 50% 100%,rgba(88,101,242,.35),transparent 70%)}
#tut-discord .tdc-art{width:116px;height:116px;border-radius:50%;box-shadow:0 0 0 4px rgba(255,255,255,.12),0 10px 30px rgba(0,0,0,.5),0 0 40px rgba(88,101,242,.45);animation:tdc-float 3.6s ease-in-out infinite}
#tut-discord .tdc-badge{position:absolute;left:calc(50% + 30px);top:calc(50% + 18px);width:46px;height:46px;padding:10px;border-radius:14px;background:#5865f2;
  box-shadow:0 3px 0 #3c45a5,0 0 0 4px #131f36;animation:tdc-float 3.6s ease-in-out infinite .3s}
#tut-discord .tdc-badge img{display:block;width:100%;height:100%}
#tut-discord .tdc-spark{position:absolute;color:#ffd96a;font-size:18px;text-shadow:0 0 10px rgba(255,217,106,.8);animation:tdc-twinkle 2.4s ease-in-out infinite}
#tut-discord .tdc-spark.s1{left:calc(50% - 96px);top:34px}
#tut-discord .tdc-spark.s2{left:calc(50% + 86px);top:26px;font-size:13px;animation-delay:.8s}
#tut-discord .tdc-spark.s3{left:calc(50% - 74px);top:104px;font-size:12px;animation-delay:1.5s}
@keyframes tdc-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes tdc-twinkle{0%,100%{opacity:.25;transform:scale(.8)}50%{opacity:1;transform:scale(1.1)}}

#tut-discord .tdc-body{padding:4px 28px 26px;text-align:center}
#tut-discord .tdc-kicker{margin:0 0 4px;color:#ffd96a;font:13px/1.2 "MG VAG Bold",Arial,sans-serif;letter-spacing:.12em;text-transform:uppercase}
#tut-discord h2{margin:0 0 8px;font:26px/1.15 "MG VAG Bold","MG VAG",Arial,sans-serif;text-shadow:0 2px 4px rgba(0,0,0,.5)}
#tut-discord .tdc-lead{margin:0 auto 14px;max-width:420px;color:#c8d6ec;font-size:15px}
#tut-discord .tdc-perks{list-style:none;margin:0 auto 14px;padding:0;max-width:440px;display:grid;grid-template-columns:1fr 1fr;gap:8px;text-align:left}
#tut-discord .tdc-perks li{display:flex;align-items:center;gap:9px;padding:9px 11px;border-radius:12px;background:rgba(255,255,255,.05);border:1px solid rgba(140,180,230,.14);font-size:13.5px;line-height:1.3;color:#dbe8fa}
#tut-discord .tdc-perks span{flex:none;font-size:18px;line-height:1}
#tut-discord .tdc-online{display:inline-flex;align-items:center;gap:8px;margin:0 0 14px;padding:5px 12px;border-radius:999px;background:rgba(59,165,92,.14);color:#9ff0b9;font:13px "MG VAG Bold",Arial,sans-serif}
#tut-discord .tdc-online[hidden]{display:none}
#tut-discord .tdc-online i{width:8px;height:8px;border-radius:50%;background:#3ba55c;box-shadow:0 0 0 0 rgba(59,165,92,.6);animation:tdc-pulse 1.8s infinite}
@keyframes tdc-pulse{70%{box-shadow:0 0 0 8px rgba(59,165,92,0)}100%{box-shadow:0 0 0 0 rgba(59,165,92,0)}}
#tut-discord .tdc-actions{display:flex;flex-direction:column;align-items:center;gap:8px}
#tut-discord .tdc-join{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:min(320px,100%);padding:14px 22px;border-radius:999px;
  background:linear-gradient(180deg,#6f7bff,#5865f2);color:#fff;text-decoration:none;font:17px/1 "MG VAG Bold","MG VAG",Arial,sans-serif;
  box-shadow:0 4px 0 #3c45a5,0 10px 24px rgba(88,101,242,.45);transition:filter .15s,transform .15s}
#tut-discord .tdc-join img{width:22px;height:22px}
#tut-discord .tdc-join:hover{filter:brightness(1.08);transform:translateY(-1px)}
#tut-discord .tdc-join:active{transform:translateY(2px);box-shadow:0 2px 0 #3c45a5}
#tut-discord .tdc-later{min-height:0;margin:0;padding:8px 16px;border:0;border-radius:999px;background:transparent;color:#8fa6c8;font:14px "MG VAG",Arial,sans-serif;cursor:pointer}
#tut-discord .tdc-later:hover{color:#fff;background:rgba(255,255,255,.06)}
#tut-discord a:focus-visible,#tut-discord button:focus-visible{outline:2px solid #fff;outline-offset:3px}

/* short screens (phones sideways): picture on the left, text on the right */
@media (max-height:520px){
  #tut-discord .tdc-card{width:min(720px,100%);display:grid;grid-template-columns:200px 1fr;align-items:center}
  #tut-discord .tdc-hero{height:100%;min-height:220px}
  #tut-discord .tdc-art{width:96px;height:96px}
  #tut-discord .tdc-body{padding:16px 22px 16px 4px;text-align:left}
  #tut-discord h2{font-size:21px;margin-bottom:6px}
  #tut-discord .tdc-lead{margin:0 0 10px;font-size:13.5px}
  #tut-discord .tdc-perks{margin:0 0 10px;gap:6px;max-width:none}
  #tut-discord .tdc-perks li{padding:6px 9px;font-size:12.5px}
  #tut-discord .tdc-online{margin-bottom:10px}
  #tut-discord .tdc-actions{flex-direction:row;justify-content:flex-start;flex-wrap:wrap}
  #tut-discord .tdc-join{width:auto;padding:11px 18px;font-size:15px}
}
/* narrow screens (phones upright) */
@media (max-width:460px){
  #tut-discord .tdc-perks{grid-template-columns:1fr}
  #tut-discord h2{font-size:22px}
  #tut-discord .tdc-body{padding:4px 18px 20px}
}
@media (prefers-reduced-motion:reduce){
  #tut-discord,#tut-discord .tdc-card{transition:none}
  #tut-discord .tdc-art,#tut-discord .tdc-badge,#tut-discord .tdc-spark,#tut-discord .tdc-online i{animation:none}
}
