/* Minecraft UUID Tool - Custom Styles */

/* Smooth transitions for all interactive elements */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Avatar image animations */
#avatarImg {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    max-width: 150px;
    object-fit: contain;
}

#avatarImg:hover {
    transform: scale(1.05) rotate(1deg);
    box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.5), 0 15px 15px -5px rgba(0, 0, 0, 0.4);
    filter: brightness(1.1);
}

/* Avatar placeholder fade transition */
#avatarPlaceholder {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#avatarPlaceholder.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Button hover effects */
button {
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

/* Input focus effects */
#mcInput:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1), 0 0 20px rgba(34, 197, 94, 0.2);
}

/* UUID display animations */
#uuidHyphen, #uuidPlain {
    transition: all 0.3s ease;
}

#uuidHyphen:not(:empty):not([textContent="—"]),
#uuidPlain:not(:empty):not([textContent="—"]) {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for loading states */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Glow effects for cards */
.card-glow {
    position: relative;
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #10b981, #3b82f6, #8b5cf6, #10b981);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
    animation: rotate 3s linear infinite;
}

.card-glow:hover::before {
    opacity: 0.1;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Success feedback animations */
.success-feedback {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Error state styling */
.error-state {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Loading spinner */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Floating background elements */
.floating-bg {
    animation: float 6s ease-in-out infinite;
}

.floating-bg:nth-child(2) {
    animation-delay: -2s;
}

.floating-bg:nth-child(3) {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #avatarImg {
        width: 80px;
        height: 80px;
    }
    
    .card-glow::before {
        inset: -1px;
    }
}

/* Dark theme scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.9);
}

/* Selection styling */
::selection {
    background: rgba(34, 197, 94, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(34, 197, 94, 0.3);
    color: white;
}

/* Focus visible for accessibility */
button:focus-visible,
input:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Smooth page transitions */
main {
    animation: pageLoad 0.8s ease-out;
}

@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
