/* ============================================
   小鱼POKER - Custom Styles
   Fresh Ocean Theme | Primary: #3B82F6 (blue-500)
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --ocean-50: #eff6ff;
    --ocean-100: #dbeafe;
    --ocean-200: #bfdbfe;
    --ocean-300: #93c5fd;
    --ocean-400: #60a5fa;
    --ocean-500: #3B82F6;
    --ocean-600: #2563eb;
    --ocean-700: #1d4ed8;
    --ocean-800: #1e40af;
    --ocean-900: #1e3a8a;
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-ocean: 0 10px 40px rgba(59, 130, 246, 0.15);
}

/* ---------- Smooth Scroll ---------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

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

::-webkit-scrollbar-track {
    background: var(--ocean-50);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--ocean-400), var(--ocean-600));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--ocean-500), var(--ocean-700));
}

/* ---------- Selection ---------- */
::selection {
    background-color: var(--ocean-500);
    color: #ffffff;
}

::-moz-selection {
    background-color: var(--ocean-500);
    color: #ffffff;
}

/* ---------- Navbar Scroll Effect ---------- */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(59, 130, 246, 0.08);
}

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

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

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

/* ---------- Mobile Nav Links Click Feedback ---------- */
.mobile-nav-link:active {
    transform: scale(0.97);
}

/* ---------- Feature Cards ---------- */
.feature-card {
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--ocean-200);
}

.feature-card:hover .feature-icon-wrapper {
    background-color: var(--ocean-100);
    transform: scale(1.05);
}

/* ---------- Stats Counter ---------- */
.stat-item {
    transition: all var(--transition-base);
}

.stat-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* ---------- Testimonial Cards ---------- */
.testimonial-card {
    transition: all var(--transition-base);
}

.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-ocean);
}

/* ---------- FAQ Accordion ---------- */
.faq-item {
    transition: all var(--transition-base);
}

.faq-item.active {
    border-color: var(--ocean-200);
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.06);
}

.faq-item.active .faq-icon {
    background-color: var(--ocean-500);
    color: #ffffff;
}

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

.faq-icon {
    transition: all var(--transition-base);
}

.faq-icon i {
    transition: transform var(--transition-base);
}

.faq-toggle {
    cursor: pointer;
}

.faq-answer {
    animation: fadeInDown 0.35s ease-out;
}

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

/* ---------- CTA Section ---------- */
#cta {
    position: relative;
}

/* ---------- Hero Section ---------- */
#hero {
    position: relative;
}

/* ---------- Image Loading ---------- */
img {
    max-width: 100%;
    height: auto;
}

/* ---------- Link Styles ---------- */
a {
    transition: color 0.2s ease;
}

/* ---------- Focus Styles ---------- */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--ocean-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Button Hover Animation ---------- */
a[href="#cta"],
a[href="#features"] {
    position: relative;
    overflow: hidden;
}

/* ---------- Pulse Ring for CTA Button ---------- */
@keyframes pulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* ---------- Ripple Effect for CTA Buttons ---------- */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.ripple:hover::after {
    opacity: 1;
}

/* ---------- Footer ---------- */
footer a:hover {
    color: var(--ocean-400);
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 640px) {
    html {
        scroll-padding-top: 4rem;
    }

    h1 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
    }

    h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .stat-item {
        padding: 1.25rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    html {
        scroll-padding-top: 4.5rem;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    #navbar,
    #mobile-menu,
    footer {
        position: static;
    }

    #cta {
        background: var(--ocean-500) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- Glass Effect Helper ---------- */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ---------- Gradient Text Helper ---------- */
.gradient-text {
    background: linear-gradient(135deg, var(--ocean-500), var(--ocean-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Shimmer Effect for Loading States ---------- */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

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

/* ---------- Wave Divider Helper ---------- */
.wave-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    pointer-events: none;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

/* ---------- Card Entrance Animation ---------- */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-animate-in {
    animation: cardEntrance 0.6s ease-out forwards;
}
