/* Custom Styles for PixelMesh */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode configuration for Tailwind */
.dark {
    color-scheme: dark;
}

/* Mesh node animation */
.mesh-node {
    position: absolute;
    width: 0.5rem;
    height: 0.5rem;
    background-color: rgb(59, 130, 246);
    border-radius: 9999px;
    opacity: 0.2;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.5);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Form focus states enhancement */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Button hover effects */
button {
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Ensure images don't break layout */
img {
    max-width: 100%;
    height: auto;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Loading state for submit button */
.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success message animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.show-message {
    animation: slideIn 0.3s ease-out;
}

/* Dark mode toggle button animation */
#darkModeToggle {
    transition: transform 0.2s ease;
    position: relative;
    z-index: 9999;
}

#darkModeToggle:hover {
    transform: scale(1.1);
}

#darkModeToggle:active {
    transform: scale(0.95);
}

/* Ensure dark mode toggle is always visible */
.fixed {
    position: fixed !important;
}

/* Smooth icon transitions */
#sunIcon, #moonIcon {
    transition: opacity 0.3s ease;
}

/* reCAPTCHA styling */
.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

/* Ensure reCAPTCHA is visible in dark mode */
.dark .g-recaptcha {
    filter: brightness(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    #darkModeToggle {
        top: 1rem;
        right: 1rem;
    }
    
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: center;
    }
}
