/* LujuriaMC Pixel System CSS */

/* Custom scrollbars matching Minecraft GUI slider */
::-webkit-scrollbar {
    width: 16px;
}
::-webkit-scrollbar-track {
    background-color: #0f0f0f;
    border-left: 4px solid #2a2a2a;
}
::-webkit-scrollbar-thumb {
    background-color: #2a2a2a;
    border: 4px solid;
    border-color: rgba(255, 255, 255, 0.25) rgba(0, 0, 0, 0.6) rgba(0, 0, 0, 0.6) rgba(255, 255, 255, 0.25);
}
::-webkit-scrollbar-thumb:hover {
    background-color: #ffaa00;
}

/* Base button with 3D raised border */
.minecraft-btn {
    background-color: #2a2a2a;
    border: 4px solid;
    border-color: rgba(255, 255, 255, 0.25) rgba(0, 0, 0, 0.6) rgba(0, 0, 0, 0.6) rgba(255, 255, 255, 0.25);
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.85);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05);
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    letter-spacing: 0.5px;
    image-rendering: pixelated;
    transition: background-color 0.1s, color 0.1s, border-color 0.1s;
    user-select: none;
    cursor: pointer;
}

.minecraft-btn:hover {
    background-color: #ffaa00 !important;
    color: #111111 !important;
    text-shadow: none !important;
    border-color: rgba(255, 255, 255, 0.4) rgba(0, 0, 0, 0.8) rgba(0, 0, 0, 0.8) rgba(255, 255, 255, 0.4);
}

.minecraft-btn:active {
    border-color: rgba(0, 0, 0, 0.8) rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.8);
    transform: translate(2px, 2px);
    box-shadow: none;
    text-shadow: none !important;
}

/* Selected state styling (used by duration switcher) */
.minecraft-btn.bg-secondary-container {
    text-shadow: none !important;
    border-color: rgba(255, 255, 255, 0.4) rgba(0, 0, 0, 0.8) rgba(0, 0, 0, 0.8) rgba(255, 255, 255, 0.4) !important;
}

/* Primary/Success Button variant (Green) */
.minecraft-btn-primary {
    background-color: #55ff55 !important;
    color: #111111 !important;
    text-shadow: none !important;
    border-color: rgba(255, 255, 255, 0.5) rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) rgba(255, 255, 255, 0.5);
}
.minecraft-btn-primary:hover {
    background-color: #aaffaa !important;
}

/* Danger Button variant (Red) */
.minecraft-btn-danger {
    background-color: #ff5555 !important;
    color: #ffffff !important;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.4) rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) rgba(255, 255, 255, 0.4);
}
.minecraft-btn-danger:hover {
    background-color: #ff8888 !important;
    color: #ffffff !important;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.85) !important;
}

/* Inventory slot (sunken) */
.minecraft-slot {
    background-color: #0f0f0f;
    border: 4px solid;
    border-color: rgba(0, 0, 0, 0.85) rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.15) rgba(0, 0, 0, 0.85);
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.6);
    image-rendering: pixelated;
}

/* Minecraft GUI Panel (raised container) */
.minecraft-panel {
    background-color: #2a2a2a;
    border: 4px solid;
    border-color: rgba(255, 255, 255, 0.25) rgba(0, 0, 0, 0.6) rgba(0, 0, 0, 0.6) rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05), 0 8px 16px rgba(0, 0, 0, 0.6);
}

/* Minecraft GUI Sunken Panel */
.minecraft-panel-sunken {
    background-color: #1a1a1a;
    border: 4px solid;
    border-color: rgba(0, 0, 0, 0.85) rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.15) rgba(0, 0, 0, 0.85);
}

/* Section divider with repeating pixel pattern */
.section-divider {
    height: 20px;
    background-color: #333333;
    background-image: 
        linear-gradient(90deg, #111111 4px, transparent 4px),
        linear-gradient(0deg, #111111 4px, transparent 4px),
        linear-gradient(90deg, #555555 4px, transparent 4px),
        linear-gradient(0deg, #555555 4px, transparent 4px);
    background-size: 16px 16px, 16px 16px, 16px 16px, 16px 16px;
    background-position: 0 0, 0 0, 8px 8px, 8px 8px;
    border-top: 4px solid #111111;
    border-bottom: 4px solid #111111;
}

/* Repeating Stone texture border for footer/headers */
.border-repeat-stone {
    background-image: url("https://www.transparenttextures.com/patterns/black-linen.png"); /* dark grain */
    background-color: #161616;
    border-top: 8px solid #333333;
}

/* Noise overlay */
.pixel-noise {
    background-image: url("https://www.transparenttextures.com/patterns/pixel-weave.png");
}

/* CRT Scanline effect */
.crt-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.18) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 5;
    opacity: 0.55;
}

/* Rare Item Glows */
.rarity-legendary {
    box-shadow: 0 0 16px #ffff55;
    border-color: #ffff55 !important;
}
.rarity-epic {
    box-shadow: 0 0 16px #c54fff;
    border-color: #c54fff !important;
}
.rarity-rare {
    box-shadow: 0 0 16px #55ffff;
    border-color: #55ffff !important;
}

/* Text shadows */
.mc-shadow-gold {
    text-shadow: 2px 2px 0px #4d3300;
}
.mc-shadow-white {
    text-shadow: 2px 2px 0px #3f3f3f;
}
.mc-shadow-black {
    text-shadow: 2px 2px 0px #000000;
}

/* Custom transitions and animations */
@keyframes mc-modal-pop {
    0% {
        transform: translate(-50%, -46%) scale(0.92);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}
.animate-mc-pop {
    animation: mc-modal-pop 0.18s cubic-bezier(0.3, 1, 0.4, 1) forwards;
}

@keyframes float-up {
    0% {
        transform: translate(-50%, 0) scale(0.85);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -20px) scale(1.15);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -90px) scale(0.85);
        opacity: 0;
    }
}
.animate-float-up {
    animation: float-up 1.1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes slide-in-right {
    from { transform: translateX(120%); }
    to { transform: translateX(0); }
}
.animate-slide-in-right {
    animation: slide-in-right 0.25s cubic-bezier(0, 0.5, 0.5, 1);
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
.animate-fade-in {
    animation: fade-in 0.2s ease-out;
}

/* Minecraft Input focus */
.minecraft-input {
    background-color: #0c0c0c !important;
    border: 3px solid !important;
    border-color: rgba(0, 0, 0, 0.9) rgba(255, 255, 255, 0.1) rgba(255, 255, 255, 0.1) rgba(0, 0, 0, 0.9) !important;
    color: #ffffff !important;
    font-family: 'VT323', monospace;
    font-size: 22px;
}
.minecraft-input:focus {
    outline: none !important;
    border-color: #ffff55 !important;
    box-shadow: 0 0 8px rgba(255, 255, 85, 0.5) !important;
}

/* Floating Cart chest icon style */
.floating-cart-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 40;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

/* Floating Cart badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff5555;
    color: #ffffff;
    border: 2px solid #000;
    padding: 2px 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    z-index: 45;
}

/* Inventory Item Image styling with shadow */
.minecraft-item-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
}
.minecraft-item-icon:hover {
    transform: scale(1.1);
}
.minecraft-item-icon::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 80%;
    height: 80%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

/* Pixel Badges (Popular / Destacado) */
.pixel-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffaa00 !important;
    color: #ffffff !important;
    border: 2px solid #000000;
    font-family: 'Press Start 2P', monospace;
    white-space: nowrap;
    text-shadow: 2px 2px 0px #000000;
    z-index: 20;
    box-shadow: 0 4px 0px rgba(0, 0, 0, 0.3);
}

.pixel-badge-destacado {
    padding: 6px 16px;
    font-size: 10px;
    letter-spacing: 1px;
}

.pixel-badge-popular {
    padding: 4px 10px;
    font-size: 8px;
    letter-spacing: 0.5px;
    background-color: #cdcd21 !important; /* gold-yellow */
}
