/* Kristal kutu — ana ekran chip + kasa + açılış sahnesi */

#main-screen .nova-egg-chip.nova-chest-chip {
  padding: 0;
  gap: 0;
  justify-content: center;
  align-items: center;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.5) 0%, transparent 34%),
    radial-gradient(circle at 72% 78%, rgba(167, 139, 250, 0.22) 0%, transparent 48%),
    radial-gradient(circle at 50% 100%, rgba(251, 191, 36, 0.2) 0%, transparent 46%),
    linear-gradient(165deg, #3a4468 0%, #151c32 46%, #0a101c 100%);
  box-shadow:
    0 0 0 1.5px rgba(253, 230, 138, 0.95),
    0 0 0 3.5px rgba(124, 58, 237, 0.55),
    0 0 0 5.5px rgba(251, 191, 36, 0.88),
    0 0 0 7px rgba(15, 23, 42, 0.95),
    0 10px 22px rgba(0, 0, 0, 0.42),
    0 0 22px rgba(251, 191, 36, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.42),
    inset 0 -10px 16px rgba(0, 0, 0, 0.38);
}

#main-screen .nova-egg-chip.nova-chest-chip::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: conic-gradient(
    from 200deg,
    #fde68a 0deg,
    #fff7ed 40deg,
    #c4b5fd 90deg,
    #f59e0b 150deg,
    #fde68a 200deg,
    #a78bfa 270deg,
    #fbbf24 320deg,
    #fde68a 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.2px));
  opacity: 0.95;
}

#main-screen .nova-egg-chip.nova-chest-chip .egg-chip-ring {
  inset: -7px;
  border: none;
  background: radial-gradient(circle, transparent 64%, rgba(253, 224, 71, 0.22) 72%, transparent 78%);
  animation: novaChestChipRing 2.8s ease-out infinite;
}

#main-screen .nova-egg-chip.nova-chest-chip .egg-chip-label {
  display: none !important;
}

#main-screen .nova-egg-chip.nova-chest-chip .egg-chip-orb {
  width: 78%;
  height: 78%;
  margin: 0;
}

#main-screen .nova-egg-chip.nova-chest-chip .egg-chip-img--chest,
#main-screen .nova-egg-chip .egg-chip-img--chest {
  height: 92%;
  width: 92%;
  max-width: 92%;
  transform: translateZ(0);
  object-fit: contain;
  object-position: center center;
  filter:
    drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 10px rgba(251, 191, 36, 0.38));
}

#main-screen .nova-egg-chip.nova-chest-chip.has-eggs {
  animation: novaChestChipPulse 2.4s ease-in-out infinite;
}

@keyframes novaChestChipPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

@keyframes novaChestChipRing {
  0% { transform: scale(1); opacity: 0.55; }
  70% { transform: scale(1.12); opacity: 0; }
  100% { opacity: 0; }
}

.nova-degg-screen.nova-chest-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100125;
  align-items: stretch;
  justify-content: center;
  padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background:
    radial-gradient(70% 42% at 50% 0%, rgba(196, 181, 253, 0.28), transparent 58%),
    radial-gradient(90% 55% at 50% 100%, rgba(251, 191, 36, 0.16), transparent 62%),
    linear-gradient(180deg, #1a2340 0%, #0b1220 46%, #06080f 100%);
}

.nova-degg-screen.nova-chest-screen.is-open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.nova-chest-screen .nova-degg-screen__veil {
  background:
    radial-gradient(ellipse 70% 48% at 50% 8%, rgba(167, 139, 250, 0.22), transparent 62%),
    linear-gradient(180deg, rgba(6, 8, 16, 0.55), rgba(6, 8, 16, 0.78));
}

.nova-chest-screen .nova-degg-screen__inner,
.nova-chest-screen .nova-chest-vault {
  width: min(100%, 460px);
  border-radius: 26px;
  border: 1px solid rgba(253, 224, 71, 0.42);
  background:
    linear-gradient(165deg, rgba(42, 36, 78, 0.96) 0%, rgba(14, 20, 36, 0.98) 55%, rgba(8, 10, 18, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 28px 70px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 80px rgba(124, 58, 237, 0.08);
}

.nova-chest-screen .nova-degg-screen__title {
  letter-spacing: 0.16em;
  color: #fde68a;
  text-shadow: 0 0 22px rgba(251, 191, 36, 0.42);
}

.nova-chest-screen .nova-degg-screen__sub {
  color: rgba(226, 232, 240, 0.86);
}

.nova-chest-screen .nova-degg-screen__body {
  min-height: min(52vh, 360px);
  border-radius: 20px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 58%, rgba(251, 191, 36, 0.12), transparent 70%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.55), transparent 72%),
    linear-gradient(180deg, rgba(8, 12, 24, 0.35), rgba(4, 6, 12, 0.2));
  overflow: hidden;
}

.nova-chest-preview {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: min(50vh, 360px);
}

.nova-chest-screen #nova_degg_screen_body[data-phase="crack"] .nova-degg-screen__preview {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.nova-chest-screen #nova_degg_screen_body[data-phase="crack"] .nova-degg-screen__crack-host,
.nova-chest-screen .nova-degg-screen__crack-host {
  display: none !important;
}

.nova-chest-stage {
  position: relative;
  width: min(82vw, 320px);
  height: min(54vh, 380px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: 50% 78%;
  animation: novaChestIdle 3.6s ease-in-out infinite;
}

.nova-chest-stage.is-opening,
.nova-chest-stage.is-open {
  animation: none;
}

.nova-chest-stage__aura {
  position: absolute;
  inset: 10% 4% 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.34) 0%, transparent 68%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.nova-chest-stage[data-theme="ice"] .nova-chest-stage__aura {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.38) 0%, transparent 68%);
}

.nova-chest-stage[data-theme="night"] .nova-chest-stage__aura {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, transparent 68%);
}

.nova-chest-stage__rays {
  position: absolute;
  inset: -14% -16% 12%;
  background:
    conic-gradient(from 180deg at 50% 72%,
      transparent 0 36%,
      rgba(255, 255, 255, 0.1) 40%,
      transparent 46%,
      rgba(253, 224, 71, 0.18) 50%,
      transparent 56%);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  animation: novaChestRays 10s linear infinite;
}

.nova-chest-stage.is-opening .nova-chest-stage__rays,
.nova-chest-stage.is-open .nova-chest-stage__rays {
  opacity: 1;
  animation: novaChestRaysBurst 0.85s ease-out forwards;
}

.nova-chest-stage__floor {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 4%;
  height: 16%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.5), transparent 72%);
  z-index: 1;
  pointer-events: none;
}

.nova-chest-stage__flash,
.nova-chest-stage__burst {
  position: absolute;
  inset: 8% 6% 10%;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
}

.nova-chest-stage__flash {
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.92) 0%, rgba(253, 224, 71, 0.35) 38%, transparent 70%);
}

.nova-chest-stage.is-open .nova-chest-stage__flash {
  animation: novaChestFlash 0.7s ease-out forwards;
}

.nova-chest-stage__burst {
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.35) 0 6%, transparent 7%),
    repeating-conic-gradient(from 0deg at 50% 48%, rgba(253, 224, 71, 0.0) 0 12deg, rgba(253, 224, 71, 0.22) 13deg 15deg, transparent 16deg 30deg);
  filter: blur(0.4px);
}

.nova-chest-stage.is-open .nova-chest-stage__burst {
  animation: novaChestBurst 0.9s ease-out forwards;
}

.nova-chest-stage[data-theme="ice"].is-open .nova-chest-stage__flash {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(56, 189, 248, 0.4) 38%, transparent 70%);
}

.nova-chest-stage[data-theme="night"].is-open .nova-chest-stage__flash {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(192, 132, 252, 0.42) 38%, transparent 70%);
}

.nova-chest-stage__img {
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 6%;
  width: 96%;
  height: auto;
  max-height: 96%;
  object-fit: contain;
  object-position: center bottom;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.5));
}

.nova-chest-stage__img--open {
  opacity: 0;
  transform: scale(0.9) translateY(10px);
  z-index: 3;
}

.nova-chest-stage.is-opening {
  animation: novaChestCharge 0.62s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.nova-chest-stage.is-opening .nova-chest-stage__img--closed {
  animation: novaChestGlowPulse 0.62s ease-in-out;
}

.nova-chest-stage.is-open .nova-chest-stage__img--closed {
  opacity: 0;
  transform: scale(1.1);
  transition: opacity 0.22s ease, transform 0.42s ease;
}

.nova-chest-stage.is-open .nova-chest-stage__img--open {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition: opacity 0.28s ease, transform 0.55s cubic-bezier(0.16, 0.9, 0.24, 1);
}

@keyframes novaChestIdle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.018); }
}

@keyframes novaChestCharge {
  0% { transform: scale(1) rotate(0deg); }
  28% { transform: scale(0.92) rotate(-2.4deg); }
  62% { transform: scale(1.1) rotate(2.2deg); }
  100% { transform: scale(1.03) rotate(0deg); }
}

@keyframes novaChestGlowPulse {
  0%, 100% { filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.5)) brightness(1); }
  50% { filter: drop-shadow(0 0 28px rgba(253, 224, 71, 0.7)) brightness(1.18); }
}

@keyframes novaChestRays {
  to { transform: rotate(360deg); }
}

@keyframes novaChestRaysBurst {
  0% { opacity: 0.35; transform: scale(0.75); }
  100% { opacity: 1; transform: scale(1.18); }
}

@keyframes novaChestFlash {
  0% { opacity: 0; transform: scale(0.4); }
  18% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.55); }
}

@keyframes novaChestBurst {
  0% { opacity: 0; transform: scale(0.55); }
  30% { opacity: 0.9; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.45); }
}

.nova-chest-screen .nova-dragon-egg-chip,
.nova-chest-screen .nova-chest-pick {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(8, 14, 26, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nova-chest-screen .nova-dragon-egg-chip.is-selected {
  border-color: rgba(253, 224, 71, 0.82);
  box-shadow:
    0 0 0 1px rgba(253, 224, 71, 0.3),
    0 10px 22px rgba(0, 0, 0, 0.3),
    inset 0 0 18px rgba(253, 224, 71, 0.08);
}

.nova-chest-screen .nova-dragon-egg-chip--ice.is-selected {
  border-color: rgba(125, 211, 252, 0.85);
}

.nova-chest-screen .nova-dragon-egg-chip--night.is-selected {
  border-color: rgba(196, 181, 253, 0.85);
}

.nova-chest-screen .nova-dragon-egg-chip__img {
  width: 86px;
  height: 96px;
  max-width: 86px;
  object-fit: contain;
}

.nova-chest-screen .nova-degg-screen__crack-btn {
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #fff7c2 0%, #fbbf24 42%, #c4b5fd 100%);
  color: #0f172a;
  font-weight: 900;
  box-shadow:
    0 10px 26px rgba(245, 158, 11, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.nova-chest-screen[data-phase="crack"] .nova-degg-screen__stock,
.nova-chest-screen .nova-degg-screen__body[data-phase="crack"] ~ .nova-degg-screen__stock,
.nova-chest-screen .nova-degg-screen__body[data-phase="crack"] ~ .nova-degg-screen__crack-btn {
  pointer-events: none;
  opacity: 0.55;
}

.nova-degg-earn-toast__img {
  width: 52px;
  height: 64px;
  object-fit: contain;
}

@media (max-width: 430px) {
  .nova-chest-screen .nova-chest-vault,
  .nova-chest-screen .nova-degg-screen__inner {
    width: 100%;
    border-radius: 22px;
    padding: 10px 12px 16px;
  }
  .nova-chest-stage {
    width: min(92vw, 300px);
    height: min(46vh, 320px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nova-chest-stage,
  .nova-chest-stage__rays,
  .nova-chest-stage.is-opening,
  .nova-chest-stage.is-opening .nova-chest-stage__img--closed,
  #main-screen .nova-egg-chip.nova-chest-chip.has-eggs,
  #main-screen .nova-egg-chip.nova-chest-chip .egg-chip-ring {
    animation: none !important;
  }
}

/* Ödül vitrini — kahraman / aksesuar / elmas */
.nova-degg-prize {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(86vw, 280px);
  padding: 18px 16px 16px;
  border-radius: 24px;
  text-align: center;
  animation: novaDeggPrizePop 0.7s cubic-bezier(0.18, 1.12, 0.32, 1) both;
  background:
    radial-gradient(circle at 50% 0%, rgba(253, 224, 71, 0.35), transparent 52%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
  border: 2px solid rgba(253, 230, 138, 0.85);
  box-shadow:
    0 0 0 4px rgba(124, 58, 237, 0.28),
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.nova-degg-prize__glow {
  position: absolute;
  inset: -18%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(253, 224, 71, 0.38) 0%, transparent 62%);
  animation: novaDeggPrizeGlow 1.6s ease-in-out infinite;
}
.nova-degg-prize__art {
  position: relative;
  z-index: 1;
  width: min(58vw, 168px);
  height: min(58vw, 168px);
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
}
.nova-degg-prize__art--hero {
  width: min(64vw, 200px);
  height: min(72vw, 228px);
}
.nova-degg-prize__name {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1.05rem, 4.6vw, 1.35rem);
  font-weight: 900;
  color: #fffbeb;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}
.nova-degg-prize__tag {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #422006;
  background: linear-gradient(180deg, #fde047, #f59e0b);
}
.nova-degg-prize--diamond .nova-degg-diamond-reward__amount {
  font-size: clamp(2.2rem, 10vw, 3.1rem);
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 0 18px rgba(250, 204, 21, 0.55);
}
.nova-degg-prize__art--dup {
  width: min(42vw, 112px) !important;
  height: min(42vw, 112px) !important;
  opacity: 0.92;
}
.nova-degg-prize--rare {
  border-color: rgba(250, 204, 21, 1);
  box-shadow:
    0 0 0 4px rgba(251, 191, 36, 0.45),
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.nova-degg-screen__diamond-burst[hidden],
.nova-degg-screen__reward.is-hero .nova-degg-screen__diamond-burst,
.nova-degg-screen__reward.is-acc .nova-degg-screen__diamond-burst {
  display: none !important;
}
.nova-degg-screen__reward.is-diamond .nova-degg-screen__card-slot {
  display: none !important;
}
.nova-chest-screen.is-open .nova-chest-vault {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(167, 139, 250, 0.22), transparent 46%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.98));
}
.nova-chest-stage.is-opening .nova-chest-stage__img--closed {
  animation: novaChestShake 0.78s ease-in-out both;
}
@keyframes novaDeggPrizePop {
  from { transform: scale(0.55) translateY(24px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes novaDeggPrizeGlow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes novaChestShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-7px) rotate(-3deg); }
  40% { transform: translateX(7px) rotate(3deg); }
  60% { transform: translateX(-5px) rotate(-2deg); }
  80% { transform: translateX(5px) rotate(2deg); }
}
