/* ===== Custom Styles for JND28 Prediction Platform ===== */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #818cf8;
}

/* Selection Color */
::selection {
    background-color: #6366f1;
    color: #ffffff;
}

/* Navbar scroll effect */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* FAQ accordion open state */
.faq-item.active .faq-icon {
    transform: rotate(180deg);
    background-color: #4f46e5;
}

.faq-item.active .faq-icon i {
    color: #ffffff;
}

.faq-item.active {
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* Counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter.animate {
    animation: countUp 0.6s ease-out forwards;
}

/* Feature card icon hover */
.feature-icon-group:hover .feature-icon-bg {
    background-color: #4f46e5;
}

.feature-icon-group:hover .feature-icon-bg i {
    color: #ffffff;
}

/* Hover transform utilities */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* Mobile menu animation */
#mobile-menu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

#mobile-menu:not(.hidden) {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Loading shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Form focus ring enhancement */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Gradient text utility */
.text-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    padding: 16px 24px;
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background-color: #10b981;
}

.toast.error {
    background-color: #ef4444;
}

/* Responsive font scaling */
@media (max-width: 640px) {
    .counter {
        font-size: 2rem !important;
    }
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu,
    #cta,
    footer {
        display: none;
    }
}

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

    html {
        scroll-behavior: auto;
    }
}

/* Focus visible outline for accessibility */
*:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to main content link (accessibility) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #4f46e5;
    color: #fff;
    padding: 8px 16px;
    z-index: 10000;
    border-radius: 0 0 8px 0;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}
