/* 工作流模态框标题样式 - 简洁版 */

/* 微妙的动画效果 */
@keyframes gentle-pulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

@keyframes subtle-glow {
    0%, 100% {
        box-shadow: 0 0 4px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
    }
}

@keyframes smooth-gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 顶部渐变装饰条动画 */
@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* 应用到装饰条 */
.gradient-bar {
    background: linear-gradient(90deg, #3b82f6, #6366f1, #8b5cf6, #3b82f6);
    background-size: 200% 100%;
    animation: gradient-flow 4s linear infinite;
}

/* 图标悬浮效果 */
.modal-icon-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-icon-container:hover {
    transform: translateY(-1px) scale(1.05);
}

.modal-icon-container:hover .modal-icon {
    animation: subtle-glow 2s ease-in-out infinite;
}

/* 状态点动画 */
.status-dot {
    animation: gentle-pulse 2s ease-in-out infinite;
}

/* 装饰点动画 */
.decorative-dots .dot {
    animation: gentle-pulse 1.5s ease-in-out infinite;
}

.decorative-dots .dot:nth-child(2) {
    animation-delay: 0.5s;
}

.decorative-dots .dot:nth-child(3) {
    animation-delay: 1s;
}

/* 关闭按钮增强 */
.close-button {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.close-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.close-button:hover::before {
    width: 100px;
    height: 100px;
}

/* 标题文字增强 */
.modal-title {
    position: relative;
    transition: color 0.3s ease;
}

.modal-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    transition: width 0.3s ease;
}

.modal-title:hover::after {
    width: 100%;
}


/* 联系模态框 - 完全重新设计 */
.contact-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 50%, 
        rgba(239, 68, 68, 0.1) 100%),
        rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-modal-overlay[style*="display: flex"] {
    opacity: 1;
}

.contact-modal-content {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 
        0 32px 64px rgba(59, 130, 246, 0.12),
        0 16px 32px rgba(139, 92, 246, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.8) translateY(30px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.contact-modal-overlay[style*="display: flex"] .contact-modal-content {
    transform: scale(1) translateY(0);
}

.contact-modal-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(248, 250, 252, 0.6) 100%);
    border-radius: 24px 24px 0 0;
}

.contact-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, 
        #1f2937 0%, 
        #3b82f6 50%, 
        #6366f1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    margin: 0 0 8px 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    position: relative;
}

.contact-modal-header p {
    font-size: 16px;
    color: #64748b;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.025em;
    opacity: 0.9;
}

.contact-modal-header button {
    color: #9ca3af;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 16px;
    flex-shrink: 0;
}

.contact-modal-header button:hover {
    color: #374151;
    background: #f3f4f6;
}

.contact-modal-body {
    padding: 32px;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.9) 100%);
    position: relative;
}

/* 深色模式增强 */
.dark .contact-modal-content {
    background: linear-gradient(145deg, 
        rgba(31, 41, 55, 0.95) 0%, 
        rgba(17, 24, 39, 0.9) 100%);
    border-color: rgba(55, 65, 81, 0.5);
    box-shadow: 
        0 32px 64px rgba(0, 0, 0, 0.3),
        0 16px 32px rgba(59, 130, 246, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dark .contact-modal-header {
    border-color: rgba(55, 65, 81, 0.3);
    background: linear-gradient(135deg, 
        rgba(31, 41, 55, 0.9) 0%, 
        rgba(17, 24, 39, 0.7) 100%);
}

.dark .contact-modal-header h2 {
    background: linear-gradient(135deg, 
        #f9fafb 0%, 
        #60a5fa 50%, 
        #a78bfa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dark .contact-modal-header p {
    color: #d1d5db;
}

.dark .contact-modal-header button {
    color: #9ca3af;
}

.dark .contact-modal-header button:hover {
    color: #d1d5db;
    background: rgba(55, 65, 81, 0.5);
    backdrop-filter: blur(10px);
}

.dark .contact-modal-body {
    background: linear-gradient(to bottom, 
        rgba(31, 41, 55, 0.95) 0%,
        rgba(17, 24, 39, 0.9) 100%);
}

/* 专业表单样式 */
#contactForm input,
#contactForm textarea {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    letter-spacing: 0.025em;
}

#contactForm input:focus,
#contactForm textarea:focus {
    border-color: #3b82f6;
    background: white;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 4px 12px rgba(59, 130, 246, 0.05);
    outline: none;
    transform: translateY(-1px);
}

#contactForm input:hover,
#contactForm textarea:hover {
    border-color: #d1d5db;
    background: white;
}

/* 深色模式 */
.dark #contactForm input,
.dark #contactForm textarea {
    background: rgba(55, 65, 81, 0.9);
    border-color: #4b5563;
    color: white;
}

.dark #contactForm input:focus,
.dark #contactForm textarea:focus {
    border-color: #3b82f6;
    background: #374151;
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.2),
        0 4px 12px rgba(59, 130, 246, 0.1);
}

.dark #contactForm input:hover,
.dark #contactForm textarea:hover {
    border-color: #6b7280;
    background: #374151;
}

/* 表单标签增强 */
#contactForm label {
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* 提交按钮增强动效 */
#submitContactForm {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, 
        #3b82f6 0%, 
        #6366f1 30%, 
        #8b5cf6 60%, 
        #ec4899 100%);
    background-size: 300% 300%;
    animation: gradient-shift 4s ease infinite;
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.4),
        0 4px 16px rgba(139, 92, 246, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    border: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#submitContactForm:hover {
    box-shadow: 
        0 12px 40px rgba(59, 130, 246, 0.5),
        0 8px 24px rgba(139, 92, 246, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    animation-duration: 1.5s;
    transform: translateY(-2px) scale(1.02);
}

#submitContactForm:active {
    transform: scale(0.98);
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 25%;
    }
    50% {
        background-position: 100% 75%;
    }
    75% {
        background-position: 0% 75%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 成功消息样式 */
#successMessage {
    animation: fadeInUp 0.5s ease-out;
}

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


/* 移动端优化 */
@media (max-width: 768px) {
    .contact-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .contact-modal-header {
        padding: 24px 24px 20px;
    }
    
    .contact-modal-header h2 {
        font-size: 20px;
    }
    
    .contact-modal-header p {
        font-size: 14px;
    }
    
    .contact-modal-body {
        padding: 24px;
    }
    
    /* 移动端联系方式网格改为单列 */
    .grid.grid-cols-1.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    #contactForm input,
    #contactForm textarea {
        font-size: 16px; /* 防止 iOS 缩放 */
        padding: 16px 20px;
    }
    
    /* 移动端按钮优化 */
    .flex.flex-col.sm\\:flex-row {
        flex-direction: column;
    }
    
    #contactForm button {
        font-size: 16px;
    }
}

/* 加载动画 */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 装饰性动画 */
.contact-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        #3b82f6, 
        #6366f1, 
        #8b5cf6, 
        #ec4899, 
        #f59e0b,
        #3b82f6);
    background-size: 300% 100%;
    animation: rainbow-flow 3s linear infinite;
    border-radius: 24px 24px 0 0;
}

@keyframes rainbow-flow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}

/* logo动画效果 */
.contact-modal-header h2 .inline-flex {
    transition: all 0.3s ease;
    position: relative;
}

.contact-modal-header h2 .inline-flex::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(59, 130, 246, 0.3), 
        rgba(139, 92, 246, 0.3));
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.contact-modal-header:hover h2 .inline-flex {
    transform: scale(1.05);
}

.contact-modal-header:hover h2 .inline-flex::after {
    opacity: 1;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}
