.elements-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin: 30px auto;
}

.element-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.element-title {
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    letter-spacing: 1px;
}

.element-btn {
    background: none;
    border: none;
    padding: 0;
    
    width: 64px;
    transition: transform 0.15s;
}
@keyframes pulse {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50%      { transform: scale(1.3); opacity: 1; }
}
.element-icon {
    width: 100%;
    height: auto;
}

.element-icon {
    animation: pulse 2s ease-in-out infinite;
}


.cats-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 100vh;
    padding: 40px 0 140px 0;
    box-sizing: border-box;
}

.cats-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.cat-icon.locked img {
    filter: brightness(0) opacity(0.4);
}

.cat-icon .lock-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    color: #fff;
    text-shadow: 0 0 4px #000;
    pointer-events: none;
}

.cat-icon .dup-badge {
    position: absolute;
    bottom: -2px;
    right: -8px;
    background: #A52A2A;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 8px;
    z-index: 2;
}
.cat-rare {
    width: 65px;
    height: 65px;
}

.cat-epic {
    width: 75px;
    height: 75px;
}

.cat-legendary {
    width: 85px;
    height: 85px;
}
.cat-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.cat-name {
    font-size: 11px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
    max-width: 80px;
    text-align: center;
    line-height: 1.1;
}
.cat-icon {
    position: relative;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
}

.cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.row-label {
    font-size: 14px;
    font-weight: bold;
    color: #FF4500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: -5px;
}
.paws-corner {
    position: fixed;
    top: 60px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
}

.paw-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.paw-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}
.paw-item img[src*="hvost"] {
    width: 40px;
    height: 60px;
    object-fit: contain;
}
.paw-count {
    font-size: 20px;
    font-weight: bold;
    color: #FFFF00;
}
.gem-block {
    position: relative;
    width: 80px;
    margin: 0 auto 10px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.gem-wrap {
    position: relative;
    width: 80px;
    height: 80px;
}
.gem-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: gemPulseFloat 4s ease-in-out infinite;
}

@keyframes gemPulseFloat {
    0%   { transform: translateY(0) rotate(-5deg) scale(1); }
    50%  { transform: translateY(-4px) rotate(5deg) scale(1.08); }
    100% { transform: translateY(0) rotate(-5deg) scale(1); }
}
.gem-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    text-shadow: 0 0 6px #000;
    pointer-events: none;
}

.gem-check {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 22px;
    text-shadow: 0 0 4px #000;
    pointer-events: none;
}
.gem-slot {
    position: relative;
    width: 60px;
    height: 60px;
    pointer-events: auto;
}

.gem-slot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: gemPulseFloat 4s ease-in-out infinite;
}

#slot-fire  img { animation-delay: 0s;    }
#slot-water img { animation-delay: -1s;   }
#slot-earth img { animation-delay: -2s;   }
#slot-air   img { animation-delay: -3s;   }

@keyframes gemPulseFloat {
    0%   { transform: translateY(0)   rotate(-4deg) scale(1);    }
    50%  { transform: translateY(-3px) rotate(4deg)  scale(1.06); }
    100% { transform: translateY(0)   rotate(-4deg) scale(1);    }
}
.gem-slot .gem-lock {
    font-size: 18px;
}
.gem-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* === ДРОП === */
.drop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    opacity: 1;
    transition: opacity 0.4s ease;
}
.drop-overlay.fade-out {
    opacity: 0;
}

/* --- Лапка --- */
.drop-flash {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    animation: dropFlash 2s ease-out forwards;
}
.drop-flash[data-element="fire"]  { background: radial-gradient(circle, rgba(255,80,0,0.8) 0%, transparent 70%); }
.drop-flash[data-element="water"] { background: radial-gradient(circle, rgba(0,140,255,0.8) 0%, transparent 70%); }
.drop-flash[data-element="earth"] { background: radial-gradient(circle, rgba(60,200,60,0.8) 0%, transparent 70%); }
.drop-flash[data-element="air"]   { background: radial-gradient(circle, rgba(180,230,255,0.8) 0%, transparent 70%); }
@keyframes dropFlash {
    0%   { transform: scale(0);   opacity: 0; }
    30%  { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.drop-paw-block {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.drop-paw-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    animation: dropPawPop 2s ease-out forwards;
}
@keyframes dropPawPop {
    0%   { transform: scale(0);   opacity: 0; }
    30%  { transform: scale(1.3); opacity: 1; }
    50%  { transform: scale(1);   opacity: 1; }
    85%  { transform: scale(1);   opacity: 1; }
    100% { transform: scale(1);   opacity: 0; }
}

.drop-paw-label {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
    animation: dropLabelFade 3.5s ease-out forwards;
}
@keyframes dropLabelFade {
    0%, 30% { opacity: 0; }
    50%     { opacity: 1; }
    85%     { opacity: 1; }
    100%    { opacity: 0; }
}

/* --- Кот --- */
.drop-glow {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,215,0,0.7) 0%, transparent 70%);
    animation: dropGlow 2.5s ease-out forwards;
}
@keyframes dropGlow {
    0%   { transform: scale(0);   opacity: 0; }
    25%  { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.drop-cat-block {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: dropCatAnim 2.5s ease-out forwards;
}

@keyframes dropCatAnim {
    0%   { transform: scale(0) rotate(-180deg); opacity: 0; }
    30%  { transform: scale(1.1) rotate(0deg);  opacity: 1; }
    40%  { transform: scale(1) rotate(0deg);    opacity: 1; }
    85%  { transform: scale(1) rotate(0deg);    opacity: 1; }
    100% { transform: scale(1) rotate(0deg);    opacity: 0; }
}
.drop-cat-img {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

.drop-cat-name {
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}
.craft-btn {
    position: fixed;
    bottom: 30px;
    left: 20px;
    z-index: 5;
    background: #A52A2A;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}
.craft-btn:active {
    transform: scale(0.95);
}
.craft-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}
.craft-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2px;
    text-align: left;
    color: #fff;
    
    font-family: inherit;
}

.craft-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.15);
}

.craft-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
}
/* === СЦЕНА КРАФТА === */
.craft-scene {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 500;
}
.craft-scene.active { display: flex; }

.craft-bg {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: bgFadeIn 0.6s ease-out forwards;
}
.craft-scene[data-element="fire"]  .craft-bg { background: radial-gradient(circle at center, #3a0000, #0a0000 70%); }
.craft-scene[data-element="water"] .craft-bg { background: radial-gradient(circle at center, #001a3a, #000a1a 70%); }
.craft-scene[data-element="earth"] .craft-bg { background: radial-gradient(circle at center, #0a2a00, #021000 70%); }
.craft-scene[data-element="air"]   .craft-bg { background: radial-gradient(circle at center, #2a2a3a, #0a0a15 70%); }

@keyframes bgFadeIn { to { opacity: 1; } }

.craft-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    opacity: 0;
    animation: particleFly linear infinite;
}
.craft-scene[data-element="fire"]  .particle { background: #ff4d00; box-shadow: 0 0 10px #ff4d00; }
.craft-scene[data-element="water"] .particle { background: #00aaff; box-shadow: 0 0 10px #00aaff; }
.craft-scene[data-element="earth"] .particle { background: #00cc44; box-shadow: 0 0 10px #00cc44; }
.craft-scene[data-element="air"]   .particle { background: #ffffff; box-shadow: 0 0 10px #ffffff; }

@keyframes particleFly {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.5); }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.2); }
}

.craft-scene .craft-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0;
    animation: glowPulse 3s ease-in-out infinite, glowFade 1s ease-out 0.4s forwards;
}
.craft-scene[data-element="fire"]  .craft-glow { background: radial-gradient(circle, #ff4d00, transparent 70%); }
.craft-scene[data-element="water"] .craft-glow { background: radial-gradient(circle, #00aaff, transparent 70%); }
.craft-scene[data-element="earth"] .craft-glow { background: radial-gradient(circle, #00cc44, transparent 70%); }
.craft-scene[data-element="air"]   .craft-glow { background: radial-gradient(circle, #ffffff, transparent 70%); }

@keyframes glowPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.2); }
}
@keyframes glowFade { to { opacity: 0.6; } }

.craft-scene .craft-vortex {
    position: absolute;
    border-radius: 50%;
    border: 3px dashed rgba(255,255,255,0.6);
    opacity: 0;
    z-index: 2;
}
.craft-scene[data-element="fire"]  .craft-vortex { border-color: #ff4d00; box-shadow: 0 0 40px #ff4d00, inset 0 0 30px rgba(255,77,0,0.8); }
.craft-scene[data-element="water"] .craft-vortex { border-color: #00aaff; box-shadow: 0 0 40px #00aaff, inset 0 0 30px rgba(0,170,255,0.8); }
.craft-scene[data-element="earth"] .craft-vortex { border-color: #00cc44; box-shadow: 0 0 40px #00cc44, inset 0 0 30px rgba(0,204,68,0.8); }
.craft-scene[data-element="air"]   .craft-vortex { border-color: #ffffff; box-shadow: 0 0 40px #ffffff, inset 0 0 30px rgba(255,255,255,0.8); }

@keyframes vortexAppear { from { opacity: 0; } to { opacity: 1; } }
@keyframes vortexSpin     { to { transform: rotate(360deg); } }
@keyframes vortexSpinBack { to { transform: rotate(-360deg); } }

.craft-scene .craft-vortex              { width: 140px; height: 140px; animation: vortexSpin     1.5s linear infinite, vortexAppear 1.5s ease-out 0.3s forwards; }
.craft-scene .craft-vortex.reverse      { width: 200px; height: 200px; border-style: dotted; animation: vortexSpinBack 2.2s linear infinite, vortexAppear 1.5s ease-out 0.6s forwards; }
.craft-scene .craft-vortex.mid          { width: 260px; height: 260px; animation: vortexSpin     2.6s linear infinite, vortexAppear 1.5s ease-out 0.9s forwards; }
.craft-scene .craft-vortex.mid2         { width: 320px; height: 320px; border-style: dotted; animation: vortexSpinBack 2.9s linear infinite, vortexAppear 1.5s ease-out 1.2s forwards; }
.craft-scene .craft-vortex.mid3         { width: 380px; height: 380px; animation: vortexSpin     3.2s linear infinite, vortexAppear 1.5s ease-out 1.5s forwards; }
.craft-scene .craft-vortex.mid4         { width: 440px; height: 440px; border-style: dotted; animation: vortexSpinBack 3.5s linear infinite, vortexAppear 1.5s ease-out 1.8s forwards; }

.craft-scene .craft-cat {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 40%;
    object-fit: cover;
    opacity: 0;
    transform: scale(0.5);
    animation: craftCatAppear 2.5s cubic-bezier(0.4, 0, 0.2, 1) 4s forwards;
    z-index: 3;
}
.craft-scene[data-element="fire"]  .craft-cat { box-shadow: 0 0 60px #ff4d00, 0 0 100px rgba(255,77,0,0.6); }
.craft-scene[data-element="water"] .craft-cat { box-shadow: 0 0 60px #00aaff, 0 0 100px rgba(0,170,255,0.6); }
.craft-scene[data-element="earth"] .craft-cat { box-shadow: 0 0 60px #00cc44, 0 0 100px rgba(0,204,68,0.6); }
.craft-scene[data-element="air"]   .craft-cat { box-shadow: 0 0 60px #ffffff, 0 0 100px rgba(255,255,255,0.6); }

@keyframes craftCatAppear {
    0%   { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}

.craft-scene .craft-name {
    position: absolute;
    bottom: 25%;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 15px rgba(255,255,255,0.9);
    opacity: 0;
    animation: craftNameAppear 1s ease-out 7s forwards;
}
@keyframes craftNameAppear {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* === РЕСУРСЫ В КРАФТЕ === */
.craft-resources {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
    flex-wrap: wrap;
}

.craft-res {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: bold;
}

.craft-res.ok {
    color: #4ade80;
}

.craft-res.no {
    color: #ef4444;
}

.craft-res-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.craft-junk {
    font-size: 13px;
    font-weight: bold;
    margin-left: 4px;
}

.craft-junk.ok {
    color: #4ade80;
}

.craft-junk.no {
    color: #ef4444;
}
.craft-res-icon-tail {
    width: 26px;
    height: 20px;
}

/* === СЦЕНА ПОЛУЧЕНИЯ КАМНЯ === */
.gem-scene {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 600;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.gem-scene.active { opacity: 1; }

.gem-scene .gem-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, #0a3a5f 0%, #001020 60%, #000205 100%);
}

.gem-scene .gem-core {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #4dc8ff 30%, transparent 70%);
    z-index: 5;
}

.gem-scene .gem-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #5dd0ff 60%, #0095dd 100%);
    top: 50%;
    left: 50%;
    animation: gemSpiralIn linear infinite;
}
@keyframes gemSpiralIn {
    0% {
        transform: rotate(var(--start-angle)) translateX(var(--start-r)) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: rotate(calc(var(--start-angle) + var(--turns))) translateX(0) rotate(0deg);
        opacity: 0;
    }
}

.gem-scene.hidden .gem-core,
.gem-scene.hidden .gem-particle {
    display: none;
}

/* Вспышка */
.gem-scene .gem-flash {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, #fff 0%, rgba(150,220,255,0.95) 30%, rgba(0,170,255,0.8) 60%, #001428 100%);
    opacity: 0;
    z-index: 20;
    pointer-events: none;
}
.gem-scene.flash-on .gem-flash {
    animation: gemFlashBurst 1.4s ease-out forwards;
}
@keyframes gemFlashBurst {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    50%  { opacity: 1; }
    100% { opacity: 0; }
}

/* Камень */
.gem-scene .gem-crystal {
    position: absolute;
    width: 180px;
    height: 180px;
    object-fit: contain;
    opacity: 0;
    z-index: 4;
}
.gem-scene.gem-in .gem-crystal {
    animation: gemCrystalFloat 1.8s ease-out forwards, gemCrystalBob 3.5s ease-in-out 1.8s infinite;
}
@keyframes gemCrystalFloat {
    0%   { opacity: 0; transform: scale(0.3) translateY(40px); }
    60%  { opacity: 1; transform: scale(1.1) translateY(-10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes gemCrystalBob {
    0%,100% { transform: translateY(0) rotate(0deg); }
    50%     { transform: translateY(-12px) rotate(3deg); }
}

/* Пузырьки */
.gem-scene .gem-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9), rgba(0,170,255,0.2));
    opacity: 0;
    z-index: 3;
    animation: gemBubbleRise linear infinite;
}
@keyframes gemBubbleRise {
    0%   { opacity: 0; transform: translate(var(--x), 200px) scale(0.4); }
    20%  { opacity: 0.9; }
    80%  { opacity: 0.9; }
    100% { opacity: 0; transform: translate(calc(var(--x) + 30px), -250px) scale(1); }
}

.gem-claim-btn {
    background: #A52A2A;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: bold;
    
    white-space: nowrap;
}

.gem-claim-btn:active {
    transform: scale(0.95);
}
/* === ОГОНЬ === */
.gem-scene[data-element="fire"] .gem-bg {
    background: radial-gradient(circle at center, #5f1a0a 0%, #200800 60%, #050100 100%);
}

.gem-scene[data-element="fire"] .gem-core {
    background: radial-gradient(circle, #fff 0%, #ffb347 30%, #ff4d00 60%, transparent 80%);
    animation: corePulse 1.5s ease-in-out infinite;
}
@keyframes corePulse {
    0%,100% { transform: scale(1); opacity: 0.9; }
    50%     { transform: scale(1.15); opacity: 1; }
}

.gem-scene[data-element="fire"] .gem-particle {
    background: radial-gradient(circle at 30% 30%, #fff, #ffb347 60%, #cc3300 100%);
}

/* Угли по фону */
.fire-ember {
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd27a, #ff4d00);
    box-shadow: 0 0 12px #ff4d00, 0 0 20px #ff8c00;
    opacity: 0;
    animation: fireEmberFloat linear infinite;
}
@keyframes fireEmberFloat {
    0%   { opacity: 0; transform: translateY(0) scale(0.6); }
    15%  { opacity: 1; }
    80%  { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(-140px) scale(1.2); }
}

/* Основание пламени */
.fire-base {
    position: absolute;
    bottom: calc(50% - 30px);
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, #fff8d0 0%, #ffcc33 20%, #ff6a00 50%, transparent 75%);
    filter: blur(15px);
    opacity: 0.9;
    z-index: 4;
    animation: fireBasePulse 0.8s ease-in-out infinite;
}
@keyframes fireBasePulse {
    0%,100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
    50%     { transform: translateX(-50%) scale(1.1); opacity: 1; }
}

/* Языки пламени */
.fire-flame {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    border-radius: 50% 50% 30% 30% / 80% 80% 20% 20%;
    filter: blur(14px);
    opacity: 0;
    mix-blend-mode: screen;
    animation: fireRise linear infinite;
}
@keyframes fireRise {
    0%   { opacity: 0; transform: translate(-50%, 0) scale(0.3) rotate(var(--rot-start)); }
    15%  { opacity: 1; }
    60%  { opacity: 0.85; }
    100% { opacity: 0; transform: translate(-50%, -220px) scale(1.3) rotate(var(--rot-end)); }
}
.fire-flame.layer-core {
    background: radial-gradient(ellipse at bottom, #fff4b0 0%, #ffcc33 30%, transparent 70%);
    width: 30px;
    height: 140px;
}
.fire-flame.layer-mid {
    background: radial-gradient(ellipse at bottom, #ffb347 0%, #ff6a00 40%, transparent 75%);
    width: 50px;
    height: 200px;
}
.fire-flame.layer-outer {
    background: radial-gradient(ellipse at bottom, #ff6a00 0%, #cc2200 40%, transparent 80%);
    width: 80px;
    height: 260px;
    filter: blur(20px);
}

/* Кольца тепла */
.fire-ring {
    position: absolute;
    width: 200px; height: 200px;
    border-radius: 50%;
    border: 2px solid rgba(255, 140, 0, 0.6);
    box-shadow: 0 0 40px rgba(255, 77, 0, 0.7), inset 0 0 30px rgba(255, 140, 0, 0.5);
    opacity: 0;
    animation: fireRingExpand 2.5s ease-out infinite;
}
@keyframes fireRingExpand {
    0%   { opacity: 0; transform: scale(0.3); }
    30%  { opacity: 1; transform: scale(0.8); }
    100% { opacity: 0; transform: scale(1.6); }
}

/* Искорки вокруг камня */
.fire-spark {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff8d0, #ff8c00);
    box-shadow: 0 0 10px #ffcc33, 0 0 18px #ff6a00;
    opacity: 0;
    z-index: 6;
    pointer-events: none;
    animation: fireSparkFloat linear infinite;
}
@keyframes fireSparkFloat {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.4); }
    20%  { opacity: 1; transform: translate(calc(var(--dx) * 0.3), calc(var(--dy) * 0.3)) scale(1); }
    80%  { opacity: 0.9; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); }
}

/* Скрытие огненных элементов */
.gem-scene.hidden .fire-base,
.gem-scene.hidden .fire-flame,
.gem-scene.hidden .fire-ring,
.gem-scene.hidden .fire-ember {
    display: none;
}
/* === ЗЕМЛЯ === */
.gem-scene[data-element="earth"] .gem-bg {
    background: radial-gradient(circle at center, #0a3a1a 0%, #041a08 60%, #000502 100%);
}

.gem-scene[data-element="earth"] .gem-core {
    background: radial-gradient(circle, #e8ffd0 0%, #7ad84a 30%, #2a7a1a 60%, transparent 80%);
    animation: corePulse 1.5s ease-in-out infinite;
}

.gem-scene[data-element="earth"] .gem-particle {
    border-radius: 30% 70% 60% 40% / 50% 60% 40% 50%;
    background: radial-gradient(circle at 30% 30%, #b8e89a, #4a8a3a 60%, #2a5a1a 100%);
    box-shadow: 0 0 8px rgba(74, 138, 58, 0.6);
}

/* Зелёные пылинки */
.earth-dust {
    position: absolute;
    width: 3px; height: 3px;
    border-radius: 50%;
    background: radial-gradient(circle, #b8e89a, #4a8a3a);
    box-shadow: 0 0 10px rgba(74, 138, 58, 0.8);
    opacity: 0;
    animation: earthDustFloat linear infinite;
}
@keyframes earthDustFloat {
    0%   { opacity: 0; transform: translateY(0) scale(0.6); }
    15%  { opacity: 1; }
    80%  { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(-140px) scale(1.2); }
}

/* Кольца */
.earth-ring {
    position: absolute;
    width: 200px; height: 200px;
    border-radius: 50%;
    border: 2px solid rgba(120, 200, 80, 0.6);
    box-shadow: 0 0 40px rgba(74, 138, 58, 0.7), inset 0 0 30px rgba(120, 200, 80, 0.5);
    opacity: 0;
    animation: earthRingExpand 2.5s ease-out infinite;
}
@keyframes earthRingExpand {
    0%   { opacity: 0; transform: scale(0.3); }
    30%  { opacity: 1; transform: scale(0.8); }
    100% { opacity: 0; transform: scale(1.6); }
}

/* Глыбы */
.earth-rock {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 40% 60% 35% 65% / 55% 45% 55% 45%;
    background: radial-gradient(circle at 30% 30%, #6a9a4a, #2a4a1a 70%, #101a08 100%);
    box-shadow: 0 0 15px rgba(74, 138, 58, 0.7), inset 0 0 8px rgba(0,0,0,0.6);
    opacity: 0;
    z-index: 6;
    animation: earthRockOrbit linear infinite;
}
@keyframes earthRockOrbit {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--radius)) rotate(0deg) scale(0.5);
    }
    15% { opacity: 1; }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(calc(var(--angle) + 180deg)) translateX(var(--radius)) rotate(-180deg) scale(1);
    }
    85% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(calc(var(--angle) + 360deg)) translateX(var(--radius)) rotate(-360deg) scale(0.5);
    }
}

/* Корешки */
.earth-root {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    background: linear-gradient(to top, #4a8a3a 0%, #7ad84a 40%, transparent 100%);
    box-shadow: 0 0 8px rgba(120, 200, 80, 0.8);
    border-radius: 2px;
    transform-origin: bottom center;
    opacity: 0;
    z-index: 5;
    animation: earthRootOrbit linear infinite;
}
@keyframes earthRootOrbit {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--radius)) rotate(90deg) scaleY(0.3);
    }
    20% { opacity: 1; }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(calc(var(--angle) + 180deg)) translateX(var(--radius)) rotate(90deg) scaleY(1);
    }
    80% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(calc(var(--angle) + 360deg)) translateX(var(--radius)) rotate(90deg) scaleY(0.3);
    }
}

/* Искорки */
.earth-spark {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 30% 70% 60% 40% / 50% 60% 40% 50%;
    background: radial-gradient(circle, #d0ffb0, #7ad84a);
    box-shadow: 0 0 10px #7ad84a, 0 0 18px #4a8a3a;
    opacity: 0;
    z-index: 6;
    pointer-events: none;
    animation: earthSparkFloat linear infinite;
}
@keyframes earthSparkFloat {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.4) rotate(0deg); }
    20%  { opacity: 1; transform: translate(calc(var(--dx) * 0.3), calc(var(--dy) * 0.3)) scale(1) rotate(90deg); }
    80%  { opacity: 0.9; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(360deg); }
}

/* Скрытие */
.gem-scene.hidden .earth-rock,
.gem-scene.hidden .earth-root,
.gem-scene.hidden .earth-ring,
.gem-scene.hidden .earth-dust {
    display: none;
}
/* === ВОЗДУХ === */
.gem-scene[data-element="air"] .gem-bg {
    background: radial-gradient(circle at center, #2a3a4a 0%, #101820 60%, #02040a 100%);
}

.gem-scene[data-element="air"] .gem-core {
    background: radial-gradient(circle, #ffffff 0%, #c0e8ff 30%, #5090c0 60%, transparent 80%);
    animation: corePulse 1.5s ease-in-out infinite;
}

.gem-scene[data-element="air"] .gem-particle {
    background: radial-gradient(circle at 30% 30%, #ffffff, #a0d8ff 60%, #5090c0 100%);
    box-shadow: 0 0 10px rgba(160, 216, 255, 0.8);
}

/* Пылинки */
.air-dust {
    position: absolute;
    width: 3px; height: 3px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff, #a0d8ff);
    box-shadow: 0 0 10px rgba(160, 216, 255, 0.9);
    opacity: 0;
    animation: airDustFloat linear infinite;
}
@keyframes airDustFloat {
    0%   { opacity: 0; transform: translateY(0) scale(0.6); }
    15%  { opacity: 1; }
    80%  { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(-160px) scale(1.2); }
}

/* Кольца */
.air-ring {
    position: absolute;
    width: 200px; height: 200px;
    border-radius: 50%;
    border: 2px solid rgba(160, 216, 255, 0.6);
    box-shadow: 0 0 40px rgba(120, 180, 220, 0.7), inset 0 0 30px rgba(160, 216, 255, 0.5);
    opacity: 0;
    animation: airRingExpand 2.5s ease-out infinite;
}
@keyframes airRingExpand {
    0%   { opacity: 0; transform: scale(0.3); }
    30%  { opacity: 1; transform: scale(0.8); }
    100% { opacity: 0; transform: scale(1.6); }
}

/* Вихри */
.air-swirl {
    position: absolute;
    top: 50%; left: 50%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: rgba(200, 232, 255, 0.7);
    border-right-color: rgba(160, 216, 255, 0.4);
    opacity: 0;
    transform-origin: center center;
    animation: airSwirlSpin linear infinite;
    z-index: 4;
    pointer-events: none;
}
@keyframes airSwirlSpin {
    0%   { transform: translate(-50%, -50%) rotate(0deg); opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: translate(-50%, -50%) rotate(360deg); opacity: 0; }
}
.air-swirl.reverse {
    border-top-color: transparent;
    border-bottom-color: rgba(200, 232, 255, 0.7);
    border-left-color: rgba(160, 216, 255, 0.4);
    animation-direction: reverse;
}

/* Полосы ветра */
.air-streak {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(220, 240, 255, 0.95), transparent);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(160, 216, 255, 0.9);
    opacity: 0;
    z-index: 6;
    pointer-events: none;
    transform-origin: center center;
    animation: airStreakFly linear infinite;
}
@keyframes airStreakFly {
    0%   { opacity: 0; transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--start-x)) scaleX(0.3); }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--end-x)) scaleX(1.3); }
}

/* Лепестки */
.air-petal {
    position: absolute;
    top: 50%; left: 50%;
    border-radius: 60% 40% 60% 40% / 50% 60% 40% 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #c0e8ff 70%, #80b8e0 100%);
    box-shadow: 0 0 12px rgba(200, 232, 255, 0.9);
    opacity: 0;
    animation: airPetalOrbit linear infinite;
    z-index: 6;
}
@keyframes airPetalOrbit {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--radius)) rotate(0deg) scale(0.4);
    }
    15% { opacity: 1; }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(calc(var(--angle) + 180deg)) translateX(calc(var(--radius) + var(--radius-breathe))) rotate(180deg) scale(1);
    }
    85% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(calc(var(--angle) + 360deg)) translateX(var(--radius)) rotate(360deg) scale(0.4);
    }
}

/* Искорки */
.air-spark {
    position: absolute;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff, #a0d8ff);
    box-shadow: 0 0 10px #c0e8ff, 0 0 18px #80b8e0;
    opacity: 0;
    z-index: 6;
    pointer-events: none;
    animation: airSparkFloat linear infinite;
}
@keyframes airSparkFloat {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.4); }
    20%  { opacity: 1; transform: translate(calc(var(--dx) * 0.3), calc(var(--dy) * 0.3)) scale(1); }
    80%  { opacity: 0.9; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); }
}

/* Скрытие */
.gem-scene.hidden .air-swirl,
.gem-scene.hidden .air-streak,
.gem-scene.hidden .air-petal,
.gem-scene.hidden .air-ring,
.gem-scene.hidden .air-dust {
    display: none;
}
/* === СЦЕНА МУРОТВОРЦА === */
.main-scene {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 700;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.main-scene.active { opacity: 1; }

.main-scene .main-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, #1a0a2a 0%, #0a0210 60%, #000 100%);
}

.vortex-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    opacity: 0;
    animation: vortexConverge 10s ease-in forwards;
}
@keyframes vortexConverge {
    0% {
        opacity: 0;
        transform: translate(var(--start-x), var(--start-y));
    }
    10% {
        opacity: 1;
        transform: translate(var(--start-x), var(--start-y));
    }
    30% {
        opacity: 1;
        transform: translate(var(--start-x), var(--start-y));
    }
    90% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translate(0, 0);
    }
}

.vortex-ring {
    position: absolute;
    top: 50%; left: 50%;
    width: 200px;
    height: 200px;
    margin-top: -100px;
    margin-left: -100px;
    border-radius: 50%;
    border: 6px dashed;
    animation: vortexSpin 2s linear infinite, vortexPulse 1.5s ease-in-out infinite;
}
.vortex-ring.inner {
    width: 150px;
    height: 150px;
    margin-top: -75px;
    margin-left: -75px;
    border-width: 4px;
    border-style: dotted;
    animation: vortexSpinReverse 2.8s linear infinite, vortexPulse 1.8s ease-in-out infinite;
}
@keyframes vortexSpin { to { transform: rotate(360deg); } }
@keyframes vortexSpinReverse { to { transform: rotate(-360deg); } }
@keyframes vortexPulse {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.5); }
}

.vortex-wrap.fire  .vortex-ring { border-color: #ff4d00; }
.vortex-wrap.water .vortex-ring { border-color: #00aaff; }
.vortex-wrap.earth .vortex-ring { border-color: #1a8a2a; }
.vortex-wrap.air   .vortex-ring { border-color: #ffffff; }

.vortex-gem {
    position: absolute;
    top: 50%; left: 50%;
    width: 60px;
    height: 60px;
    margin-top: -30px;
    margin-left: -30px;
    object-fit: contain;
    animation: vortexGemSpin 3s linear infinite;
}
@keyframes vortexGemSpin { to { transform: rotate(360deg); } }

.element-particle {
    position: absolute;
    border-radius: 50%;
    top: 50%; left: 50%;
    opacity: 0;
    animation: mainParticleFly linear infinite;
}
@keyframes mainParticleFly {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.5); }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.4); }
}

.element-twinkle {
    position: absolute;
    top: 50%; left: 50%;
    border-radius: 50%;
    opacity: 0;
    animation: twinkleVortex 1.5s ease-in-out infinite;
}
@keyframes twinkleVortex {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    50%      { opacity: 1; transform: translate(-50%, -50%) scale(1.5); }
}

.main-scene .main-flash {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, #fff 0%, rgba(200,150,255,0.95) 30%, rgba(150,80,220,0.85) 60%, #1a0a2a 100%);
    opacity: 0;
    z-index: 20;
    pointer-events: none;
}
.main-scene.flash-on .main-flash {
    animation: mainFlashBurst 1.4s ease-out forwards;
}
@keyframes mainFlashBurst {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    50%  { opacity: 1; }
    100% { opacity: 0; }
}

.main-aura {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(180,100,255,0.7) 0%, rgba(150,80,220,0.3) 40%, transparent 70%);
    opacity: 0;
    z-index: 4;
    pointer-events: none;
}
.main-scene.cat-in .main-aura {
    animation: auraPulse 3s ease-in-out infinite, auraFade 1.5s ease-out forwards;
}
@keyframes auraFade { to { opacity: 0.8; } }
@keyframes auraPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50%      { transform: scale(1.2); opacity: 1; }
}

.main-rays {
    position: absolute;
    width: 500px;
    height: 500px;
    opacity: 0;
    z-index: 4;
    pointer-events: none;
    animation: raysSpin 20s linear infinite;
}
.main-scene.cat-in .main-rays {
    animation: raysSpin 20s linear infinite, raysFade 1.5s ease-out forwards;
}
.main-ray {
    position: absolute;
    top: 50%; left: 50%;
    width: 2px;
    height: 250px;
    background: linear-gradient(to top, rgba(180,100,255,0.8), transparent);
    transform-origin: bottom center;
    transform: translate(-50%, -100%) rotate(var(--angle));
}
@keyframes raysSpin { to { transform: rotate(360deg); } }
@keyframes raysFade { to { opacity: 0.6; } }

.main-scene .main-cat-img {
    position: absolute;
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    opacity: 0;
    z-index: 5;
}
.main-scene.cat-in .main-cat-img {
    animation: mainCatFloat 2s ease-out forwards, mainCatBob 3.5s ease-in-out 2s infinite;
}
@keyframes mainCatFloat {
    0%   { opacity: 0; transform: scale(0.3) translateY(40px); }
    60%  { opacity: 1; transform: scale(1.15) translateY(-10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes mainCatBob {
    0%,100% { transform: translateY(0) rotate(0deg); }
    50%     { transform: translateY(-14px) rotate(3deg); }
}

.purple-spark {
    position: absolute;
    border-radius: 50%;
    top: 50%; left: 50%;
    background: radial-gradient(circle, #e0b0ff, #9a4dff);
    opacity: 0;
    z-index: 6;
    pointer-events: none;
    animation: purpleSparkFly linear infinite;
}
@keyframes purpleSparkFly {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.4); }
    20%  { opacity: 1; transform: translate(calc(var(--dx) * 0.3), calc(var(--dy) * 0.3)) scale(1); }
    80%  { opacity: 0.9; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); }
}

.twinkle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #e0b0ff;
    opacity: 0;
    z-index: 6;
    pointer-events: none;
    animation: twinkleAnim 2s ease-in-out infinite;
}
@keyframes twinkleAnim {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    50%      { opacity: 1; transform: translate(-50%, -50%) scale(1.5); }
}

.main-scene .main-name {
    position: absolute;
    bottom: 22%;
    font-size: 26px;
    font-weight: bold;
    color: #e0b0ff;
    text-shadow: 0 0 25px rgba(180,100,255,0.9), 0 0 50px rgba(150,80,220,0.6);
    opacity: 0;
    z-index: 7;
}
.main-scene.name-in .main-name {
    animation: mainNameAppear 1.2s ease-out forwards;
}
@keyframes mainNameAppear {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cat-viewer-content {
    background: linear-gradient(160deg, #2a0a4a 0%, #1a0033 60%, #0a0018 100%);
    border: 1px solid rgba(212, 164, 255, 0.4);
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
}

.cat-viewer-img {
    width: 260px;
    height: 260px;
    object-fit: contain;
    margin: 0 auto 16px auto;
    display: block;
    filter: drop-shadow(0 0 25px rgba(212, 164, 255, 0.8));
}

.cat-viewer-name {
    font-size: 22px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 12px rgba(212, 164, 255, 0.8);
    margin-bottom: 16px;
}
#cat-viewer-overlay .modal-close {
    background: linear-gradient(135deg, #7a3fd1 0%, #4a1a8a 100%);
    border: 1px solid rgba(212, 164, 255, 0.5);
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 8px rgba(212, 164, 255, 0.7);
    transition: 0.15s;
    margin-top: 10px;
}

#cat-viewer-overlay .modal-close:active {
    transform: scale(0.96);
}
/* === КНОПКИ КОЛЛЕКЦИЙ В "МОИ КОТЕЙКИ" === */
#page-my-cats .elements-column {
    display: grid;
    grid-template-columns: repeat(2, 170px);
    gap: 12px;
    justify-content: center;
    width: 90%;
    margin: 20px auto;
}

#page-my-cats .menu-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background-image: url('/knopkamenu.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 6px 8px;
    width: 100%;
    height: 100px;
    margin: 0;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s;
    box-sizing: border-box;
}

#page-my-cats .menu-icon {
    position: static;
    height: 50px;
    width: 50px;
    object-fit: contain;
}

#page-my-cats .el-text {
    display: block;
    text-align: center;
    width: 100%;
}

#page-my-cats .el-text {
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: elShift 3s linear infinite;
}

#page-my-cats .el-fire  {
    background-image: linear-gradient(90deg, #ff5a1f, #ffb347, #ff3b1f, #ff5a1f);
}
#page-my-cats .el-water {
    background-image: linear-gradient(90deg, #3498db, #7ad8ff, #1a6ecc, #3498db);
}
#page-my-cats .el-earth {
    background-image: linear-gradient(90deg, #27ae60, #a4f070, #1a8a4a, #27ae60);
}
#page-my-cats .el-air   {
    background-image: linear-gradient(90deg, #ffffff, #7ad8ff, #b0c8d8, #ffffff);
}

@keyframes elShift {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}