/* Game loading screen (DOM, shown while the Phaser assets load). Built by GameScene.preload in items.js. */
#cc-loader{
  /* same leaf corners as the login screen (auth-screen.css) */
  --ccl-leaf-tl: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2090%2070%27%3E%3Cg%20transform=%27translate%280%200%29%20scale%281%201%29%27%3E%3Cdefs%3E%3ClinearGradient%20id=%27g%27%20x1=%270%27%20y1=%270%27%20x2=%271%27%20y2=%271%27%3E%3Cstop%20offset=%270%27%20stop-color=%27%23a6e864%27/%3E%3Cstop%20offset=%271%27%20stop-color=%27%232f8a3a%27/%3E%3C/linearGradient%3E%3Cg%20id=%27l%27%3E%3Cpath%20d=%27M2%2012C10%200%2028%200%2038%2012%2028%2024%2010%2024%202%2012Z%27%20fill=%27url%28%23g%29%27%20stroke=%27%2316501f%27%20stroke-width=%272%27%20stroke-linejoin=%27round%27/%3E%3Cpath%20d=%27M6%2012H34%27%20stroke=%27%23d8f8ad%27%20stroke-opacity=%27.75%27%20stroke-width=%271.6%27%20stroke-linecap=%27round%27/%3E%3C/g%3E%3C/defs%3E%3Cuse%20href=%27%23l%27%20x=%272%27%20y=%2726%27%20width=%2734%27%20height=%2720%27%20transform=%27rotate%28-38%2019%2036%29%27/%3E%3Cuse%20href=%27%23l%27%20x=%2722%27%20y=%278%27%20width=%2734%27%20height=%2720%27%20transform=%27rotate%28-8%2039%2018%29%27/%3E%3Cuse%20href=%27%23l%27%20x=%2740%27%20y=%2734%27%20width=%2730%27%20height=%2718%27%20transform=%27rotate%2834%2055%2043%29%27/%3E%3C/g%3E%3C/svg%3E");
  --ccl-leaf-tr: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2090%2070%27%3E%3Cg%20transform=%27translate%2890%200%29%20scale%28-1%201%29%27%3E%3Cdefs%3E%3ClinearGradient%20id=%27g%27%20x1=%270%27%20y1=%270%27%20x2=%271%27%20y2=%271%27%3E%3Cstop%20offset=%270%27%20stop-color=%27%23a6e864%27/%3E%3Cstop%20offset=%271%27%20stop-color=%27%232f8a3a%27/%3E%3C/linearGradient%3E%3Cg%20id=%27l%27%3E%3Cpath%20d=%27M2%2012C10%200%2028%200%2038%2012%2028%2024%2010%2024%202%2012Z%27%20fill=%27url%28%23g%29%27%20stroke=%27%2316501f%27%20stroke-width=%272%27%20stroke-linejoin=%27round%27/%3E%3Cpath%20d=%27M6%2012H34%27%20stroke=%27%23d8f8ad%27%20stroke-opacity=%27.75%27%20stroke-width=%271.6%27%20stroke-linecap=%27round%27/%3E%3C/g%3E%3C/defs%3E%3Cuse%20href=%27%23l%27%20x=%272%27%20y=%2726%27%20width=%2734%27%20height=%2720%27%20transform=%27rotate%28-38%2019%2036%29%27/%3E%3Cuse%20href=%27%23l%27%20x=%2722%27%20y=%278%27%20width=%2734%27%20height=%2720%27%20transform=%27rotate%28-8%2039%2018%29%27/%3E%3Cuse%20href=%27%23l%27%20x=%2740%27%20y=%2734%27%20width=%2730%27%20height=%2718%27%20transform=%27rotate%2834%2055%2043%29%27/%3E%3C/g%3E%3C/svg%3E");
  --ccl-leaf-bl: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2090%2070%27%3E%3Cg%20transform=%27translate%280%2070%29%20scale%281%20-1%29%27%3E%3Cdefs%3E%3ClinearGradient%20id=%27g%27%20x1=%270%27%20y1=%270%27%20x2=%271%27%20y2=%271%27%3E%3Cstop%20offset=%270%27%20stop-color=%27%23a6e864%27/%3E%3Cstop%20offset=%271%27%20stop-color=%27%232f8a3a%27/%3E%3C/linearGradient%3E%3Cg%20id=%27l%27%3E%3Cpath%20d=%27M2%2012C10%200%2028%200%2038%2012%2028%2024%2010%2024%202%2012Z%27%20fill=%27url%28%23g%29%27%20stroke=%27%2316501f%27%20stroke-width=%272%27%20stroke-linejoin=%27round%27/%3E%3Cpath%20d=%27M6%2012H34%27%20stroke=%27%23d8f8ad%27%20stroke-opacity=%27.75%27%20stroke-width=%271.6%27%20stroke-linecap=%27round%27/%3E%3C/g%3E%3C/defs%3E%3Cuse%20href=%27%23l%27%20x=%272%27%20y=%2726%27%20width=%2734%27%20height=%2720%27%20transform=%27rotate%28-38%2019%2036%29%27/%3E%3Cuse%20href=%27%23l%27%20x=%2722%27%20y=%278%27%20width=%2734%27%20height=%2720%27%20transform=%27rotate%28-8%2039%2018%29%27/%3E%3Cuse%20href=%27%23l%27%20x=%2740%27%20y=%2734%27%20width=%2730%27%20height=%2718%27%20transform=%27rotate%2834%2055%2043%29%27/%3E%3C/g%3E%3C/svg%3E");
  --ccl-leaf-br: url("data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20viewBox=%270%200%2090%2070%27%3E%3Cg%20transform=%27translate%2890%2070%29%20scale%28-1%20-1%29%27%3E%3Cdefs%3E%3ClinearGradient%20id=%27g%27%20x1=%270%27%20y1=%270%27%20x2=%271%27%20y2=%271%27%3E%3Cstop%20offset=%270%27%20stop-color=%27%23a6e864%27/%3E%3Cstop%20offset=%271%27%20stop-color=%27%232f8a3a%27/%3E%3C/linearGradient%3E%3Cg%20id=%27l%27%3E%3Cpath%20d=%27M2%2012C10%200%2028%200%2038%2012%2028%2024%2010%2024%202%2012Z%27%20fill=%27url%28%23g%29%27%20stroke=%27%2316501f%27%20stroke-width=%272%27%20stroke-linejoin=%27round%27/%3E%3Cpath%20d=%27M6%2012H34%27%20stroke=%27%23d8f8ad%27%20stroke-opacity=%27.75%27%20stroke-width=%271.6%27%20stroke-linecap=%27round%27/%3E%3C/g%3E%3C/defs%3E%3Cuse%20href=%27%23l%27%20x=%272%27%20y=%2726%27%20width=%2734%27%20height=%2720%27%20transform=%27rotate%28-38%2019%2036%29%27/%3E%3Cuse%20href=%27%23l%27%20x=%2722%27%20y=%278%27%20width=%2734%27%20height=%2720%27%20transform=%27rotate%28-8%2039%2018%29%27/%3E%3Cuse%20href=%27%23l%27%20x=%2740%27%20y=%2734%27%20width=%2730%27%20height=%2718%27%20transform=%27rotate%2834%2055%2043%29%27/%3E%3C/g%3E%3C/svg%3E");
  --ccl-cloud: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20240%20120'%3E%3Cdefs%3E%3Cg%20id='c'%3E%3Ccircle%20cx='62'%20cy='80'%20r='30'/%3E%3Ccircle%20cx='100'%20cy='60'%20r='42'/%3E%3Ccircle%20cx='150'%20cy='54'%20r='38'/%3E%3Ccircle%20cx='190'%20cy='78'%20r='30'/%3E%3Crect%20x='34'%20y='72'%20width='186'%20height='36'%20rx='18'/%3E%3C/g%3E%3C/defs%3E%3Cuse%20href='%23c'%20fill='%2398c6ee'%20stroke='%2398c6ee'%20stroke-width='6'%20stroke-linejoin='round'%20transform='translate(0%205)'/%3E%3Cuse%20href='%23c'%20fill='%23dcefff'/%3E%3Cg%20fill='%23ffffff'%3E%3Ccircle%20cx='64'%20cy='76'%20r='24'/%3E%3Ccircle%20cx='100'%20cy='56'%20r='35'/%3E%3Ccircle%20cx='150'%20cy='50'%20r='31'/%3E%3Ccircle%20cx='188'%20cy='74'%20r='23'/%3E%3Crect%20x='42'%20y='70'%20width='170'%20height='26'%20rx='13'/%3E%3C/g%3E%3Cellipse%20cx='92'%20cy='38'%20rx='16'%20ry='7'%20fill='%23ffffff'%20opacity='.9'/%3E%3C/svg%3E");
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.4vh, 22px);
  padding: 16px;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, #0a9bff 0%, #4ab8ff 38%, #bfe6ff 62%, #e9f7ff 100%);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  transition: opacity 320ms ease;
}
#cc-loader.is-leaving{ opacity: 0; }

#cc-loader .ccl-scenery{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  background: url("/photos/treebg.webp") center bottom / cover no-repeat;
  filter: saturate(1.1);
}
/* soft vignette keeps the middle readable over the bright scenery */
#cc-loader::after{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 55%, rgba(6, 24, 52, 0.0) 35%, rgba(4, 16, 40, 0.38) 100%);
  pointer-events: none;
}

#cc-loader .ccl-cloud{
  position: absolute;
  left: -300px;
  width: 260px;
  height: 130px;
  background: var(--ccl-cloud) center / contain no-repeat;
  filter: drop-shadow(0 6px 10px rgba(20, 80, 150, 0.18));
  animation: ccl-drift 46s linear infinite;
}
#cc-loader .ccl-cloud.c1{ top: 8%; }
#cc-loader .ccl-cloud.c2{ top: 22%; transform: scale(0.7); opacity: 0.92; animation-duration: 64s; animation-delay: -22s; }
#cc-loader .ccl-cloud.c3{ top: 4%; transform: scale(0.45); opacity: 0.8; animation-duration: 88s; animation-delay: -60s; }
@keyframes ccl-drift{ to{ translate: calc(100vw + 560px) 0; } }

#cc-loader .ccl-logo{
  position: relative;
  z-index: 2;
  width: min(560px, 82vw);
  max-height: 38vh;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(2, 20, 60, 0.55));
  animation: ccl-bob 3.2s ease-in-out infinite;
}
@keyframes ccl-bob{ 0%, 100%{ transform: translateY(0); } 50%{ transform: translateY(-7px); } }

#cc-loader .ccl-card{
  position: relative;
  z-index: 2;
  width: min(560px, 88vw);
  padding: 16px 28px 14px;
  border-radius: 12px;
  text-align: center;
  color: #f4fbff;
  background: linear-gradient(180deg, rgba(14, 38, 76, 0.94), rgba(8, 24, 52, 0.96));
  border: 3px solid #3d86d6;
  box-shadow:
    0 0 0 2px #0a1c3c,
    0 16px 34px rgba(0, 12, 40, 0.5),
    inset 0 2px 0 rgba(160, 215, 255, 0.35),
    inset 0 0 22px rgba(30, 120, 220, 0.25);
}
/* leaf corners on the frame: the login screen's four corner images, one overlay above the card */
#cc-loader .ccl-card::after{
  content: "";
  position: absolute;
  inset: -16px;
  z-index: 3;
  pointer-events: none;
  background:
    var(--ccl-leaf-tl) left top / 58px 45px no-repeat,
    var(--ccl-leaf-tr) right top / 58px 45px no-repeat,
    var(--ccl-leaf-bl) left bottom / 58px 45px no-repeat,
    var(--ccl-leaf-br) right bottom / 58px 45px no-repeat;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
}

#cc-loader .ccl-title{
  font-family: "Courier New", ui-monospace, monospace;
  font-size: clamp(16px, 2.6vw, 22px);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 #000;
}
#cc-loader .ccl-pct{
  margin-top: 2px;
  font-size: clamp(15px, 2.2vw, 19px);
  font-weight: 800;
  color: #3fe3ff;
  text-shadow: 0 0 10px rgba(63, 227, 255, 0.45), 0 2px 0 #00243a;
}
#cc-loader .ccl-bar{
  position: relative;
  height: 20px;
  margin: 8px 0 8px;
  border-radius: 12px;
  background: #07162e;
  border: 2px solid #2a5da3;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
#cc-loader .ccl-fill{
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0 28%, rgba(255, 255, 255, 0) 55%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.0) 0 10px, rgba(255, 255, 255, 0.18) 10px 20px),
    linear-gradient(180deg, #34d8ff, #0a8fe0);
  background-size: 100% 100%, 40px 100%, 100% 100%;
  animation: ccl-stripes 900ms linear infinite;
  transition: width 140ms ease-out;
}
@keyframes ccl-stripes{ to{ background-position: 0 0, 40px 0, 0 0; } }
#cc-loader .ccl-info{
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 12px;
  color: #b5c9e0;
  text-shadow: 0 1px 0 #000;
}

/* the old canvas-drawn loader is hidden while this one is up */
@media (prefers-reduced-motion: reduce){
  #cc-loader .ccl-cloud, #cc-loader .ccl-logo, #cc-loader .ccl-fill{ animation: none; }
}
@media (max-width: 480px){
  #cc-loader .ccl-card{ padding: 12px 18px 10px; }
  #cc-loader .ccl-cloud.c2, #cc-loader .ccl-cloud.c3{ display: none; }
  #cc-loader .ccl-card::after{ inset: -10px; background-size: 40px 31px; }
}
