/* Empire Kids World v2 — avioane + baloane colorate */

.ekw-open-chk {
  position: fixed !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  pointer-events: none !important;
  clip: rect(0, 0, 0, 0) !important;
}

.ekw-open-chk:checked ~ #empire-kids-widget,
.ekw-open-chk:checked ~ .ekw-widget {
  display: block !important;
  visibility: visible !important;
}

.ekw-open-chk:checked ~ .ekw-reopen-wrap,
.ekw-open-chk:checked ~ #empire-kids-reopen-wrap {
  display: none !important;
}

.ekw-open-chk:not(:checked) ~ #empire-kids-widget,
.ekw-open-chk:not(:checked) ~ .ekw-widget {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.ekw-open-chk:not(:checked) ~ .ekw-reopen-wrap,
.ekw-open-chk:not(:checked) ~ #empire-kids-reopen-wrap {
  display: block !important;
  visibility: visible !important;
}

#empire-kids-widget,
.ekw-widget {
  position: relative;
  z-index: 10000050;
  pointer-events: none;
}

#empire-kids-world,
.empire-kids-world-layer {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
  overflow: hidden;
}

/* —— Avioane —— */
.ekw-plane {
  position: absolute;
  width: 34px;
  height: 24px;
  transform-origin: center center;
  animation: ekw-plane-fly linear infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.ekw-plane-body {
  position: absolute;
  left: 5px;
  top: 9px;
  width: 21px;
  height: 7px;
  background: linear-gradient(90deg, #e53935, #ff7043);
  border-radius: 5px 9px 9px 5px;
}

.ekw-plane-nose {
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 5px;
  background: #ffca28;
  border-radius: 50% 0 0 50%;
}

.ekw-plane-wing {
  position: absolute;
  left: 9px;
  top: 4px;
  width: 14px;
  height: 5px;
  background: linear-gradient(180deg, #42a5f5, #1e88e5);
  border-radius: 3px;
  transform: skewX(-12deg);
}

.ekw-plane-tail {
  position: absolute;
  right: 3px;
  top: 5px;
  width: 0;
  height: 0;
  border-left: 7px solid #5c6bc0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.ekw-plane-prop {
  position: absolute;
  left: 1px;
  top: 7px;
  width: 7px;
  height: 7px;
  border: 1.5px solid #78909c;
  border-radius: 50%;
  border-right-color: transparent;
  animation: ekw-prop-spin 0.35s linear infinite;
}

.ekw-plane-stripe {
  position: absolute;
  left: 12px;
  top: 11px;
  width: 9px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  opacity: 0.9;
}

.ekw-plane--blue .ekw-plane-body {
  background: linear-gradient(90deg, #1e88e5, #42a5f5);
}

.ekw-plane--green .ekw-plane-body {
  background: linear-gradient(90deg, #43a047, #66bb6a);
}

.ekw-plane--yellow .ekw-plane-body {
  background: linear-gradient(90deg, #f9a825, #ffca28);
}

.ekw-plane--reverse {
  animation-name: ekw-plane-fly-reverse !important;
}

/* —— Baloane colorate —— */
.ekw-balloon {
  position: absolute;
  bottom: -50px;
  width: 22px;
  height: 34px;
  animation: ekw-balloon-rise linear infinite;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.12));
}

.ekw-balloon-body {
  display: block;
  width: 22px;
  height: 28px;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  position: relative;
}

.ekw-balloon-body::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 6px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: rotate(-25deg);
}

.ekw-balloon-knot {
  display: block;
  width: 0;
  height: 0;
  margin: -1px auto 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 5px solid rgba(0, 0, 0, 0.25);
}

.ekw-balloon-string {
  display: block;
  width: 1px;
  height: 26px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(80, 80, 80, 0.5), rgba(80, 80, 80, 0.15));
}

.ekw-balloon--red .ekw-balloon-body {
  background: radial-gradient(circle at 35% 30%, #ff8a80, #d32f2f 55%, #b71c1c);
}

.ekw-balloon--crimson .ekw-balloon-body {
  background: radial-gradient(circle at 35% 30%, #ff6090, #c62828 55%, #880e4f);
}

.ekw-balloon--hotpink .ekw-balloon-body {
  background: radial-gradient(circle at 35% 30%, #ff80ab, #e91e63 55%, #ad1457);
}

.ekw-balloon--orange .ekw-balloon-body {
  background: radial-gradient(circle at 35% 30%, #ffcc80, #ff5722 55%, #e64a19);
}

.ekw-balloon--magenta .ekw-balloon-body {
  background: radial-gradient(circle at 35% 30%, #ea80fc, #d500f9 55%, #aa00ff);
}

.ekw-balloon--coral .ekw-balloon-body {
  background: radial-gradient(circle at 35% 30%, #ffab91, #ff5252 55%, #ff1744);
}

.ekw-balloon--ruby .ekw-balloon-body {
  background: radial-gradient(circle at 35% 30%, #ef9a9a, #c62828 50%, #7f0000);
}

.ekw-balloon--rose .ekw-balloon-body {
  background: radial-gradient(circle at 35% 30%, #f48fb1, #ec407a 55%, #c2185b);
}

.ekw-balloon--scarlet .ekw-balloon-body {
  background: radial-gradient(circle at 35% 30%, #ff8a65, #f44336 55%, #bf360c);
}

.ekw-balloon--fuchsia .ekw-balloon-body {
  background: radial-gradient(circle at 35% 30%, #ff79c0, #e040fb 55%, #9c27b0);
}

/* —— Controale minime —— */
#empire-kids-controls,
.ekw-controls {
  position: fixed !important;
  left: max(12px, env(safe-area-inset-left, 0px)) !important;
  bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
  z-index: 10000050 !important;
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  width: auto;
  pointer-events: auto !important;
}

.ekw-dismiss,
label.ekw-dismiss {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 10000052;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #052454 !important;
  color: #fff !important;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(5, 36, 84, 0.45);
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
}

.ekw-dismiss:hover,
label.ekw-dismiss:hover {
  transform: scale(1.08);
}

.ekw-reopen-wrap,
#empire-kids-reopen-wrap {
  position: fixed !important;
  left: max(12px, env(safe-area-inset-left, 0px)) !important;
  bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
  z-index: 10000051 !important;
  display: none;
  pointer-events: none;
}

.ekw-reopen,
label.ekw-reopen {
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #052454 !important;
  color: #fff !important;
  font-size: 18px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(5, 36, 84, 0.4);
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
}

.ekw-reopen:hover,
label.ekw-reopen:hover {
  transform: scale(1.06);
}

.ekw-btn-close,
label.ekw-btn-close {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #546e7a;
  font-family: "Poppins", "Montserrat", sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(5, 36, 84, 0.12);
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* —— Animații —— */
@keyframes ekw-plane-fly {
  0% {
    transform: translate(-12vw, var(--ekw-y, 20vh)) rotate(-8deg);
  }
  100% {
    transform: translate(112vw, var(--ekw-y-end, 25vh)) rotate(6deg);
  }
}

@keyframes ekw-plane-fly-reverse {
  0% {
    transform: translate(112vw, var(--ekw-y, 40vh)) scaleX(-1) rotate(8deg);
  }
  100% {
    transform: translate(-12vw, var(--ekw-y-end, 35vh)) scaleX(-1) rotate(-6deg);
  }
}

@keyframes ekw-prop-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ekw-balloon-rise {
  0% {
    transform: translateY(0) translateX(0) rotate(-4deg);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  95% {
    opacity: 1;
  }
  100% {
    transform: translateY(-120vh) translateX(var(--ekw-drift, 20px)) rotate(6deg);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #empire-kids-world .ekw-plane,
  #empire-kids-world .ekw-balloon {
    animation: none !important;
  }
}

@media (max-width: 768px) {
  .ekw-plane {
    width: 28px;
    height: 20px;
  }

  .ekw-balloon {
    width: 18px;
    height: 28px;
  }

  .ekw-balloon-body {
    width: 18px;
    height: 23px;
  }
}

@media (max-width: 480px) {
  #empire-kids-controls,
  .ekw-controls {
    left: max(8px, env(safe-area-inset-left, 0px)) !important;
    bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .ekw-dismiss {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }

  .ekw-reopen {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}
