/* ===== School Cheats window + lean loading screen ===== */
#win-schoolcheats .wbody { position: relative; background: #0b0710; }
#win-schoolcheats iframe { width: 100%; height: 100%; border: 0; display: block; background: #0b0710; }

.sc-load {
  position: absolute; inset: 0; z-index: 5; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(900px 600px at 50% 115%, #5b1fa8 0%, transparent 60%),
              radial-gradient(700px 500px at 50% -10%, #3a0f73 0%, transparent 60%), #0d0517;
  color: #f1e4ff; text-align: center;
  transition: opacity .6s ease, visibility .6s;
}
.sc-load.done { opacity: 0; visibility: hidden; pointer-events: none; }

/* drifting haze */
.sc-haze { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: scDrift 9s ease-in-out infinite alternate; }
.sc-haze.a { width: 320px; height: 320px; background: #8b3dff; left: -80px; top: 8%; }
.sc-haze.b { width: 360px; height: 360px; background: #d052ff; right: -100px; bottom: 4%; animation-delay: -3s; opacity: .4; }
.sc-haze.c { width: 240px; height: 240px; background: #4b1d9c; left: 35%; top: -60px; animation-delay: -6s; }
@keyframes scDrift { from { transform: translate(0,0) scale(1); } to { transform: translate(40px,-30px) scale(1.15); } }

.sc-title { position: relative; z-index: 1; font-size: 30px; font-weight: 700; letter-spacing: -0.02em;
  background: linear-gradient(90deg, #f6e9ff, #d79bff 50%, #b05cff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(176,92,255,.55)); }

/* the scene: cup pours along the bar */
.sc-stage { position: relative; z-index: 1; width: min(380px, 90%); height: auto; overflow: visible;
  filter: drop-shadow(0 0 18px rgba(150,60,240,.35)); }

.sc-fill { transform-box: view-box; transform-origin: 40px 0; transform: scaleX(0); }
.sc-load.run .sc-fill { animation: scGrow 5s linear forwards; }
@keyframes scGrow { to { transform: scaleX(1); } }

.sc-pour { transform: translateX(0); }
.sc-load.run .sc-pour { animation: scTravel 5s linear forwards; }
@keyframes scTravel { to { transform: translateX(180px); } }

.sc-wob { transform-origin: 40px 88px; }
.sc-load.run .sc-wob { animation: scWob 1.6s ease-in-out infinite alternate; }
@keyframes scWob { from { transform: rotate(-2.2deg); } to { transform: rotate(1.8deg); } }

.sc-surf { animation: scSlosh 1.3s ease-in-out infinite alternate; }
@keyframes scSlosh { from { transform: translateY(-1.8px); } to { transform: translateY(1.8px); } }

/* stream */
.sc-stream-flow { stroke-dasharray: 5 9; animation: scFlow .45s linear infinite; }
@keyframes scFlow { to { stroke-dashoffset: -14; } }

/* falling drops */
.dr { fill: url(#scLiq); transform-box: fill-box; transform-origin: 50% 0; opacity: 0; }
.sc-load.run .dr { animation: scDrip var(--du, 1.3s) ease-in var(--dl, 0s) infinite; }
@keyframes scDrip {
  0%   { transform: translateY(0) scale(.5, .5); opacity: 0; }
  12%  { transform: translateY(2px) scale(1, 1.15); opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(var(--d, 90px)) scale(.8, 1.5); opacity: 0; }
}

/* splash where the stream lands */
.rip { fill: none; stroke: #efc6ff; stroke-width: 1.4; transform-box: fill-box; transform-origin: center; opacity: 0; }
.sc-load.run .rip { animation: scRip .8s ease-out infinite; }
.sc-load.run .rip.r2 { animation-delay: .4s; }
@keyframes scRip { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(3.6, 2.2); opacity: 0; } }
.spl { fill: #ecb6ff; opacity: 0; }
.sc-load.run .spl { animation: scSplash .7s ease-out var(--dl, 0s) infinite; }
@keyframes scSplash {
  0%   { transform: translate(0, 0); opacity: 0; }
  15%  { opacity: 1; }
  50%  { transform: translate(calc(var(--x) * .6), -10px); }
  100% { transform: translate(var(--x), 3px); opacity: 0; }
}

/* drips hanging off the bar once the fill reaches them */
.hg { transform: scaleY(0); }
.sc-load.run .hg { animation: scHang 1s cubic-bezier(.3,.7,.35,1) var(--dl, 0s) forwards; }
@keyframes scHang { to { transform: scaleY(1); } }

.sc-meta { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; margin-top: -4px; }
.sc-sub { position: relative; width: 150px; height: 18px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #c9a8f0; text-align: right; }
.sc-sub span { position: absolute; left: 0; right: 0; opacity: 0; }
.sc-load.run .sc-sub span:nth-child(1) { animation: scMsg 1.7s .0s both; }
.sc-load.run .sc-sub span:nth-child(2) { animation: scMsg 1.7s 1.65s both; }
.sc-load.run .sc-sub span:nth-child(3) { animation: scMsg 1.7s 3.3s both; }
@keyframes scMsg { 0% { opacity: 0; transform: translateY(6px); } 20%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
.sc-pct { width: 46px; text-align: left; font-size: 15px; font-weight: 700; color: #f1d9ff; font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(190,100,255,.8); }

@media (prefers-reduced-motion: reduce) { .sc-haze { animation: none; } }
