/* 银辰咨询官网 - UI/UX Pro Max Design System */
/* Design System: Glassmorphism + Trust & Authority */
/* Typography: Modern Professional (Poppins + Open Sans) */
/* Color Palette: SaaS Trust Blue (#2563EB primary, #3B82F6 secondary, #F97316 CTA) */
/* Accessibility: WCAG AA compliant, prefers-reduced-motion respected */

/* ==================== */
/* Custom Styles        */
/* ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Smooth scroll padding for fixed nav */
html {
    scroll-padding-top: 100px;
}

/* Enhanced Glassmorphism Effects */
.backdrop-blur-2xl {
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

.backdrop-blur-xl {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Respect reduced motion preference (Accessibility) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Apply animations */
nav {
    animation: fadeIn 0.6s ease-out;
}

main > div > div {
    animation: fadeInUp 0.8s ease-out;
}

section {
    animation: fadeInUp 1s ease-out;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* 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;
        scroll-behavior: auto !important;
    }
}

/* Download button loading state */
#download-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

#download-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.3s ease-in-out;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 100;
    max-width: 400px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    border-left: 4px solid #10b981;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.info {
    border-left: 4px solid #3b82f6;
}

/* Hover effects enhancement */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover effect */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.15);
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Responsive utilities */
@media (max-width: 1024px) {
    html {
        scroll-padding-top: 80px;
    }
}

@media (max-width: 768px) {
    nav .hidden {
        display: none !important;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 70px;
    }
}

/* Print styles */
@media print {
    nav,
    #download-btn,
    .notification {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    * {
        box-shadow: none !important;
    }
}

/* 折叠式手风琴样式 */
.feature-accordion {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.feature-accordion:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.accordion-header {
    background: transparent;
    border: none;
    text-align: left;
    transition: background-color 0.2s ease;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.5);
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.feature-detail-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.feature-detail-desc {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.feature-detail-usage {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.feature-detail-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    margin-top: 0.5rem;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    * {
        border-width: 2px !important;
    }
    
    button,
    a {
        text-decoration: underline;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Can be implemented later if needed */
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #3B82F6;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Enhanced focus indicators */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #3B82F6;
    outline-offset: 2px;
}

/* Smooth transitions for interactive elements */
a,
button,
input,
textarea,
select {
    transition: all 0.2s ease;
}

/* Custom selection color */
::selection {
    background-color: #3B82F6;
    color: white;
}

::-moz-selection {
    background-color: #3B82F6;
    color: white;
}
