.dmc-celebration-layer {
  --fx-accent: #4ce1e7;
  --fx-hot: #31ea7a;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility 0s linear .25s;
  isolation: isolate;
}

.dmc-celebration-layer.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .16s ease;
}

.dmc-celebration-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--fx-accent) 28%, transparent) 0, transparent 34%),
    linear-gradient(110deg, rgba(2, 7, 16, .78), rgba(7, 17, 31, .32), rgba(2, 7, 16, .78));
  opacity: 0;
}

.is-active .dmc-celebration-glow { animation: dmc-fx-glow 2.2s ease both; }

.dmc-celebration-rings {
  position: absolute;
  width: min(72vw, 720px);
  aspect-ratio: 1;
  border: clamp(12px, 2.2vw, 24px) solid color-mix(in srgb, var(--fx-accent) 72%, white 8%);
  border-radius: 50%;
  box-shadow:
    0 0 0 clamp(18px, 4vw, 48px) rgba(7, 17, 31, .82),
    0 0 0 clamp(25px, 5vw, 62px) var(--fx-hot),
    0 0 90px var(--fx-accent), inset 0 0 70px rgba(0, 0, 0, .85);
  opacity: 0;
}

.dmc-celebration-rings::before,
.dmc-celebration-rings::after {
  content: '';
  position: absolute;
  inset: 16%;
  border: 3px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
}

.dmc-celebration-rings::after { inset: 36%; border-width: 5px; background: rgba(2, 7, 16, .64); }
.is-active .dmc-celebration-rings { animation: dmc-fx-rings 1.15s cubic-bezier(.16, .8, .24, 1) both; }

.dmc-celebration-card {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(88vw, 720px);
  padding: clamp(24px, 5vw, 52px);
  color: #f8fbff;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 4px 22px rgba(0, 0, 0, .86);
  opacity: 0;
  transform: scale(.72) translateY(24px);
}

.is-active .dmc-celebration-card { animation: dmc-fx-card 2.05s cubic-bezier(.16, .8, .24, 1) both; }

.dmc-celebration-kicker {
  display: inline-flex;
  padding: 7px 16px;
  border: 1px solid color-mix(in srgb, var(--fx-accent) 80%, white 20%);
  border-radius: 999px;
  background: rgba(4, 12, 24, .76);
  color: var(--fx-accent);
  font: 800 clamp(.72rem, 1.6vw, .95rem)/1 system-ui, sans-serif;
  letter-spacing: .18em;
}

.dmc-celebration-title {
  margin-top: 12px;
  color: #fff;
  font: 950 clamp(3.4rem, 13vw, 9rem)/.82 system-ui, sans-serif;
  letter-spacing: -.065em;
  filter: drop-shadow(0 0 24px color-mix(in srgb, var(--fx-accent) 52%, transparent));
}

.dmc-celebration-subtitle {
  margin-top: 18px;
  color: #eaf2fb;
  font: 800 clamp(.85rem, 2vw, 1.15rem)/1.25 system-ui, sans-serif;
  letter-spacing: .11em;
}

.dmc-celebration-particles { position: absolute; inset: 0; z-index: 2; }
.dmc-celebration-particles i {
  position: absolute;
  left: var(--x);
  top: -8%;
  width: var(--size);
  height: calc(var(--size) * 2.4);
  border-radius: 2px;
  background: var(--fx-accent);
  box-shadow: 0 0 12px var(--fx-hot);
  opacity: 0;
  transform: rotate(calc(var(--i) * 29deg));
}
.dmc-celebration-particles i:nth-child(3n) { background: #fff; }
.dmc-celebration-particles i:nth-child(3n + 1) { background: var(--fx-hot); }
.is-active .dmc-celebration-particles i {
  animation: dmc-fx-particle 1.45s cubic-bezier(.2, .65, .32, 1) var(--delay) both;
}

.dmc-celebration-maximum { --fx-accent: #ffcd45; --fx-hot: #ff334f; }
.dmc-celebration-checkout { --fx-accent: #59ecff; --fx-hot: #ffd34e; }
.dmc-celebration-leg { --fx-accent: #31ea7a; --fx-hot: #4ce1e7; }
.dmc-celebration-match { --fx-accent: #ffd34e; --fx-hot: #ff7a31; }
.dmc-celebration-best { --fx-accent: #c98cff; --fx-hot: #59ecff; }

.dmc-celebration-status {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dmc-fx-control-group {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
}
.dmc-fx-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px 0 0 999px;
  background: rgba(6,17,31,.72);
  color: #dce8f5;
  font: 750 .78rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.dmc-fx-toggle:hover { border-color: #4ce1e7; color: #fff; }
.dmc-fx-toggle.is-on { border-color: rgba(49,234,122,.62); box-shadow: inset 0 0 0 1px rgba(49,234,122,.12); }
.dmc-fx-icon { color: #ffd34e; font-size: 1rem; }
.dmc-fx-state { color: #31ea7a; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.dmc-fx-toggle:not(.is-on) .dmc-fx-state { color: #91a0b2; }
.dmc-fx-settings {
  width: 35px;
  min-height: 38px;
  margin-left: -1px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 0 999px 999px 0;
  background: rgba(6,17,31,.72);
  color: #a9b8cb;
  font: 800 .88rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.dmc-fx-settings:hover,
.dmc-fx-settings[aria-expanded="true"] { border-color: #4ce1e7; color: #fff; }

.dmc-fx-panel {
  position: fixed;
  z-index: 2147483100;
  padding: 14px;
  border: 1px solid #2b4059;
  border-radius: 16px;
  background: #0a1422;
  color: #f4f8fd;
  box-shadow: 0 22px 70px rgba(0,0,0,.5);
  font-family: system-ui, sans-serif;
}
.dmc-fx-panel[hidden] { display: none !important; }
.dmc-fx-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dmc-fx-panel-head strong { font-size: 1rem; }
.dmc-fx-panel-head button {
  width: 30px; height: 30px; border: 0; border-radius: 50%; background: #17273a; color: #fff; font-size: 1.25rem; cursor: pointer;
}
.dmc-fx-panel > label { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid rgba(255,255,255,.08); cursor: pointer; }
.dmc-fx-panel .dmc-fx-master { margin: 0 -6px 4px; padding: 11px 10px; border: 1px solid rgba(49,234,122,.35); border-radius: 12px; background: rgba(49,234,122,.07); }
.dmc-fx-panel.is-master-off > label:not(.dmc-fx-master),
.dmc-fx-panel.is-master-off .dmc-fx-volume { opacity: .42; }
.dmc-fx-panel input[type="checkbox"] { width: 19px; height: 19px; accent-color: #31ea7a; }
.dmc-fx-panel label span { display: flex; flex: 1; flex-direction: column; gap: 3px; }
.dmc-fx-panel label strong { font-size: .84rem; }
.dmc-fx-panel label small { color: #9eafc2; font-size: .7rem; line-height: 1.25; }
.dmc-fx-panel .dmc-fx-volume { display: block; cursor: default; }
.dmc-fx-volume > span { flex-direction: row !important; justify-content: space-between; }
.dmc-fx-volume input { width: 100%; margin-top: 10px; accent-color: #4ce1e7; }
.dmc-fx-profiles {
  width: 100%;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(76,225,231,.36);
  border-radius: 12px;
  background: rgba(76,225,231,.08);
  color: #eaf8ff;
  font: 800 .8rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.dmc-fx-profiles:hover { background: rgba(76,225,231,.15); border-color: #4ce1e7; }

@keyframes dmc-fx-glow {
  0% { opacity: 0; } 12%, 74% { opacity: 1; } 100% { opacity: 0; }
}
@keyframes dmc-fx-rings {
  0% { opacity: 0; transform: scale(.18) rotate(-18deg); }
  38% { opacity: .88; }
  100% { opacity: .32; transform: scale(1.18) rotate(8deg); }
}
@keyframes dmc-fx-card {
  0% { opacity: 0; transform: scale(.72) translateY(24px); }
  16% { opacity: 1; transform: scale(1.08) translateY(0); }
  24%, 76% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(.96) translateY(-10px); }
}
@keyframes dmc-fx-particle {
  0% { opacity: 0; transform: translate3d(0,-10vh,0) rotate(0); }
  14% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift),108vh,0) rotate(540deg); }
}

@media (max-width: 720px) {
  .dmc-celebration-rings { width: 94vw; }
  .dmc-celebration-title { font-size: clamp(3.1rem, 17vw, 6.5rem); }
  .dmc-fx-label { display: none; }
  .dmc-fx-toggle { min-width: 44px; justify-content: center; padding-inline: 9px 7px; }
  .dmc-fx-settings { width: 32px; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dmc-celebration-layer *, .dmc-celebration-layer *::before, .dmc-celebration-layer *::after { animation: none !important; }
  .dmc-celebration-layer.is-active .dmc-celebration-glow { opacity: .82; }
  .dmc-celebration-layer.is-active .dmc-celebration-rings { opacity: .25; transform: scale(1); }
  .dmc-celebration-layer.is-active .dmc-celebration-card { opacity: 1; transform: none; }
  .dmc-celebration-particles { display: none; }
}
