.alchemy {
    background: #1b1b1d;
    padding-bottom: 10px;
}

.alchemy__scene {
    position: relative;
    min-height: 132px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 100%, rgba(91, 188, 255, 0.16), transparent 42%),
        linear-gradient(180deg, #202022, #131415);
    border-bottom: 1px solid #111;
}

.alchemy__scene-text {
    display: grid;
    gap: 4px;
    text-align: center;
    line-height: 1.35;
}

.alchemy__cauldron {
    position: relative;
    width: 104px;
    height: 74px;
    margin-top: 22px;
    background: linear-gradient(180deg, #33383b, #111);
    border: 2px solid #292931;
    border-radius: 12px 12px 34px 34px;
    box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.28);
}

.alchemy__cauldron:before {
    content: "";
    position: absolute;
    left: -7px;
    right: -7px;
    top: -9px;
    height: 20px;
    background: #3a4044;
    border: 2px solid #292931;
    border-radius: 50%;
}

.alchemy__liquid {
    position: absolute;
    left: 8px;
    right: 8px;
    top: -2px;
    height: 14px;
    background: linear-gradient(90deg, #3da85b, #5bbcff, #9b21f8);
    border-radius: 50%;
    opacity: 0.9;
    animation: alchemyLiquid 2.6s ease-in-out infinite;
}

.alchemy__flame {
    position: absolute;
    left: 58px;
    bottom: 18px;
    width: 38px;
    height: 44px;
    background: radial-gradient(circle at 50% 70%, #f1d600 0 22%, #f87721 42%, transparent 66%);
    filter: blur(0.2px);
    animation: alchemyFlame 0.9s ease-in-out infinite alternate;
}

.alchemy__bubble {
    position: absolute;
    width: 9px;
    height: 9px;
    border: 1px solid rgba(91, 188, 255, 0.9);
    border-radius: 50%;
    opacity: 0;
    animation: alchemyBubble 2.4s linear infinite;
}

.alchemy__bubble--one {
    left: 28px;
    top: -8px;
}

.alchemy__bubble--two {
    left: 54px;
    top: -2px;
    animation-delay: 0.7s;
}

.alchemy__bubble--three {
    left: 74px;
    top: -10px;
    animation-delay: 1.35s;
}

.alchemy__status {
    margin: 8px;
    padding: 8px;
    text-align: center;
    background: #232429;
    border: 1px solid #111;
    border-radius: 7px;
}

.alchemy__status--ok {
    color: #2efb33;
}

.alchemy__status--error {
    color: #fa2f4d;
}

.alchemy__section-title {
    padding: 8px 10px;
    text-align: center;
    background: #202022;
    border-top: 1px solid #292931;
    border-bottom: 1px solid #111;
}

.alchemy-recipes,
.alchemy-inventory {
    display: grid;
    gap: 0;
}

.alchemy-recipe {
    display: flex;
    gap: 8px;
    padding: 9px 8px;
    background: #1b1b1d;
    border-bottom: 1px solid #111;
}

.alchemy-recipe:nth-child(even),
.alchemy-inventory__item:nth-child(even) {
    background: #232429;
}

.alchemy-recipe--locked {
    opacity: 0.72;
}

.alchemy-recipe--busy {
    filter: brightness(1.14);
}

.alchemy-recipe__view {
    flex: 0 0 64px;
}

.alchemy-recipe__img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #131415;
    border: 1px solid #292931;
    border-radius: 7px;
}

.alchemy-recipe__body {
    min-width: 0;
    flex: 1;
}

.alchemy-recipe__head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    line-height: 1.35;
}

.alchemy-recipe__count {
    color: #afb4ba;
    font-size: small;
}

.alchemy-recipe__desc {
    margin-top: 3px;
    color: #afb4ba;
    font-size: small;
    line-height: 1.35;
}

.alchemy-recipe__ingredients {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.alchemy-ingredient-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    padding: 2px 5px;
    color: #ececec;
    font-size: 12px;
    background: #131415;
    border: 1px solid #292931;
    border-radius: 6px;
}

.alchemy-ingredient-chip--miss {
    color: #fa2f4d;
}

.alchemy-recipe__actions {
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 8px;
}

.alchemy-recipe__amount {
    width: 48px;
    height: 34px;
    color: #ececec;
    text-align: center;
    background: #313436;
    border: 1px solid #292931;
}

.alchemy-recipe__actions .btn {
    min-width: 104px;
    height: 36px;
    font-size: medium;
}

.alchemy-inventory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.alchemy-inventory__item {
    min-width: 0;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    padding: 7px 8px;
    border-bottom: 1px solid #111;
}

.alchemy-inventory__img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.alchemy-inventory__name {
    overflow: hidden;
    color: #ececec;
    font-size: small;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.alchemy-inventory__count {
    color: #5bbcff;
    font-size: small;
}

@keyframes alchemyLiquid {
    0%, 100% {
        transform: translateY(0) scaleX(1);
    }
    50% {
        transform: translateY(2px) scaleX(0.92);
    }
}

@keyframes alchemyFlame {
    from {
        transform: scaleY(0.9);
        opacity: 0.72;
    }
    to {
        transform: scaleY(1.08);
        opacity: 0.95;
    }
}

@keyframes alchemyBubble {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    20% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-54px) scale(1.25);
        opacity: 0;
    }
}
