/* Additional styles beyond Tailwind CSS */

/* Floating animation for octopus emojis */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-8px); 
    }
}

/* Pulse animation for prediction button */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Tentacle wiggle animation */
@keyframes wiggle {
    0%, 7% {
        transform: rotateZ(0);
    }
    15% {
        transform: rotateZ(-15deg);
    }
    20% {
        transform: rotateZ(10deg);
    }
    25% {
        transform: rotateZ(-10deg);
    }
    30% {
        transform: rotateZ(6deg);
    }
    35% {
        transform: rotateZ(-4deg);
    }
    40%, 100% {
        transform: rotateZ(0);
    }
}

/* Gradient text effect for main title */
.gradient-text {
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Hover effects for gallery items */
.gallery-item:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease-in-out;
}

/* Smooth transitions for all interactive elements */
* {
    transition: all 0.2s ease-in-out;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Prediction button enhancement */
button:hover {
    animation: pulse 1.5s infinite;
}

/* Octopus emoji enhancements */
.octopus-emoji {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
}

.octopus-emoji:hover {
    animation: wiggle 0.5s ease-in-out;
    transform-origin: center bottom;
}

/* Confidence tentacles animation */
.confidence-tentacle {
    display: inline-block;
    animation: float 2s ease-in-out infinite;
}

.confidence-tentacle:nth-child(1) { animation-delay: 0s; }
.confidence-tentacle:nth-child(2) { animation-delay: 0.2s; }
.confidence-tentacle:nth-child(3) { animation-delay: 0.4s; }
.confidence-tentacle:nth-child(4) { animation-delay: 0.6s; }
.confidence-tentacle:nth-child(5) { animation-delay: 0.8s; }

/* Lightbox enhancements */
#lightbox {
    backdrop-filter: blur(5px);
}

#lightbox img {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Recent predictions animation */
.recent-prediction-new {
    animation: slideInFromTop 0.5s ease-out;
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Wikipedia-style typography enhancements */
.wikipedia-content p {
    line-height: 1.6;
    margin-bottom: 1em;
}

.wikipedia-content h2 {
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.3em;
    margin-top: 2em;
}

.dark .wikipedia-content h2 {
    border-bottom-color: #374151;
}

/* Prediction result box animation */
.prediction-appear {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fun hover effects for stats */
.stat-number:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease-in-out;
}

/* Subtle border animations */
.animated-border {
    position: relative;
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    animation: borderSlide 2s linear infinite;
}

@keyframes borderSlide {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Dark mode specific glow effects */
.dark .glow-border {
    animation: glowDark 2s ease-in-out infinite alternate;
}

@keyframes glowDark {
    from { 
        box-shadow: 0 0 20px #3b82f6; 
    }
    to { 
        box-shadow: 0 0 30px #3b82f6, 0 0 40px #3b82f6; 
    }
}

/* Dark mode toggle button enhancements */
#darkModeToggle {
    transition: all 0.3s ease-in-out;
}

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

#darkModeIcon {
    font-size: 1.2em;
    transition: all 0.3s ease-in-out;
}

/* Mobile responsiveness enhancements */
@media (max-width: 768px) {
    .float-right {
        float: none !important;
        margin: 0 auto 1.5rem auto;
    }
    
    .octopus-emoji {
        font-size: 1.2em;
    }
    
    .gallery-item img {
        height: 250px;
    }

    /* Smaller dark mode toggle on mobile */
    #darkModeToggle {
        padding: 0.5rem;
    }
    
    #darkModeIcon {
        font-size: 1em;
    }
}

/* Print styles */
@media print {
    .no-print, #darkModeToggle {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states for better accessibility */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.dark button:focus,
.dark input:focus,
.dark a:focus {
    outline-color: #60a5fa;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-blue-50 {
        background-color: #ffffff !important;
        border: 2px solid #000000 !important;
    }
    
    .text-blue-600 {
        color: #000080 !important;
    }

    .dark .bg-blue-50 {
        background-color: #000000 !important;
        border: 2px solid #ffffff !important;
    }
    
    .dark .text-blue-600 {
        color: #87ceeb !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom selection styling */
::selection {
    background-color: rgba(59, 130, 246, 0.3);
    color: inherit;
}

::-moz-selection {
    background-color: rgba(59, 130, 246, 0.3);
    color: inherit;
}

.dark ::selection {
    background-color: rgba(96, 165, 250, 0.3);
    color: inherit;
}

.dark ::-moz-selection {
    background-color: rgba(96, 165, 250, 0.3);
    color: inherit;
}

/* Custom switch styles */
.switch-ball {
    transition: transform 0.3s ease;
}

.dark .switch-ball {
    transform: translateX(24px);
}

/* Smooth transitions for icons */
.switch-ball span {
    transition: opacity 0.3s ease;
}

/* Enhanced navbar styles */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link.active::before {
    width: 100%;
}

/* Mobile menu animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

#mobileMenu.show {
    max-height: 400px;
    opacity: 1;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .nav-link {
        font-size: 0.9rem;
    }
    
    header {
        padding-bottom: 0.75rem !important;
    }
}

/* Improved button animations */
.group:hover {
    transform: translateY(-1px);
}

/* Smooth color transitions for nav links */
.nav-link {
    transition: all 0.3s ease !important;
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.1) !important;
}

/* Enhanced header gradient */
.dark header {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* Pulse animation for contract address */
@keyframes pulse-soft {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

#contractAddress:hover {
    animation: pulse-soft 2s infinite;
} 