/* A synchronized center workflow: each service sends a signal through Quizzia. */

.q-center-system {
  height: 395px;
  position: relative;
  perspective: 1100px;
  direction: ltr;
}

.q-center-camera {
  position: absolute;
  inset: 0 0 30px;
  transform-style: flat;
  isolation: isolate;
  transform: rotateX(var(--tilt-y,0deg)) rotateY(var(--tilt-x,0deg));
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}

.q-system-grid {
  z-index: 0;
  position: absolute;
  inset: -10px -20px 0;
  background-image: linear-gradient(#7197e525 1px,transparent 1px),linear-gradient(90deg,#7197e525 1px,transparent 1px);
  background-size: 35px 35px;
  transform: rotateX(55deg) rotateZ(-25deg);
  mask-image: radial-gradient(ellipse,#000 25%,transparent 69%);
}

.q-system-connections {
  z-index: 1;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.q-system-routes {
  fill: none;
  stroke: #85a9e7;
  stroke-width: 1.1;
  stroke-dasharray: 3 5;
  opacity: .65;
}

.q-system-packets use {
  fill: none;
  stroke: #386fe5;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 9 191;
  stroke-dashoffset: 0;
  opacity: 0;
  animation: q-center-signal 8s var(--phase) linear infinite;
  filter: drop-shadow(0 0 3px #3264ff50);
}

.q-system-core {
  position: absolute;
  top: calc(50.7% - 72px);
  left: calc(50% - 75px);
  width: 150px;
  height: 144px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,#5286fa,#2c57c8);
  border: 1px solid #a4bdff;
  border-radius: 26px;
  transform: rotateX(15deg) rotateY(-17deg) rotateZ(-9deg) translateZ(20px);
  box-shadow: -6px 8px 0 #244fa1,-12px 16px 0 #527fc4,0 23px 45px #3264ff22;
  z-index: 3;
}

.q-system-core::before {
  content: "";
  position: absolute;
  inset: -15px;
  border: 1px solid #739af575;
  border-radius: 34px;
  animation: q-center-pulse 2s 1.2s ease-out infinite;
  pointer-events: none;
}

.q-system-core img {
  width: 120px;
  height: auto;
  display: block;
  object-fit: contain;
}

.q-system-core>small {
  color: #e4edff;
  font-size: 10px;
  line-height: 1.7;
  margin-top: 14px;
  text-align: center;
}

.q-system-node {
  z-index: 2;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 11px;
  width: 100px;
  height: 88px;
  padding: 10px;
  background: linear-gradient(135deg,#fff,#e7efff);
  border: 1px solid #b6cdef;
  border-radius: 17px;
  box-shadow: -4px 5px 0 #c3d4ef,0 12px 25px #41618c12;
  color: #385d92;
  transform: rotateX(12deg) rotateY(-14deg) rotateZ(-8deg);
  animation: q-center-service 8s var(--phase) ease-in-out infinite;
}

.q-system-node i {
  font-size: 25px;
  color: #3767ce;
}

.q-system-node>span:not(.q-node-light) {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.7;
}

.q-node-teachers {
  left: calc(17% - 50px);
  top: calc(19.2% - 44px);
}

.q-node-attendance {
  left: calc(85% - 50px);
  top: calc(19.2% - 44px);
}

.q-node-fees {
  left: calc(17% - 50px);
  top: calc(84.9% - 44px);
}

.q-node-parents {
  left: calc(85% - 50px);
  top: calc(84.9% - 44px);
}

.q-node-light {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #91afd9;
  animation: q-center-status 8s var(--phase) ease-in-out infinite;
}

.q-center-caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  text-align: center;
  color: #587294;
  font-size: 10px;
  line-height: 1.8;
  margin: 0;
}

[data-tilt-scene].is-motion-paused *, [data-tilt-scene].is-motion-paused *::before, [data-tilt-scene].is-motion-paused *::after {
  animation-play-state: paused;
}

@keyframes q-center-signal {
  0% {
    opacity: 0;
    stroke-dashoffset: 0;
  }

  3% {
    opacity: 1;
    stroke-dashoffset: 0;
  }

  20% {
    opacity: 1;
    stroke-dashoffset: -92;
  }

  24%,100% {
    opacity: 0;
    stroke-dashoffset: -100;
  }
}

@keyframes q-center-service {
  0%,25%,100% {
    transform: rotateX(12deg) rotateY(-14deg) rotateZ(-8deg) translateY(0);
    border-color: #b6cdef;
    box-shadow: -4px 5px 0 #c3d4ef,0 12px 25px #41618c12;
  }

  5%,18% {
    transform: rotateX(12deg) rotateY(-14deg) rotateZ(-5deg) translateY(-7px);
    border-color: #648fe7;
    box-shadow: -4px 7px 0 #9db8e6,0 13px 30px #3264ff20;
  }
}

@keyframes q-center-status {
  0%,25%,100% {
    background: #91afd9;
    box-shadow: none;
  }

  5%,18% {
    background: #2d73de;
    box-shadow: 0 0 0 4px #3264ff16;
  }
}

@keyframes q-center-pulse {
  from {
    transform: scale(.96);
    opacity: .7;
  }

  to {
    transform: scale(1.16);
    opacity: 0;
  }
}

@media(max-width:991px) and (min-width:721px) {
  .q-center-system {
    transform: scale(.9);
  }
}

@media(max-width:720px) {
  .q-center-system {
    height: 365px;
  }

  .q-system-node {
    width: 82px;
    height: 78px;
    gap: 9px;
  }

  .q-system-node i {
    font-size: 23px;
  }

  .q-system-node>span:not(.q-node-light) {
    font-size: 10px;
  }

  .q-node-teachers {
    left: calc(17% - 41px);
    top: calc(19.2% - 39px);
  }

  .q-node-attendance {
    left: calc(85% - 41px);
    top: calc(19.2% - 39px);
  }

  .q-node-fees {
    left: calc(17% - 41px);
    top: calc(84.9% - 39px);
  }

  .q-node-parents {
    left: calc(85% - 41px);
    top: calc(84.9% - 39px);
  }

  .q-system-core {
    width: 132px;
    height: 132px;
    left: calc(50% - 66px);
    top: calc(50.7% - 66px);
    padding: 12px;
    border-radius: 23px;
  }

  .q-system-core img {
    width: 108px;
  }

  .q-system-core>small {
    font-size: 9px;
    margin-top: 11px;
  }

  .q-center-caption {
    font-size: 9px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .q-center-camera {
    transition: none;
    transform: none;
  }

  .q-center-system *, .q-center-system *::before {
    animation: none !important;
  }

  .q-system-packets {
    display: none;
  }
}
