/* Custom animations and enhancements */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(220, 38, 38, 0.3); }
    50% { box-shadow: 0 0 30px rgba(220, 38, 38, 0.6); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* File input styling */
input[type="file"]::-webkit-file-upload-button {
    background: #dc2626;
    border: none;
    border-radius: 9999px;
    color: white;
    padding: 8px 16px;
    margin-right: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background: #b91c1c;
}

/* Enhanced focus states */
input:focus, button:focus {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Success state animation */
.success-bounce {
    animation: bounce 0.5s ease-out;
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

/* Loading spinner enhancement */
.loading-pulse {
    animation: loading-pulse 1.5s infinite;
}

@keyframes loading-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive image preview */
#photo-preview img {
    max-height: 300px;
    object-fit: cover;
    border: 3px solid #dc2626;
}

/* Badge preview styling */
#badge-preview {
    max-width: 90%;
    max-height: 400px;
    object-fit: contain;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

#badge-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

/* Badge preview container */
.badge-container {
    position: relative;
    display: inline-block;
}

.badge-container::after {
    content: "Click to enlarge";
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #9CA3AF;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.badge-container:hover::after {
    opacity: 1;
}

/* Hover effects for social buttons */
.social-btn-twitter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.social-btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Counter animation */
.counter-update {
    animation: counter-update 0.5s ease-out;
}

@keyframes counter-update {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: #fbbf24; }
    100% { transform: scale(1); }
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .space-x-8 > * + * {
        margin-left: 1rem;
    }
}