/* ============================================================
   加拿大PC预测网 - Landing Page Custom Styles
   ============================================================ */

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

/* ---------- Navbar Scroll Effect ---------- */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding-top: 12px;
    padding-bottom: 12px;
}

#navbar.scrolled a:not(.bg-white) {
    color: #374151;
}

#navbar.scrolled a:not(.bg-white):hover {
    color: #4f46e5;
}

#navbar.scrolled .bg-white {
    background: #4f46e5;
    color: #ffffff;
}

#navbar.scrolled .bg-white:hover {
    background: #4338ca;
}

#navbar.scrolled #menu-toggle {
    background: #f3f4f6;
    color: #374151;
}

#navbar.scrolled #menu-toggle:hover {
    background: #e5e7eb;
}

/* ---------- Mobile Menu Animation ---------- */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

#mobile-menu.hidden {
    display: none;
}

#mobile-menu:not(.hidden) {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link:active {
    transform: scale(0.97);
}

/* ---------- Feature Card Hover Effects ---------- */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(180deg, rgba(79, 70, 229, 0.03) 0%, transparent 100%);
    transition: height 0.4s ease;
    pointer-events: none;
}

.feature-card:hover::before {
    height: 100%;
}

/* ---------- Stats Card ---------- */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ---------- Testimonial Card ---------- */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ---------- FAQ Accordion ---------- */
.faq-item {
    transition: all 0.3s ease;
}

.faq-toggle {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.faq-toggle:hover .faq-icon {
    background: #eef2ff;
}

.faq-toggle:hover .faq-icon i {
    color: #4f46e5;
}

.faq-item.active .faq-icon {
    background: #4f46e5;
}

.faq-item.active .faq-icon i {
    color: #ffffff;
    transform: rotate(180deg);
}

.faq-content {
    animation: accordionOpen 0.35s ease-out;
}

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

/* ---------- Reveal on Scroll Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ---------- Floating Animation ---------- */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

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

.animate-float-delayed {
    animation: floatDelayed 4.5s ease-in-out 1s infinite;
}

/* ---------- Counter Animation ---------- */
.counter {
    display: inline-block;
}

/* ---------- CTA Section Shadow ---------- */
.hover\:shadow-3xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

/* ---------- Focus States ---------- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Selection Colors ---------- */
::selection {
    background: #4f46e5;
    color: #ffffff;
}

::-moz-selection {
    background: #4f46e5;
    color: #ffffff;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
    #navbar {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .feature-card {
        margin-bottom: 8px;
    }

    .reveal-left,
    .reveal-right {
        transform: translateY(30px);
    }

    .reveal-left.revealed,
    .reveal-right.revealed {
        transform: translateY(0);
    }
}

/* ---------- Print Styles ---------- */
@media print {
    #navbar,
    #mobile-menu,
    .animate-float,
    .animate-float-delayed {
        display: none;
    }
}
