/* Advanced Minecraft Animations */
@keyframes blockBreak {
    0% { opacity: 1; transform: scale(1); }
    20% { opacity: 0.9; transform: scale(0.98); }
    40% { opacity: 0.8; transform: scale(0.96); }
    60% { opacity: 0.7; transform: scale(0.94); }
    80% { opacity: 0.6; transform: scale(0.92); }
    100% { opacity: 0.5; transform: scale(0.9); }
}

@keyframes pixelate {
    0% { filter: blur(0px); }
    50% { filter: blur(1px); }
    100% { filter: blur(0px); }
}

@keyframes emeraldGlow {
    0% { filter: drop-shadow(0 0 3px rgba(0, 255, 0, 0.3)); }
    50% { filter: drop-shadow(0 0 8px rgba(0, 255, 0, 0.7)); }
    100% { filter: drop-shadow(0 0 3px rgba(0, 255, 0, 0.3)); }
}

@keyframes diamondGlow {
    0% { filter: drop-shadow(0 0 3px rgba(0, 170, 255, 0.3)); }
    50% { filter: drop-shadow(0 0 8px rgba(0, 170, 255, 0.7)); }
    100% { filter: drop-shadow(0 0 3px rgba(0, 170, 255, 0.3)); }
}

@keyframes goldGlow {
    0% { filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.3)); }
    50% { filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.7)); }
    100% { filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.3)); }
}

@keyframes redstoneGlow {
    0% { filter: drop-shadow(0 0 3px rgba(255, 0, 0, 0.3)); }
    50% { filter: drop-shadow(0 0 8px rgba(255, 0, 0, 0.7)); }
    100% { filter: drop-shadow(0 0 3px rgba(255, 0, 0, 0.3)); }
}

@keyframes lapisGlow {
    0% { filter: drop-shadow(0 0 3px rgba(0, 0, 255, 0.3)); }
    50% { filter: drop-shadow(0 0 8px rgba(0, 0, 255, 0.7)); }
    100% { filter: drop-shadow(0 0 3px rgba(0, 0, 255, 0.3)); }
}

@keyframes torchFlicker {
    0% { filter: brightness(1) drop-shadow(0 0 10px rgba(255, 200, 0, 0.6)); }
    25% { filter: brightness(0.9) drop-shadow(0 0 8px rgba(255, 200, 0, 0.5)); }
    50% { filter: brightness(1.1) drop-shadow(0 0 12px rgba(255, 200, 0, 0.7)); }
    75% { filter: brightness(0.95) drop-shadow(0 0 9px rgba(255, 200, 0, 0.5)); }
    100% { filter: brightness(1) drop-shadow(0 0 10px rgba(255, 200, 0, 0.6)); }
}

@keyframes cubeRotate {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

@keyframes floatUpDown {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes shake {
    0% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-2px, 0) rotate(-2deg); }
    40% { transform: translate(2px, 0) rotate(2deg); }
    60% { transform: translate(-2px, 0) rotate(-1deg); }
    80% { transform: translate(2px, 0) rotate(1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* 3D Cube Animation */
.minecraft-cube {
    width: 60px;
    height: 60px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-30deg) rotateY(45deg);
    animation: cubeRotate 20s infinite linear;
}

.minecraft-cube .face {
    position: absolute;
    width: 60px;
    height: 60px;
    background-size: cover;
    border: 1px solid rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.minecraft-cube .front {
    transform: translateZ(30px);
}

.minecraft-cube .back {
    transform: translateZ(-30px) rotateY(180deg);
}

.minecraft-cube .right {
    transform: translateX(30px) rotateY(90deg);
}

.minecraft-cube .left {
    transform: translateX(-30px) rotateY(-90deg);
}

.minecraft-cube .top {
    transform: translateY(-30px) rotateX(90deg);
}

.minecraft-cube .bottom {
    transform: translateY(30px) rotateX(-90deg);
}

/* Diamond Cube */
.diamond-cube .face {
    background-color: #6cf;
    background-image: linear-gradient(135deg, #6cf 0%, #39f 100%);
    animation: diamondGlow 3s infinite alternate;
}

/* Emerald Cube */
.emerald-cube .face {
    background-color: #5c5;
    background-image: linear-gradient(135deg, #5c5 0%, #3a3 100%);
    animation: emeraldGlow 3s infinite alternate;
}

/* Gold Cube */
.gold-cube .face {
    background-color: #fc3;
    background-image: linear-gradient(135deg, #fd5 0%, #fb1 100%);
    animation: goldGlow 3s infinite alternate;
}

/* Redstone Cube */
.redstone-cube .face {
    background-color: #f33;
    background-image: linear-gradient(135deg, #f55 0%, #c11 100%);
    animation: redstoneGlow 3s infinite alternate;
}

/* Interactive Elements */
.interactive-element {
    transition: all 0.3s ease;
    cursor: url('../images/cursor-pointer.png'), pointer;
}

.interactive-element:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.interactive-element:active {
    transform: scale(0.95);
    animation: blockBreak 0.3s forwards;
}

/* Minecraft Button Styles */
.minecraft-button {
    background-image: url('../images/button.png');
    background-size: cover;
    color: white;
    text-shadow: 2px 2px 0 #000;
    border: 2px solid #000;
    padding: 10px 15px;
    font-family: 'Minecraftia', 'Press Start 2P', monospace;
    position: relative;
    transition: all 0.1s ease;
    transform-style: preserve-3d;
    transform: translateZ(0);
}

.minecraft-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
    z-index: -1;
    transform: translateZ(-5px);
}

.minecraft-button:hover {
    transform: translateY(-2px) translateZ(0);
    filter: brightness(1.2);
}

.minecraft-button:active {
    transform: translateY(2px) translateZ(-2px);
    filter: brightness(0.9);
}

/* Torch Animation */
.minecraft-torch {
    position: absolute;
    width: 30px;
    height: 60px;
    background-image: url('../images/torch.png');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 5;
    animation: torchFlicker 3s infinite;
}

.torch-left {
    left: 20px;
    top: 20px;
}

.torch-right {
    right: 20px;
    top: 20px;
}

/* Floating Items */
.floating-item {
    position: absolute;
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    animation: floatUpDown 4s ease-in-out infinite;
}

.diamond-item {
    background-image: url('../images/diamond.png');
    animation-delay: 0s;
    animation-duration: 4s;
    filter: drop-shadow(0 0 5px rgba(0, 170, 255, 0.5));
}

.emerald-item {
    background-image: url('../images/emerald.png');
    animation-delay: 1s;
    animation-duration: 5s;
    filter: drop-shadow(0 0 5px rgba(0, 255, 0, 0.5));
}

.gold-item {
    background-image: url('../images/gold.png');
    animation-delay: 2s;
    animation-duration: 6s;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/noise.png');
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
    animation: backgroundShift 30s linear infinite;
}
