.lootbox { background: radial-gradient(ellipse at 50% 45%, #382044, #160f20 72%); color: #f6e8d0; padding: 18px; text-align: center; overflow: auto; }
.lootbox-heading span { color: #d7a666; font-size: 10px; letter-spacing: .3em; }
.lootbox-heading h2 { margin: 6px 0; color: #ffcb82; font-family: Georgia, serif; font-size: 28px; }
.lootbox-heading p, .lootbox-controls p { font-size: 13px; color: #cabbd1; }
.lootbox-stage { position: relative; width: 100%; height: clamp(180px, 31vh, 300px); isolation: isolate; --glow: #ff941f; }
.lootbox-stage.rarity-rare { --glow: #bc8cff; }
.lootbox-stage.rarity-legendary { --glow: #ffe285; }
.lootbox-pumpkin { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: contain; filter: drop-shadow(0 12px 12px #0008); z-index: 2; transition: none; animation: none; pointer-events: none; }
.lootbox-aura { position: absolute; inset: 17%; background: radial-gradient(ellipse, var(--glow), transparent 70%); opacity: .3; filter: blur(18px); animation: lootbox-glow 2s ease-in-out infinite alternate; }
.is-revealed .lootbox-aura { opacity: .75; }
.is-revealed::after { content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: radial-gradient(ellipse, #fff5cfbb, transparent 65%); animation: lootbox-flash .8s ease-out both; }
.lootbox-prize { position: absolute; z-index: 3; width: 34%; height: 42%; object-fit: contain; left: 33%; top: 24%; filter: drop-shadow(0 0 15px var(--glow)); animation: lootbox-float 2.5s ease-in-out infinite; }
.lootbox-sparks { position: absolute; inset: 0; z-index: 1; overflow: hidden; opacity: .3; }
.is-revealed .lootbox-sparks { opacity: 1; }
.lootbox-sparks i { position: absolute; left: calc(8% + var(--i) * 7%); bottom: 12%; width: 3px; height: 3px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 8px var(--glow); animation: lootbox-spark 3s linear infinite; animation-delay: calc(var(--i) * -.27s); }
.rarity-legendary .lootbox-sparks i { width: 5px; height: 5px; }
.lootbox-caption { min-height: 65px; position: relative; z-index: 4; }
.lootbox-caption small { color: #efbe84; }
.lootbox-caption h3 { margin: 6px 0 12px; font-family: Georgia, serif; font-size: clamp(18px, 2vw, 24px); overflow-wrap: anywhere; color: #fff0d2; text-shadow: 0 0 20px #ff9a3055; }
.lootbox-controls { display: grid; justify-items: center; gap: 8px; }
.lootbox-controls small { color: #c6b4cc; }
.lootbox-button { padding: 12px 26px; border: 1px solid #ffbf6b!important; background: linear-gradient(#a85220, #68321f)!important; color: #fff3d5!important; box-shadow: 0 4px 20px #eb801c22; font-size: 16px; border-radius: 9px; }
.lootbox-button:not(:disabled):hover { filter: brightness(1.2); box-shadow: 0 0 24px #eb801c55; }
.lootbox-button:disabled { opacity: .5; }
.lootbox-editor { text-align: left; }
.lootbox-editor h2 { color: #ffcb82; }
.lootbox-editor > p { font-size: 13px; }
.lootbox-weight { display: grid; grid-template-columns: minmax(0, 1fr) 90px 60px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #ffffff15; }
.lootbox-weight span { overflow-wrap: anywhere; }
.lootbox-weight small { text-align: right; color: #d7a666; }
@keyframes lootbox-float { 0%,100% { transform: translateY(0) scale(.96); } 50% { transform: translateY(-8px) scale(1); } }
@keyframes lootbox-glow { to { transform: scale(1.15); filter: blur(24px); } }
@keyframes lootbox-spark { to { transform: translateY(-230px) rotate(180deg); opacity: 0; } }
@keyframes lootbox-flash { from { opacity: 1; transform: scale(.65); } to { opacity: 0; transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .lootbox *, .lootbox *::before { animation: none!important; } }
