/* ==========================================
   WeMadeFlyff — Custom Styles
   ========================================== */

/* Animations */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.1); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.3); }
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(720deg);
        opacity: 0;
    }
}

/* Hero background */
.hero-bg {
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 70% 50%, rgba(139, 92, 246, 0.08), transparent),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(239, 68, 68, 0.06), transparent);
}

/* Animate on scroll */
.animate-fade-in-up {
    animation: fade-in-up 1s ease-out forwards;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Particle styles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    animation: particle-float linear infinite;
    pointer-events: none;
}

.particle:nth-child(odd) {
    background: rgba(139, 92, 246, 0.2);
    width: 3px;
    height: 3px;
}

.particle:nth-child(3n) {
    background: rgba(239, 68, 68, 0.15);
    width: 5px;
    height: 5px;
}

/* Story cards hover effect */
.story-card {
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.story-card:hover::before {
    opacity: 1;
}

/* Fact cards */
.fact-card {
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.fact-card:hover {
    transform: translateY(-2px);
}

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

::-webkit-scrollbar-track {
    background: #0f0f1a;
}

::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* Selection color */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}

/* Smooth nav link underline effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

/* Counter number styling */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Mobile timeline adjustments */
@media (max-width: 767px) {
    #timeline .space-y-12 > div > div:first-child:not(:empty) {
        padding-left: 2.5rem;
    }
}

/* Glow effects for special elements */
.glow-brand {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
}

.glow-red {
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.15);
}

/* Evidence image wrappers */
.evidence-img-wrapper {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.evidence-img-wrapper:hover {
    transform: scale(1.02);
}

.evidence-img-wrapper img {
    transition: filter 0.3s ease;
}

.evidence-img-wrapper:hover img {
    filter: brightness(1.1);
}

/* Lightbox */
#lightbox {
    transition: opacity 0.3s ease;
}

#lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-zoomable {
    transition: width 0.3s ease, max-width 0.3s ease;
    cursor: zoom-in;
}

.lightbox-zoomable.zoomed {
    cursor: zoom-out;
}

/* Zoom fit (default) */
.lightbox-zoomable.zoom-fit {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    object-fit: contain;
}

/* Zoom 100% */
.lightbox-zoomable.zoom-100 {
    max-width: none;
    max-height: none;
    width: auto;
}

/* Zoom 150% */
.lightbox-zoomable.zoom-150 {
    max-width: none;
    max-height: none;
}

/* Zoom 200% */
.lightbox-zoomable.zoom-200 {
    max-width: none;
    max-height: none;
}

/* Print styles */
@media print {
    nav, .particles-container, #action {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .text-white, .text-gray-300, .text-gray-400 {
        color: black !important;
    }
    
    section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
