/**
 * DappWeb Critical CSS
 * 首屏关键样式 - 用于优化首次内容渲染
 */

/* 关键CSS - 首屏渲染必需 */
html {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #1f2937;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #fff;
}

/* 加载状态 */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* 导航栏 */
nav {
    background: #111827;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Hero区域 */
header {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    padding: 5rem 1rem;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #4f46e5;
    color: #fff;
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
}

/* Modern Animations */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Glow Effects */
.glow-on-hover {
    position: relative;
    overflow: hidden;
}

.glow-on-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.glow-on-hover:hover::before {
    left: 100%;
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(79, 70, 229, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

/* Slide In Effects */
.slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In Effect */
.scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 语言下拉菜单 */
.language-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    background-color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 50;
    min-width: 120px;
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    right: 0;
}

.language-dropdown:hover .dropdown-menu,
.language-dropdown .dropdown-menu.active {
    display: block;
}

.dropdown-menu a {
    color: #374151;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 0.875rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
    background-color: #f3f4f6;
    color: #4f46e5;
}

.dropdown-menu a.selected {
    font-weight: 600;
    color: #4f46e5;
}

/* 卡片悬停效果 */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* 服务图标包装器 */
.service-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3.5rem;
    width: 3.5rem;
    border-radius: 0.5rem;
    background-image: linear-gradient(to right, #4f46e5, #7c3aed);
    color: white;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.service-icon-wrapper i {
    font-size: 1.75rem;
}

/* 合作伙伴Logo */
.partner-logo {
    max-height: 45px;
    width: auto;
    margin: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* 社交按钮 */
.social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0.5rem;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.social-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.social-button i {
    margin-right: 0.6rem;
    font-size: 1.1rem;
}

.social-twitter { background-color: #1DA1F2; color: white; }
.social-twitter:hover { background-color: #0c85d0; }
.social-linkedin { background-color: #0A66C2; color: white; }
.social-linkedin:hover { background-color: #004182; }
.social-wechat { background-color: #07C160; color: white; }
.social-wechat:hover { background-color: #06ad56; }
.social-telegram { background-color: #2AABEE; color: white; }
.social-telegram:hover { background-color: #1798d4; }

/* 博客卡片 */
.blog-card img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.blog-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    margin-right: 0.25rem;
    margin-bottom: 0.5rem;
}

/* Background Colors */
#why-us, #cooperation, #social-news, #about {
    background-color: #f9fafb;
}

#blog-posts {
    background-color: #f3f4f6;
}

/* Modern Gradient Backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-bg-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-bg-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Glass Morphism Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Enhanced Card Styles */
.card-elevated {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card-elevated:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background-color: rgba(255, 255, 255, 0.7);
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Scroll Progress Indicator */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    z-index: 9999;
    transition: width 0.1s ease;
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

:target::before {
    content: "";
    display: block;
    height: 80px;
    margin-top: -80px;
    visibility: hidden;
}

/* 在线客服样式 */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.chat-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.chat-input {
    border-top: 1px solid #e5e7eb;
    padding: 16px;
    display: flex;
    gap: 8px;
}

.chat-input input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 8px 16px;
    outline: none;
}

.chat-input button {
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
}

.message {
    margin-bottom: 12px;
}

.message.bot {
    text-align: left;
}

.message.user {
    text-align: right;
}

.message-content {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 80%;
}

.message.bot .message-content {
    background: #f3f4f6;
    color: #374151;
}

.message.user .message-content {
    background: #4f46e5;
    color: white;
}

/* 浮动通知 */
.floating-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 300px;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.floating-notification.show {
    transform: translateX(0);
}

.floating-notification .close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #9ca3af;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .chat-panel {
        width: calc(100vw - 40px);
        height: 400px;
    }
    
    .floating-notification {
        max-width: calc(100vw - 40px);
    }
}

/* B2B平台集成样式 */
.platform-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.platform-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.platform-stat {
    transition: color 0.3s ease;
}

.platform-reviews {
    max-height: 200px;
    overflow-y: auto;
}

.review-item {
    border-left: 4px solid #10b981;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.linkedin-post {
    border-left: 4px solid #0a66c2;
    padding-left: 1rem;
    margin-bottom: 0.75rem;
}

.platform-link {
    transition: all 0.3s ease;
}

.platform-link:hover {
    transform: translateX(5px);
}

/* 平台图标动画 */
.platform-icon {
    transition: transform 0.3s ease;
}

.platform-card:hover .platform-icon {
    transform: scale(1.1);
}

/* Enhanced Count Up Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Animated Progress Bars */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    overflow: hidden;
}

.progress-value {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    width: 0;
    transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Floating Animation */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

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

/* Glitch Effect */
.glitch-text {
    position: relative;
    animation: glitch 5s infinite;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
}

@keyframes glitch-anim {
    0% { clip: rect(42px, 9999px, 44px, 0); }
    5% { clip: rect(12px, 9999px, 59px, 0); }
    10% { clip: rect(48px, 9999px, 29px, 0); }
    15% { clip: rect(42px, 9999px, 73px, 0); }
    20% { clip: rect(63px, 9999px, 27px, 0); }
    25% { clip: rect(34px, 9999px, 55px, 0); }
    30% { clip: rect(86px, 9999px, 73px, 0); }
    35% { clip: rect(20px, 9999px, 20px, 0); }
    40% { clip: rect(26px, 9999px, 60px, 0); }
    45% { clip: rect(25px, 9999px, 66px, 0); }
    50% { clip: rect(57px, 9999px, 98px, 0); }
    55% { clip: rect(5px, 9999px, 46px, 0); }
    60% { clip: rect(82px, 9999px, 31px, 0); }
    65% { clip: rect(54px, 9999px, 27px, 0); }
    70% { clip: rect(28px, 9999px, 99px, 0); }
    75% { clip: rect(45px, 9999px, 69px, 0); }
    80% { clip: rect(23px, 9999px, 85px, 0); }
    85% { clip: rect(1px, 9999px, 83px, 0); }
    90% { clip: rect(71px, 9999px, 14px, 0); }
    95% { clip: rect(20px, 9999px, 6px, 0); }
    100% { clip: rect(60px, 9999px, 81px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    5% { clip: rect(52px, 9999px, 74px, 0); }
    10% { clip: rect(79px, 9999px, 85px, 0); }
    15% { clip: rect(75px, 9999px, 5px, 0); }
    20% { clip: rect(67px, 9999px, 61px, 0); }
    25% { clip: rect(14px, 9999px, 79px, 0); }
    30% { clip: rect(1px, 9999px, 66px, 0); }
    35% { clip: rect(86px, 9999px, 30px, 0); }
    40% { clip: rect(23px, 9999px, 98px, 0); }
    45% { clip: rect(85px, 9999px, 72px, 0); }
    50% { clip: rect(71px, 9999px, 75px, 0); }
    55% { clip: rect(2px, 9999px, 48px, 0); }
    60% { clip: rect(30px, 9999px, 16px, 0); }
    65% { clip: rect(59px, 9999px, 50px, 0); }
    70% { clip: rect(41px, 9999px, 62px, 0); }
    75% { clip: rect(2px, 9999px, 82px, 0); }
    80% { clip: rect(47px, 9999px, 73px, 0); }
    85% { clip: rect(3px, 9999px, 27px, 0); }
    90% { clip: rect(26px, 9999px, 55px, 0); }
    95% { clip: rect(42px, 9999px, 97px, 0); }
    100% { clip: rect(38px, 9999px, 49px, 0); }
}

/* Payment Modal Styles */
#payment-modal {
    z-index: 9999 !important;
}

.payment-modal-content {
    max-width: 90vw;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 1rem;
    position: relative;
}

@media (min-width: 640px) {
    .payment-modal-content {
        width: 90%;
        max-width: 500px;
    }
}

@media (min-width: 768px) {
    .payment-modal-content {
        width: 90%;
        max-width: 600px;
    }
}

@media (min-width: 1024px) {
    .payment-modal-content {
        width: 90%;
        max-width: 650px;
    }
}

.notification-toast {
    z-index: 10000 !important;
}

/* Ensure modal is centered properly */
.modal-centered {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive modal adjustments */
@media (max-width: 640px) {
    .payment-modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
        max-height: 95vh;
    }
    
    #payment-modal {
        padding: 0.5rem;
    }
}

/* Enhanced payment method selection buttons */
.payment-method-btn {
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
}

.payment-method-btn.active {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.payment-method-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.payment-method-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Improved modal header */
.modal-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

/* Enhanced info cards */
.payment-info-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 0.5rem;
}

/* Better responsive spacing */
@media (max-width: 640px) {
    .payment-modal-content {
        padding: 1rem !important;
    }
    
    .modal-spaced-section {
        margin-bottom: 1rem;
    }
}
